AWT-Event queue not responding

Hi all! I have already posted a message with similar problem wich was solved but this now is a different one.
I have following situation:
I have a class that is called from somewhere (I don't know where from) and that displays a JFrame. After it calls setVisible(true) it calls function synchronized lock() which does wait(). After the JFrame is done it calls synchronized unlock() which does notifyAll().
The purpose is that my JFrame should do some checking and then let the code that called it resume it's work normaly.
Te problem is that this only works with JDK version 1.3. If I do it on 1.4 the frame doesn't respond to clicks and doesn't repaint. If I remove lock() and unlock() the frame works ok but the main program is not suspended.
I suppose that the frame needs to make new threads for user clicks or repainting (I have noticed a Timer thread) but it can't do it for some reason.
Any help?

Yeah, as the doctor said to the patient who said "Doctor, it hurts when I do this" .. "So don't do that" ... don't do that. That is, it sounds as if your application is posting huge numbers of events? So if your application didn't post so many events, would the event queue not be filled up?
- David

Similar Messages

  • How to "kill" AWT Event Queue thread without using System.exit()?

    When I run my program and the first GUI window is displayed a new thread is created - "AWT-Event Queue". When my program finishes, this thread stays alive and I think it causes some problems I have experienced lately.
    Is there any possibility to "kill" this thread without using System.exit() (I can't use it for some specific reasons)

    All threads are kept alive by the JVM session. When you use System.exit(int) you kill the current session, thus killing all threads. I'm not sure, though...
    What you could do, to make sure all threads die, is to make ever thread you start member of a thread group. When you want to exit you app, you kill all the threads in the thread group before exit.
    A small example:
    //Should be declared somewhere
    static ThreadGroup threadGroup = new ThreadGroup("My ThreadGroup");
    class MyClass extends Thread {
    super(threadGroup, "MyThread");
    Thread thread = new Thread(threadGroup, "MySecondThread");
    void exit() {
    //Deprecated, seek alternative
    threadGroup.stop();
    System.exit(0);
    }

  • MACOS 10.4: Solve AWT Event queue hangup

    Hi,
    I'm having trouble with the AWT eventqueu. On MacOS 10.4, using Java 5 Runtime, my applet sometimes blocks. When looking at the threadstack, the deadlock always appears in the Event Loop, dispatching an AWT event, blocking in the CGlobalCursorManager._updateCursor call. In fact the CGlobalCursorManager.findHeavyweightUnderCursor Native call.
    I already tried some workarounds:
    - overwrite the validate method of my custom AWT components. Making sure that they do not block forever. This solves the problem for events coming through the overidden component, but it has to work for every event that might trigger the GlobalCursorManager.
    I had some possible solutions for which I would like some pro's and con's in this forum:
    1. I could try to kill the event loop. Is it possible to quit the event loop and restart it from within the applet ?
    2. Can I force each AWT container to use another implementation of the validate method ?
    3. Can I set another, customized, CGlogalCursorManager ?
    4. Other possibilities ?
    Thanks in advance for all those responding.

    I think you mean that I can override the validate method for each custom UI object separately.
    That's a possibility, but I was looking for a more general solution. If possible, I would to extends one
    class. E.g. can I set another event queue ? That way, I could make a custom event queue in case of a Mac OS browser.

  • Alarms not appearing for events - Agent Not Responding

    Hi
    I'm hoping someone may be able to help with a frustrating issue.
    I have a setup with SunMC 4.0 monitoring approx 15 SunMC agents. The problem is some of these agents are not displaying alarms for events that occur.
    E.g. if I trigger an alarm on a host by say filling up a filesystem, on some hosts an alarm will appear in the Alarm tab as exepcted, but on other hosts no alarm appears and hence I cannot acknowledge the alarm.
    After doing a bit of digging I have found the following:
    1) When the event is triggered on the client the trap is sent to the server
    2) The server then tries to communicate with the agent on the client and I see this error in the event.log
    [012578fd 0086 ]info Jul 28 14:59:06 event eventmgr: sending snmp collection request to XXXX 1161 XXXX for startline 0...................................................................
    [012578ff 0098 ]error Jul 28 14:59:06 event eventmgr: event collection failed for XXXX 1161 XXXX line 0 - error {} {Agent Not Responding}.................................................
    3) If I snoop between the 2 servers I can see communication between the server and the client on port 1161 so dont believe it is a network issue
    4) I have tried uninstalling and reinstalling the agent. This strangely cured it on one server with the problem, but on another server the problem persists even after reinstalling the agent multiple times
    5) I have logged into the postgress database and can see that events are not being logged in the events table (hence not being displayed in the Sun MC console).
    6) I have tried reseeding the agent and that makes no difference
    7) I have ensured the agent is listening on one network interface by adding snmpBindAnyAddr = "0" to the agent section of the domain-config.x file
    I am not sure where else to look for pointers as to what is going on. What beats me is that the servers which the agents are running on all have identical builds built from jumpstart and are on the same network, yet some work and some dont!
    Any help from anyone greatly received...
    thanks

    Hi there,
    I found a solution to get the alarmflow going again:
    1. Delete the node from SunMC Java Console
    2. Stop the agent
    3. Remove all logfiles in /var/opt/SUNWsymon/log
    4. Start the agent
    5. Wait 2 minutes and add the node in SunMC Java Console
    After these steps I can see alarms coming through and when adjusting thresholds I can trigger new alarms which show up on the Hostview Alarms tab.
    Unfortunately, this only seems to be a temporary solution, at least for some nodes.
    Anyway, I figured I'd share this info with everyone. Maybe it will help with your investigation and if someone finds a permanent solution please feel free to post it here ;-)
    Best Regards,
    Emerald

  • User Event Agent (Not Responding)

    In Activity Monitor, I'm seeing that the process called User Event Agent is in red letters and "not responding". Does anyone know what this means and how I can fix it?

    Hi
    Ive seen all the posts here but want to ask.
    If i delete this bluetooth plugin am i going to be left with no bluetooth connectivity? I also use a Digidesign Mbox and had the drivers installed in my 10.4.11 system. I cloned that system to firewire drive and upgraded to 10.5 and let the set up assistant copy all my users apps etc from there into the new 10.5.1.
    I cant find the digi design driver anywhere now in the 10.5.1 system. Can anyone say for sure that this driver was the culprit? If so where is it now?
    Furthermore, i cannot sync my Nokia N73 as i could before i upgraded to Leopard. I wonder if this is because of the bluetooth plugin problem.
    Sorry this is so badly written...
    cheers
    david

  • AWT Event Listener not listening...

    Hi,
    I'm having problems with an AWT Event Listener on a JFrame.
    Basically, im making a tank game, so the first screen to appear is an inventory screen. The when you click start on this screen, you create a GameScreen which extends JFrame. i have an AWT Event Listener added to this frame using this code:
    Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener(){
    public void eventDispatched(AWTEvent e) {
    if(((KeyEvent)e).getKeyCode() == KeyEvent.VK_DOWN && e.getID() == KeyEvent.KEY_PRESSED)
    It's checking events on the arrow keys and the tab and enter keys.
    So when the this round of the game has finished, i setVisible to false, and make the inventory visible again.
    The problem is, when i set make the GameScreen visible again, the listeners aren't working.
    It seems to be working fine for 'enter', that is VK_ENTER, but not for the arrow keys...
    Any1 have any ideas??
    Any help would be great!
    Thanks,
    D.

    I am willing to bet that your problem lies in that once you return the main game screen from the inventory screen that you need to set the focus back to the main game screen. I believe, as events go, the component that has the focus is the one that will receive the events and process them according to their listener code. As I am not sure where your focus goes once you close the inventory screen and open the main screen, it could be that the wrong component has the focus.
    As far as getting the focus to the correct component is concerned, I remember myself and Malohkan having a discussion as to how to get this to work, and he came up with a work-around. That thread is somewhere in this forum. I'm not sure if it will solve your problem, but it might be something worth looking into.
    -N.

  • JTable Awt -Event Queue problem

    Hi
    I've been looking everywhere for a solution to this, but can't seem to find one. I've got a JTable with an underlying model that is being continuously updated (every 100ms or so). Whenever I try to sort the JTable using TableRowSorter while the model is being added to I get
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.Vector.elementAt(Vector.java:430)
    at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:277)
    I don't understand this as in my custom table model I've added the fireTableChanged etc. in a SwingUtilities.invokeLater( ...) thread.
    Has anyone else encountered this problem and found a solution? I'd be really grateful!
    Thanks

    Hi
    Thanks for responding, I'm still a little confused. I've posted the code below for both the JTable and the TableModel. The tablemodel simply gets values from a vector which is being dynamically updated from outside the table - but whenever the vector is added to
    The problem seems to only occur when I press the column header to sort the tables during the updates. My understanding is that the method refresh() should create a threadsafe update of the table - but somehow it refreshes the binding to the tablemodel and during this time the table returns a defaulttablemodel that doesn't correspond to the actual underlying data....I thought this kind of problem would be solved by invoking all updates on the swing event thread, but it seems to still produce the effect and I'm stumped!!
    (The data is in an array called turns, and the addElement() in another class calls the refresh() method)
    many thanks, in the hope that someone has the kindness and and benevolence to wade through the following code!
    public class JContiguousTurnsListTable extends JTable {
    private JContiguousTurnsListTableModel jctltm;
    public JContiguousTurnsListTable(Conversation c) {
    super();
    jctltm = new JContiguousTurnsListTableModel(this,c);
    this.setModel(jctltm);
    setSize();
    //this.setAutoResizeMode(AUTO_RESIZE_ALL_COLUMNS);
    //this.setAutoCreateRowSorter(true);
    TableRowSorter <TableModel> sorter = new TableRowSorter <TableModel>(jctltm);
    //sorter.setSortsOnUpdates(true);
    this.setRowSorter(sorter);
    System.err.println("Setting up ");
    private void setSize(){
    TableColumn column = null;
    for (int i = 0; i <11; i++) {
    column = this.getColumnModel().getColumn(i);
    if(i==1||i==2||i==3||i==4||i==8||i==9){
    column.setPreferredWidth(50);
    else if (i==0||i==5){
    column.setPreferredWidth(180);
    else if (i == 6) {
    column.setPreferredWidth(150);
    else if(i==10){
    column.setPreferredWidth(250);
    else
    column.setPreferredWidth(100);
    //column.setPreferredWidth(100);
    //column.setMinWidth(100);
    //column.setMaxWidth(100);
    public String getColumnName(int column){
    return jctltm.getColumnName(column);
    public void refresh(){
    this.jctltm.refresh();
    ----------------And the table model:
    public class JContiguousTurnsListTableModel extends AbstractTableModel {
    private Conversation c;
    public JContiguousTurnsListTableModel(JTable jt,Conversation c) {
    super();
    this.c=c;
    public void refresh(){
    //System.out.println("Refresh");
    SwingUtilities.invokeLater(new Runnable(){public void run(){fireTableDataChanged();fireTableStructureChanged();} });
    public boolean isCellEditable(int x, int y){
    return false;
    public String getColumnName(int column){
    if(column==0){
    return "Sender";
    else if(column==1){
    return "Onset";
    else if (column==2){
    return "Enter";
    else if(column ==3){
    return "E - O";
    else if(column ==4){
    return "Speed";
    else if(column ==5){
    return "Spoof Orig.";
    else if(column ==6){
    return "Text";
    else if(column ==7){
    return "Recipients";
    else if(column ==8){
    return "Blocked";
    else if(column ==9){
    return "Dels";
    else if(column ==10){
    return "TaggedText";
    else if(column ==11){
    return "ContgNo";
    else if(column ==12){
    return "Inconcistency";
    else{
    return " ";
    public Object getValueAt(int x, int y){
    try{ 
    //System.out.println("GET VALUE AT "+x+" "+y);
    Vector turns = c.getContiguousTurns();
    if(x>=turns.size())return " ";
    ContiguousTurn t = (ContiguousTurn)turns.elementAt(x);
    if(y==0){
    return t.getSender().getUsername();
    else if(y==1){
    return t.getTypingOnset();
    else if(y==2){
    return t.getTypingReturnPressed();
    else if(y==3){
    return t.getTypingReturnPressed()-t.getTypingOnset();
    else if(y==4){
    long typingtime = t.getTypingReturnPressed()-t.getTypingOnset();
    if(typingtime<=0)return 0;
    return ((long)t.getTextString().length())/typingtime;
    else if(y==5){
    return t.getApparentSender().getUsername();
    else if(y==6){
    return t.getTextString();
    else if(y==7){
    //System.out.println("GETTINGRECIP1");
    Vector v = t.getRecipients();
    String names ="";
    // System.out.println("GETTINGRECIP3");
    for(int i=0;i<v.size();i++){
    Conversant c = (Conversant)v.elementAt(i);
    // System.out.println("GETTINGRECIP4");
    names = names+", "+c.getUsername();
    // System.out.println("GETTINGRECIP5");
    return names;
    else if (y==8){
    if (t.getTypingWasBlockedDuringTyping())return "BLOCKED";
    return "OK";
    else if(y==9){
    return t.getNumberOfDeletes();
    else if(y==10){
    String returnText="";
    Vector v = t.getWordsAsLexicalEntries();
    for(int i=0;i<v.size();i++){
    LexiconEntry lxe= (LexiconEntry)v.elementAt(i);
    returnText = returnText+lxe.getWord()+" ("+lxe.getPartOfSpeech()+") ";
    return returnText;
    else if(y==11){
    return t.getNumberOfTurns();
    else if(y==12){
    // System.out.println("CONTIGUOUS1");
    String value ="";
    boolean hasSameRecipients = t.getTurnsHaveSameRecipients();
    boolean hasSameApparentOrigin = t.getTurnsHaveSameApparentOrigin();
    if (hasSameRecipients&hasSameApparentOrigin){
    value = "OK";
    else if (hasSameRecipients&!hasSameApparentOrigin){
    value = "Diff. O";
    else if(!hasSameRecipients&hasSameApparentOrigin){
    value = "Diff. Recip";
    else {
    value = "Diff O&R";
    //System.out.println("CONTIGUOUS2");
    return value;
    return " ";
    }catch (Exception e){
    return "UI ERROR";
    public Class getColumnClass(int column) {
    Class returnValue;
    if ((column >= 0) && (column < getColumnCount())) {
    returnValue = getValueAt(0, column).getClass();
    } else {
    returnValue = Object.class;
    return returnValue;
    public int getRowCount(){
    return this.c.getContiguousTurns().size();
    public int getColumnCount(){
    return 13;
    }

  • C++ form with awt controls do not respond

    I have created mfc project in visual studio c++ 6.0. Then I modified MainFrm.cpp.
    Here in CMainFrame::OnShowWindow I initialize jvm, create WEmbeddedFrame and put Button in it. Is runs ok, but 2 problems:
    1. I can't click button. Just as there is some panel over java gui and it catches all mouse and keyboard events.
    2. java gui some times do not repaints itself, or repaints only part of it
    The form was inspired by http://www.codeproject.com/KB/cpp/OOJNIUse.aspx (but I do not use OOJNI, as you can see).
    There is a bug in WEmbeddedFrame, but it deals with swing, not awt: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4982522. To work around it I call addNotify() method.
    Can someone help me with this code?
    // MainFrm.cpp : implementation of the CMainFrame class
    #include "stdafx.h"
    #include "mfc.h"
    #include <jni.h>
    #include <string.h>
    #include <jawt.h>
    #include <jawt_md.h>
    #include <comdef.h>
    #include "MainFrm.h"
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #endif
    // CMainFrame
    IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
    BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
         ON_WM_CREATE()
         ON_WM_SHOWWINDOW()
    END_MESSAGE_MAP()
    static UINT indicators[] =
         ID_SEPARATOR,           // status line indicator
         ID_INDICATOR_CAPS,
         ID_INDICATOR_NUM,
         ID_INDICATOR_SCRL,
    jobject obj_frame;
    JNIEnv *env;
    jclass class_JString;
    // CMainFrame construction/destruction
    CMainFrame::CMainFrame()
         // TODO: add member initialization code here
    CMainFrame::~CMainFrame()
         //jvm->DestroyJavaVM();
          TRACE0("JVM destroyed\n");
    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
         if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
              return -1;
         if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
              | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
              !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
              TRACE0("Failed to create toolbar\n");
              return -1;      // fail to create
         if (!m_wndStatusBar.Create(this) ||
              !m_wndStatusBar.SetIndicators(indicators,
                sizeof(indicators)/sizeof(UINT)))
              TRACE0("Failed to create status bar\n");
              return -1;      // fail to create
         // TODO: Delete these three lines if you don't want the toolbar to be dockable
         m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
         EnableDocking(CBRS_ALIGN_ANY);
         DockControlBar(&m_wndToolBar);
         return 0;
    void CMainFrame::OnShowWindow(BOOL bShow, UINT nStatus) {
         CFrameWnd::OnShowWindow(bShow, nStatus);
         //******************************** JAVA
         JavaVM * jvm;
         long status;
          JavaVMOption options[2];
         JavaVMInitArgs vm_args;
          options[0].optionString = ".Djava.class.path=.;c:\\";
          options[1].optionString = "-verbose:jni";
         memset(&vm_args, 0, sizeof(vm_args));
         vm_args.ignoreUnrecognized = true;
          vm_args.version = JNI_VERSION_1_4;
         vm_args.nOptions = 2;
         vm_args.options = options;
          status = JNI_CreateJavaVM(&jvm, (void**) &env, &vm_args);
         if (status == JNI_ERR) {    
              return;
          TRACE0("JVM created\n");
          //class_JString = env->FindClass("foo/Test");
          TRACE0("Class found\n");
          //create frame
          //jmethodID id_Test = env->GetMethodID(class_JString, "<init>", "(J)V");
          TRACE0("Method found\n");
          //obj_frame = env->NewObject(class_JString, id_Test, m_hWnd);
          TRACE0("Object created\n");
         jclass class_Button = env->FindClass("java/awt/Button");
          TRACE0("Class Button found\n");
         jclass class_WEmbeddedFrame = env->FindClass("sun/awt/windows/WEmbeddedFrame");
          TRACE0("Class WEmbeddedFrame found\n");
         jclass class_Container = env->FindClass("java/awt/Container");
          TRACE0("Class Container found\n");
          jmethodID b_const = env->GetMethodID(class_Button, "<init>", "(Ljava/lang/String;)V");
          TRACE0("Constructor Button found\n");
          jmethodID f_const = env->GetMethodID(class_WEmbeddedFrame, "<init>", "(J)V");
          TRACE0("Constructor WEmbeddedFrame found\n");
          jmethodID f_add = env->GetMethodID(class_Container, "add", "(Ljava/awt/Component;)Ljava/awt/Component;");
          TRACE0("Method WEmbeddedFrame.add found\n");
          jmethodID f_setSize = env->GetMethodID(class_WEmbeddedFrame, "setSize", "(II)V");
          TRACE0("Method WEmbeddedFrame.setSize found\n");
          jmethodID f_show = env->GetMethodID(class_WEmbeddedFrame, "show", "()V");
          TRACE0("Method WEmbeddedFrame.show found\n");
          jmethodID f_addNotify = env->GetMethodID(class_WEmbeddedFrame, "addNotify", "()V");
          TRACE0("Method WEmbeddedFrame.addNotify found\n");
          jobject button = env->NewObject(class_Button, b_const, env->NewStringUTF("qqq"));
          TRACE0("Button created\n");
          jobject frame = env->NewObject(class_WEmbeddedFrame, f_const, m_hWnd);
          TRACE0("WEmbeddedFrame created\n");
          env->CallVoidMethod(frame, f_addNotify);
          TRACE0("Frame added Notify\n");
          env->CallVoidMethod(frame, f_setSize, 100, 100);     
          TRACE0("WEmbeddedFrame setSize called\n");
          env->CallVoidMethod(frame, f_add, button);
          TRACE0("Button added\n");
          env->CallVoidMethod(frame, f_show);
          TRACE0("Frame shown\n");
          //******************************** JAVA
          ShowWindow(SW_NORMAL);
    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
         if( !CFrameWnd::PreCreateWindow(cs) )
              return FALSE;
         // TODO: Modify the Window class or styles here by modifying
         //  the CREATESTRUCT cs
         return TRUE;
    // CMainFrame diagnostics
    #ifdef _DEBUG
    void CMainFrame::AssertValid() const
         CFrameWnd::AssertValid();
    void CMainFrame::Dump(CDumpContext& dc) const
         CFrameWnd::Dump(dc);
    #endif //_DEBUG
    // CMainFrame message handlers

    Don't post new questions on old threads.
    ...in C calling a Java Applet. And your program do it.How do you figure?
    I seriously doubt that the fundamental problem here is a JNI problem versus just a java one. I would expect that the applet viewer either calls a Sun class or even a Java API class. Nothing more. Asking a carefully phrased question in one of the GUI forums might get the answer as well as getting the Sun source for any recent jdk and looking at the code for the applet viewer.

  • Exception in thread "AWT-Event Queue 0" Mem Out of Bounds. Java Heap Space

    Hello,
    I'm not sure how to resolve this Java Heap Space Memory Out of Bounds error. Could someone please assist me with this error?
    A SCENARIO:
    I am reading in tons of data from 5 separate text files. The files have tons of rows (up to 64,220 in one). The data must be read into the program and assembled. When I have all of the files populated, I receive the OOM Error. If I remove the data from one of the 5 files the program runs successfully. If I add the data back into the file and then remove the data from some other file, the program runs successfully.
    Thanks
    RodneyM

    ff.skip(18);
    i = ff.read();
    i = ((ff.read() << 8) | i);
    i = ((ff.read() << 16) | i);
    i = ((ff.read() << 24) | i);
    xsize = i;
    System.out.println("width=" + xsize);
    i = 0;
    i = ff.read();
    i = ((ff.read() << 8) | i);
    i = ((ff.read() << 16) | i);
    i = ((ff.read() << 24) | i);
    ysize = i;
    System.out.println("Height=" + ysize);
    ff.skip(38);//62-(2+16+4+4=26)=36, actually total=62 Bytes header This is completely wrong. First an foremost you should not have this code in the paint(Graphics g) method. This is a GUI thing. The paint method may be called for any reason and you do not+ want to open a file stream, read it, and do the distance transformation every single time the method is called. There's also the issue that you have overridden the paint method as opposed to subclassing a component, overriding the paintComponent method, and adding it to the frame. But that can be ignored for right now (it will come back later and cause complications).
    Next, you've said that the header is 62 bytes. This is incorrect for a png file. The code you have posted assumes (very specifically) that you have inputted a BMP version 3 with 2-color entry palette. In other words you can only open a very specific type of image with that code. Definitely not a png. This is what was causing the out of memory error since it interprets the width and height wrong when reading the bytes and you end up trying to create a 2-D int array that will take up several hundred megabytes in size
    //xsize and ysize are interpreted wrongly
    pix=new int[xsize][ysize];
    mat1=new int[xsize][ysize]; Now granted, BMP v3 is the most common type you will encounter but you must admit that the code is not very robust at all (since it requires a very specific input).

  • Triggering events from event queue

    Can anyone tell me if events triggered FROM the event queue execute immediatly before returning to the place where the trigger occured (as it seems to when I follow the code in the debugger).
    for example in my code I am:
    1) capturing a tab change event so I'm on the AWT event queue.
    2) calling stopcellediting() on a table which eventually triggers a losefocus event on a control within the table.
    3) the program flow seems to go straight to the focuslost event before returning to process the rest of tab change event.
    is this behaviour reliable? or is it just a timing coincidence?
    thanks in advance.

    This behaviour is reliable.
    All the code that executes these events is performed in the same thread, so it has no means to do something in parallel.
    SwingUtilities.invokeLater method does provide an ability to postpone execution of some code but inside Swing package it is used mainly for paint related tasks (for example the painting of the focus change will most likely occur only after the rest of tab change event processing will be executed).

  • Running JUnit tests from AWT Event Quene

    Anyone know how to run JUnit tests from the AWT Event Queue? JFCUnit is overkill; I'm just looking for a TestRunner that runs on a different thread. I can delve into the JUnit documentation but, with luck, someone who's been through this before can spare me the trouble. Also, anyone else get a server error when searching for "JUnit event dispatch" on this forum?

    JUnit 3 version:
    import java.util.concurrent.atomic.AtomicReference;
    import javax.swing.SwingUtilities;
    import junit.framework.TestCase;
    public abstract class EDTTestCase extends TestCase {
         * Overriding this method guarantees that setUp(), tearDown(), and all
         * tests run on the EDT.
        @Override
        public void runBare() throws Throwable {
            final AtomicReference<Throwable> problem = new AtomicReference<Throwable>();
            if (!SwingUtilities.isEventDispatchThread()) {
                SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                        try {
                            runBare();
                        catch (Throwable throwable) {
                            problem.set(throwable);
                if (problem.get() != null) {
                    throw problem.get();
            else {
                super.runBare();
    }

  • Images and image maps do not respond to events on Safari

    Hello everyone,
    We have been experiencing issues with events not responding to images associated with image maps, on Safari browser. After the DOM is loaded with new image and corresponding image maps, events such as mouseover and click observing this divs do not respond or get triggered. DOM seems to be updated correctly but behaves differently (and it works correctly in all other browsers except Safari).
    This behaviour is only noticed in Safari browser running both on Windows and Mac. (Tested on Safari Version 3.1.1 on running on Windows and Mac)
    For you all to have a closer look at this issue, I have created a sample that has this problem, similar to one we experienced during one of our recent projects. Please click on the link below to get to the sample (I recommend you to try this either in Firefox or IE before you do on Safari)
    http://www.hivegroup.com/safari/test.html
    (In the above sample,
    - the javascript code initializes the DOM with image and image map
    - assigns two event listeners to the div containing this image and image map
    - when mouse pointer brought over the image, it shows the area id in the 'mobox' div
    - when clicked, DOM is updated with a new image and new corresponding image map, assigns new event listeners and should continue with the same kinda behaviour it did for the first image (but doesn't in Safari browser))
    All inputs on this issue are welcome and greatly appreciated.
    Thanking you in advance.
    Regards,
    Shashi.

    Let me explain what the pink area is. Like the first image that contains two white boxes, the pink area (as you call it) is a new image (containing four pink areas or boxes having an area id denoted to each) that imgDiv occupies after the 'click' event occurs.
    Yep, i gathered that from seeing it work on firefox...
    The point that I'm trying to make here is, there shouldn't be any difference in behaviour when imgDiv holds first image (two white boxes) or the second image (four pink boxes) that you get after we click on image or the third image (containing 6 boxes, multiple colors) which you won't be able to reach in safari browser.
    well... I can reach them, but only via the blue space.
    . We'll notice change in the red box displaying target id only when we mouse over a new area that is not currently being displayed in the red box.
    except in webkit for safari 2, where thered bpx content sticks at whatever it was when the first image was clicked, unless mouse is moved to the 'all area', and then it sticks on imgdiv.
    I completely understand what you see in safari 2. But are you saying there's some error in my script ? If so could you please point out and justify.
    I dunno Shashi, just pointing out the errors that Safari 2 reports when I view your test page, in the hope it might help. I know little of javascript

  • Application not responding after trying to open event

    Hi,
    I just updated to Final Cut 10.1.3
    I was working on a project in final cut and my computer crashed. When I restarted my computer and Final Cut, it seemed ok. It opens on the project I was working on before the one I was working on when it crashed. When I go to scroll up in the event, towards where the most recent projects are, eventually I get the spinning rainbow of death and then final cut stops responding. I have forced quit and restarted it but the same thing keeps happening. When I open other earlier projects in the same event, they seem to open and work fine.
    I tried 'Update Projects and Events' but when I click 'update all' it says that it can't find anything to update.
    Please help!
    Thanks,
    Cat

    I am having the same problem;
    I am working on a project in FCP 10.1.4 and every now and then, usually after making an edit, FCP starts to reload projects and then hangs when trying to load one of them (not always the same one).
    I have to force quit, restart deleting preferences, then after a while it happens again.
    In the Activity Monitor there are two precesses not responding - LaunchDaemon and  Codec32BitTool.
    2 x 2.4GHz Quad Core MacPro, OS10.9.5

  • OAI Event is not reading the workflow queue

    I'm creating the workflow event using iStudio (created automatically by iStudio) with the following information:
    Item Type: OAI Process Bundle: EDWARD
    Internal Name: I_EDWARD_PAATRANSACTION_OAI_V1
    Display Name: Receive Request EDWARD.PAATransaction:IN
    Description: OAI Event
    Event Action: Receive
    Event Filter: oai.edward.paatransaction.oai_v1.receive_request.oai_v1
    Cost: 0.0
    I also create the event subscription for oracle.apps.wf.event.agent.create, oracle.apps.wf.event.event.create, and oracle.apps.wf.event.subscription.create and put the following information:
    System: WFLOWDEV.MAXIMUSBC.CA
    Source Type: External
    Event Filter: oracle.apps.wf.event.subscription.create
    Source Agent: <blank>
    Phase: 1
    Status: Enabled
    Rule Data: Key
    Rule Function: WF_EVENT_FUNCTIONS_PKG.RECEIVE
    Workflow Item Type: EDWARD
    Workflow Process Name: PAATRANSACTION
    Out Agent: <blank>
    To Agent: [email protected]
    Priority: Normal
    Parameters: <blank>
    I can see that the interconnect OAI Hub is putting a message into the WF_IN queue but the event does not dequeue the message and run the process.
    So, I don't know if I'm missing anything here or there is something wrong with my configuration.
    Can anyone help me please?
    Thanks,
    Edward

    Edward,
    I am basing this reply on the OAI build I have on my laptop, which is an Oracle 9iAS Integration build, however I do not think that it has changed since.
    Before you do this, it is always a good idea to add the "OAIHeader" objects to the Common View.
    1. Under "Common Views", expand the "Business Objects" and find your Business Object (e.g. MY_BO)
    2. Under the "Events", expand the "Events" to find your event (e.g. MY_EVENT)
    3. Highlight you event (MY_EVENT), Right-click on your mouse, and choose "Edit". This will bring up the "Edit Event" window.
    4. Choose "Add". This will create a new line.
    The 'Name' will be blank.
    The 'Type' will be "String".
    The 'Owner' will be blank.
    The 'Array' will be blank, and
    The 'Default' will be 'NULL'.
    5. On the 'Type' value ("String"), click on the value "String". This will bring up a pop-up list.
    6. From this list, select "Data Type..."
    7. Now click once anywhere in the "Edit Event" window. This will bring up a "Common Data Types" window.
    8. Scroll down, find and highlight the the name "OAIHeader". Press 'OK'
    9. Now back in the 'Edit Event' window, you will notice that the type is "OAIHeader".
    10. Now give the "Name" (currently still blank) a value. Give it the name "OAIHeader" too.
    11. Press 'OK'
    12. You will now see that the Event now has "OAIHeader" information. Some of these values will be of interest and of use later.
    The actual values for "EventName, EventVersion" etc. will be added to the data of the message at Runtime.
    *** TIP: I always do the above exercise first for every Business Object event I create. Once I've included the 'OAIHeader', I then add all of the actual other message attributes to the message afterwards. ***
    Create Content Based Routing Rules
    In this example, I am going to route a message from a sending DB Adapter (DBAPP1) to the Workflow Adapter (WORKFLOW). Then once the message has been passed to the Workflow, it will be passed to the receiving DB Adapter (DBAPP2).
    1. In iStudio, under the "Design" tab, expand the "Enabling Infrastructure".
    2. Under "Content Based Routing", find your Business Object.
    e.g. MY_BO
    3. Expand the Business Object, and then expand the "Events" to find your event.
    e.g. MY_EVENT
    4. On the Event (MY_EVENT), highlight it, then right mouse click. Choose Edit.
    5. A window will pop-up called "Content Based Routing: MY_EVENT"
    6. Hit the "New" button.
    7. Expand the message structure (MY_EVENT), and find the 'OAIHeader' node.
    8. Expand the "OAIHeader" node, and select (highlight) the "SendingApplication" attribute.
    9. Press 'Next'. This will move you onto the next screen.
    10. From the drop-down list, choose the "==" Operator. Press 'Next'.
    11. Enter a Value in the box. Since my sending application is "DBAPP1", type in "DBAPP1". Press Next.
    12. Since I have completed the "source" CBR rules, check the "Condition Complete" radio button, and Press 'Next'.
    13. Now in the next screen, select "WORKFLOW". Now press 'Finish'.
    Perform the same as above, this time routing the message from the "WORKFLOW" adapter to your receiving adapter (e.g. 'DBAPP2'). If the Workflow message does not have the 'OAIHeader' information in it's structure, once again refer to the above and add it in.
    Once you have completed all of your CBR configuration, use "File > Push Metadata" to send this new message structure and CBR rules to your adapters (DBAPP1, WORKFLOW and DBAPP2).
    HTH,
    Yan

  • Windows 8.1 Event ID 10016 "not responding"

    I have windows 8.1 and have installed firefox, the latest version. Once I try to launch it I get the blank firefox window and at the top bar it says "not responding". I have installed and uninstalled and rebooted etc...
    I am getting Event ID 10016 in Event Logs in SYSTEM -
    full error message is
    The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
    {C2F03A33-21F5-47FA-B4BB-156362A2F239}
    and APPID
    {316CDED5-E4AE-4B15-9113-7055D84DCC97}
    to the user NT AUTHORITY\LOCAL SERVICE SID (S-1-5-19) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
    repeatedly. The CLSID points to the Immersive shell in component services.

    Changed settings in the DCOM permissions for this following an article http://answers.microsoft.com/en-us/windows/forum/windows8_1-performance/error-event-id-10016-distributedcom/130522d2-beac-4495-980a-65e1e3279901
    I have gotten rid of the 10016 but the error continues of the "not responding" .
    I get an error in the application log - see below -
    Event ID 1002 - Application Hang
    The program firefox.exe version 26.0.0.5087 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
    Process ID: b40
    Start Time: 01cf0a4447c430e6
    Termination Time: 85
    Application Path: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
    Report Id: 92796868-7637-11e3-bea8-281878cf2078
    Faulting package full name:
    Faulting package-relative application ID:

Maybe you are looking for