GraphicsConfiguration locks up program...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GraphicsConfiguration locks up program...

andrewk1972
My program loaded a basic OBJ model. It was working and displayed.
I then expanded it to allow a SWT file dialog to select the model to load.
I couldn't get it to work so I stripped it back (commented out) to back where I started to see what I had wrong...

However, I found that I can no longer display ANY model...!
Moreover, it appears the offending call is:
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();

In the Eclipse debugger, I execute this call but it simply locks up and the program is stuck!

Note that my Java3D demo program that simply lights up a couple of basic objects (no model) works fine. GraphicsConfiguration call is good.

I cleaned the project. No change.
I removed and -recreated the project. No change.

How did this get stuffed up? What am I missing?
Reply | Threaded
Open this post in threaded view
|

Re: GraphicsConfiguration locks up program...

gouessej
Administrator
Hello

Java3D uses AWT under the hood, mixing AWT and SWT can be challenging, it's not a bug in Java3D itself in my humble opinion, this kind of lock can occur with any API based on AWT and/or Swing. Are you familiar with Display.syncExec() and Display.asyncExec() in SWT? Please post a SSCCE (yes, the whole source code).
Julien Gouesse | Personal blog | Website