Hello, I use a frame full screen, which receive mouse events for the game. The problem is that the frame is frequently not advised , and I lose many events before they can reach my code. I work with W2000, with a WACOM mouse. I reduced the computing time to check if System was not overbooked, without success.

hello.I seem to have somewhat the same problems.I have an application using j3d that sometimes does not receive buttonup or mouseup events. i'll have to take time to investigate, but i'm thinking that events that occur during GC pauses are lost. (1.4.2 beta) this is new, i think. each time i get s slight pause or a glitch and i depress the keys at the same time, i don't get the event.Of course, it is not very predictible, and as soon as i'm convinced of the cause, i'll try to make a test case, but i doubt i'd be able to create a special program to reveal this. each time...Please check if the events you don't receive occur during GC pauses (if you can see them)By the way, what jdk release do you use?

I use 1.4.1_02.I have tried to rise to max the priority of awt_event queue. It didn't make any difference. I wonder how many tasks are to be crossed between the mouse detection (by polling or IT ?) and the message sending to awt event queue.

As I have tried with just the fullscreen jframe (to remove any other incidence) and dispose of graphics object at the end of paint, garbage should be very small crumbles.

Any way, I have try to disable it by writing -Xnoclassgc into launcher application params in JBuilder. As I am new to this ID, I am not sure to have tested it properly. If I have done it properly, the result is not making any progress. Is there another way to disable GC ?

You can't disable GC. You can only try to avoid creating too much garbage.

So what's garbage? - you may ask. It's the stuff you don't need anymore.

In C/C++ and a lot of other languages you have to allocate and deallocate memory for yourself. Sounds like fun - but it's a lot of work and usually it produces a lot of errors and so called "memory leaks" (if you forgot to delete/deallocate memory it's marked as "in use" and can't be used till the next reboot).

In Jave deallocation is done automatically by the GC. Unfortunately the whole world is stopped as long as the GC has something to do.

The only thing wich helps a bit is avoiding garbage where it's possible. You can create a "pool" of objects wich you reuse till the end of the program (Yes. Recycling avoids garbage ).

The GC kicks in every here and then... if there is a lot to do it will take awhile and if there's nothing to do you won't even notice it.

Well the loosing of events sounds quite seriously... that shouldn't happen ever :-/

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org