Re: J3D+JOGL make a Win64 app freeze for 1 minute
Posted by philjord on May 31, 2016; 9:00am
URL: https://forum.jogamp.org/J3D-JOGL-make-a-Win64-app-freeze-for-1-minute-tp4036762p4036764.html
Larry,
I only know about the JAva3D side of things properly, but generally Java3D works very hard to do all of it's work on it's own threads (the J3d-Renderer thread mainly).
In order to help you out I'll really need a minimal reproduction of the issue (and generally more information about when it pauses).
Some information which might help you close in on this issue:
VirtualUniverse has some static code that calls MasterControl.loadLibraries and other work that could conceivably access disk and generally have a slow down.
So any line you have that does a new of VirtualUniverse or it's subclasses should be checked for problems.
Canvas3d.addNotify hands it's work off to the Renderer thread generally, might is a good candidate for problems.
This is called on the event thread automatically when you add the Canvas3D to a visible parent container, so try testing the addition of Canvas3D to it's parent for performance issues.
Finally Canvas3D methods often interact with teh renderer thread so thread synchronization issue might cause pauses, try cutting out or timing calls to
paint(Graphics g)
getGraphicsContext3D()
getGraphics2D()
waitForOffScreenRendering()
doSwap()
If in your code you subclass any of these methods, ensure you are not synchronizing with any other threads
preRender()
postRender()
postSwap()
renderField(int fieldDesc)
These are just some ideas for trying to cut down the code and give a reproducible example, which is where people on this forum will be able to help.
Thanks,
Phil.