When running the code below, javaw.exe does not terminate on some environments. public static void main(String[] args) { GLProfile glpMinimal = GLProfile.get(GLProfile.GL2); } This can be reproduced on the below environment and is not an issue for everybody. It appears to be related to ATI type drivers. * Eclipse: Version: Kepler Service Release 1 Build id: 20130919-0819 * Win 7 64 bit * Java 1.7.0_51 64 * ATI Catalyst drivers (14.4) Some more info: I did some more digging and it seams the issues is when the function below in the JOGL API is called (seams some racing issue) : jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource protected final SharedResourceRunner.Resource getOrCreateSharedResource(AbstractGraphicsDevice device) { try { device = validateDevice(device); if( null != device) { return getOrCreateSharedResourceImpl( device ); } } catch (GLException gle) { if(DEBUG) { System.err.println("Catched Exception on thread "+getThreadName()); gle.printStackTrace(); } } return null; } If I replace the bold section with null, it will shutdown OK.
I Forgot to clarify the bold section. If "return getOrCreateSharedResourceImpl( device );" is replaced with "return null" javaw.exe will close.
I've tried to duplicate this on Windows 8 with nvidia drivers and eclipse 3.8.2, but I don't see the behavior. It looks like there's another user in the forum with this bug, I've asked him to enter his version info here to see if there's a pattern.
I can confirm that this happens for me as well, it is not limited to eclipse it does the same if you run it as a standalone app. I have tried this on two other computers with Nvidia graphics and it seems to work fine on those. Win 7 64 bit ATI Catalyst Drivers 14.4 Java 1.7.0_65 JOGL 2.1.5
My graphics card: AMD Radeon HD 5670
SharedResourceRunner stop() method is invoked by JMV shutdown hook and GLProfile/GLDrawableFactory.shutdown*(). It shall issue SharedResource.releaseSharedResource() for all implementations, e.g. X11/GLX and Windows/WGL. +++ Root cause is a GL driver thread keeping the process alive. +++ On X11/GLX we destroy the shared context and the shared drawable. On Windows/WGL we only destroy the shared drawable, knowing that destroying the shared context caused a driver bug in the past. Will enable the shared context destruction, which is the proper way.
(In reply to comment #5) > > +++ > > Root cause is a GL driver thread keeping the process alive. Confirmed for AMD Windows driver >= 14.4
b66b068b5c1c238ea702ba7e8ea0c8a1c47cfcf1 Enabling the SharedResource context destruction. Commiting this patch to see whether our jenkins builds won't crash due to previous experienced issues.
(In reply to comment #7) > b66b068b5c1c238ea702ba7e8ea0c8a1c47cfcf1 > Enabling the SharedResource context destruction. > > Commiting this patch to see whether our jenkins builds won't crash > due to previous experienced issues. All jenkins builds and tests passed, leaving this patch 'in', which hopefully fixes the AMD Windows driver bug. The latter is responsible for keeping the process alive if an 'off-thread' context is not being destroyed. 'off-thread' is mentioned, since we haven't tested with an 'on-thread' situation. Aggregated build here: <http://jogamp.org/deployment/archive/master/gluegen_813-joal_557-jogl_1325-jocl_996/> Test results from jenkins showing no regressions: <https://jogamp.org/chuck/view/fwd/job/jogl/1325/> I close this bug for now. If this change works and solves this issue, please confirm. If this changes does not solve this issue, PLEASE REOPEN!
(In reply to comment #8) > (In reply to comment #7) > > b66b068b5c1c238ea702ba7e8ea0c8a1c47cfcf1 > > Enabling the SharedResource context destruction. > > > > Commiting this patch to see whether our jenkins builds won't crash > > due to previous experienced issues. > > All jenkins builds and tests passed, > leaving this patch 'in', which hopefully fixes the AMD Windows driver bug. > > The latter is responsible for keeping the process alive > if an 'off-thread' context is not being destroyed. > > 'off-thread' is mentioned, since we haven't tested with an > 'on-thread' situation. > > Aggregated build here: > > <http://jogamp.org/deployment/archive/master/gluegen_813-joal_557-jogl_1325- > jocl_996/> > > Test results from jenkins showing no regressions: > <https://jogamp.org/chuck/view/fwd/job/jogl/1325/> > > I close this bug for now. > > If this change works and solves this issue, please confirm. > > If this changes does not solve this issue, > PLEASE REOPEN! It works and solves the issue for me