Hey, I’m using a JOGL GLCanvas along with a few swing components (mainly just panels and labels). Every frame I’m rendering the canvas and updating the text of 4 different JLabels. I have a sleep in of 50 ms. I’m not rendering many polygons – less than 500 in total, and I’m not doing any intensive calculations every frame. The problem is, my program locks up for 2-6 seconds frequently (2-3 times per minute). During this time, the canvas stops rendering and the program stops responding to mouse input.
The lockups occur whenever they want – sometimes it’s right in the middle of the canvas rendering (ie, the background will render but it will freeze before the foreground details finish rendering). I’ve turned on verbose garbage collecting, and the GC does not correspond to when the pauses occur. Anyone have any ideas what may be causing these frequent lockups?
In addition, the program locks up for several seconds whenever I try to resize or move the window – I think this has to do with the JOGL canvas resizing perhaps? Is this supposed to happen when you try to move a JOGL canvas?