Java internal error encountered

D

dominic

Hi all,

I have an application which is quite large (I think), that involve a
GLCavnas (via GL4Java), some Swing menus, pop up dialogs and progress bars.
Now I'm working at a part where a large task is being done in a thread, at
the same time the canvas keeps rendering, and the progress bar is showing
information about the task (so there should be three threads here).

This task is done successfully. Afterwards I tried to do the same task
again with different data, and this time it gave me strange result (some
other class of my application is called). And then, when I click on
somewhere else, I found the following error messages:

java.lang.InternalError: Message not posted, native event queue may be full.
at sun.awt.windows.WComponentPeer.nativeHandleEvent(Native Method)
at
sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:268)
at java.awt.Component.dispatchEventImpl(Component.java:3699)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:197)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

The program is still running this time, not crashed. And I can perform that
task again successfully, without that exception! I thought this was just
occation exception, but I encountered this a few times during this two days.
So I suspect is there any problem in my code.

Initially I guess I am placing too much events into the java event queue
(guessing what the error message means). Is this so? And if yes, could
anyone give me some hints on fixing this problem? Thank you!

--
 
J

John C. Bollinger

dominic said:
Hi all,

I have an application which is quite large (I think), that involve a
GLCavnas (via GL4Java), some Swing menus, pop up dialogs and progress bars.
Now I'm working at a part where a large task is being done in a thread, at
the same time the canvas keeps rendering, and the progress bar is showing
information about the task (so there should be three threads here).

This task is done successfully. Afterwards I tried to do the same task
again with different data, and this time it gave me strange result (some
other class of my application is called). And then, when I click on
somewhere else, I found the following error messages:

java.lang.InternalError: Message not posted, native event queue may be full.
at sun.awt.windows.WComponentPeer.nativeHandleEvent(Native Method)
at
sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:268)
at java.awt.Component.dispatchEventImpl(Component.java:3699)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:197)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

The program is still running this time, not crashed. And I can perform that
task again successfully, without that exception! I thought this was just
occation exception, but I encountered this a few times during this two days.
So I suspect is there any problem in my code.

Initially I guess I am placing too much events into the java event queue
(guessing what the error message means). Is this so? And if yes, could
anyone give me some hints on fixing this problem? Thank you!

Observe the part about "native event queue" in the error message. This
is not about Swing (directly, at least). Some component of your
application is not playing nicely with the binding between JVM and
native OS support. Chances are that you are managing to generate
OS-level events faster than the OS can consume them, and eventually
filling up its queue. Observation of this problem could easily depend
on the data being used, user interaction, and on other programs running
at the same time on the system. The general solution is to either
generate fewer native events or give the OS more time to handle them.
I'm afraid I cannot give you specifics on how to implement that in your
particular program.


John Bollinger
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top