SWT and LWJGL bug

Started by rgrzywinski, September 01, 2004, 14:57:53

Previous topic - Next topic

rgrzywinski

There is an Eclipse 3.0, LWJGL (I don't think the version matters per se but specifically it occurs in 0.9a) and my SWT context interaction that exhibits an exception on shutdown.

The bug can be seen here:

 https://bugs.eclipse.org/bugs/show_bug.cgi?id=73059

I present this here in case anyone else runs into the problem.

At this time the work around is to place the following code into a location that is guaranteed to be called before shutdown:

// NOTE:  this is an Eclipse hack necessary so that a ClassDefNotFound
//        does not occur from org.lwjgl.Sys.run()'s shutdown hook.  This
//        forces all classes that are in the shutdown hook to be loaded
//        before shutdown.
Display.getVersion();
Keyboard.isCreated();
Mouse.isCreated();
Controller.isCreated();


This will guarantee that the classes are loaded before they are used in the shutdown hook.

No changes to LWJGL are advocated at this time.

princec

Thanks, we'll look into making it a bit more robust in this area.

Cas :)