Closed EnricoScantamburlo closed 10 years ago
Thanks for the report, can you please report this information to the java3d at forum.jogamp.org, that will have a wider audience. Can you also provide the following:
Thanks,
Harvey
Enrico,
Could you provide some more details about what you are doing in your postrender method...you're triggering a resize of the Canvas3d in your method which causes the work to be done on the Renderer thread and not the AWT thread which leads to a deadlock in this case.
In particular, what does layoutColorMaps do in your app?
Harvey
Sorry for the tardiness, It was a colleague of mine who got the problem. jogl was rc10 for sure, and we are on the NetBeans platform, I have to ask him the other details. The layoutColorMaps takes a list of JComponents that represent color-scales, it changes their size and prints them on the screen using a J3DGraphics2D object
Thanks for the info, it would be great if you could try jogl2-rc11, or the latest aggregated build available at:
http://jogamp.org/deployment/archive/master/gluegen_656-joal_420-jogl_951-jocl_773/
Just in case that makes any difference and otherwise we'll go from there.
Cheers,
Harvey
Also, if you need to do any swing resizing/etc, don't do it directly in the postRender method, if you can, it would be safest to use SwingUtilities.invokeLater to ensure all of those actions happen on the swing event dispatch thread and not the Java3d render thread.
Harvey
Hi
Do you still reproduce this bug with Java3D 1.6 pre9 + JOGL 2.1.4 RC? Have you followed Harvey's advise?
Sorry I had not the chance to test your patch, but we resolved the issue not using Swing JComponent methods in the postRender method.
@EnricoScantamburlo Thank you very much for the feedback.
@hharrison This bug report can be closed, can't it?
We were evaluating Java3D + JOGL and we found a deadlock that did not occur in the old Java3D 1.5.2 We use some Swing Components to print 2d stuff on the 3d Canvas this is the deadlock;
Found one Java-level deadlock:
"AWT-EventQueue-1": waiting for ownable synchronizer 0x000000068ec7a388, (a java.util.concurrent.locks.ReentrantLock$NonfairSync), which is held by "J3D-Renderer-1" "J3D-Renderer-1": waiting to lock monitor 0x00002aaab0003d98 (object 0x000000068ecd3dc8, a java.awt.Component$AWTTreeLock), which is held by "AWT-EventQueue-1"
Java stack information for the threads listed above:
"AWT-EventQueue-1": at sun.misc.Unsafe.park(Native Method)
Found 1 deadlock.
Thanks for your hard work!