jPCT - a 3d engine for Java > Bugs

AWTCanvas not updating when SwingThread is under heavy load.

(1/2) > >>

Mr_Chaos:
I have a strange problem, normally my program runs fine, but when the EDT thread in under heavy load the AWTCanvas freezes.

The SwingUI is updated, but the AWTCanvas is not.

Has anyone seen anything like this before ?


--- Code: ---    buffer.clear(frameBufferBGColor);
    world.renderScene(buffer);
    world.draw(buffer);
   
    buffer.update();
       
    buffer.displayGLOnly();
   
   _canvas.repaint();


--- End code ---

EgonOlsen:
Not really. How exactly do you define "heavy load" for the EDT?

Mr_Chaos:

--- Quote from: EgonOlsen on August 08, 2017, 05:16:54 pm ---Not really. How exactly do you define "heavy load" for the EDT?

--- End quote ---

That's a good question, we have a table (Jide) which is updated many times each second, and if we sort the table, suddenly the awtcanvas stops updating, but the Swing table still updates

EgonOlsen:
That's strange, because they should be in the same thread. Have you checked if they actually are? It is possible to work with different EDT's for different components (albeit that's a pain in the a... but some people won't listen...).

Or...maybe the table is sorted in the EDT, i.e. actually blocking it while doing the repaints by itself?

Mr_Chaos:

--- Quote from: EgonOlsen on August 09, 2017, 10:28:33 am ---That's strange, because they should be in the same thread. Have you checked if they actually are? It is possible to work with different EDT's for different components (albeit that's a pain in the a... but some people won't listen...).

Or...maybe the table is sorted in the EDT, i.e. actually blocking it while doing the repaints by itself?

--- End quote ---

It's very strange, because all other swing components also still update (we have a JTextField with the current time, and it updates fine).

Any idea how I could debug it ?

Navigation

[0] Message Index

[#] Next page

Go to full version