I'm having issues with long load times with my JOGL application. Everything worked fine until yesterday, when canvas initialization suddenly started taking whole minute. The culprit is somewhere inside of native Platform.initSingleton() call.
Following code in clean class
System.out.println("Start");
long t0 = System.currentTimeMillis();
AbstractGraphicsDevice device = GLProfile.getDefaultDevice();
long t1 = System.currentTimeMillis();
System.out.println((t1 - t0) + "ms " + device);
GLProfile profile = GLProfile.getDefault(device);
long t2 = System.currentTimeMillis();
System.out.println((t2 - t1) + "ms " + profile);
GLCapabilities capabilities = new GLCapabilities(profile);
long t3 = System.currentTimeMillis();
System.out.println((t3 - t2) + "ms " + capabilities);
System.out.println("Java version "+System.getProperty("java.version"));
will produce
61467ms WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x59b9040a]]
0ms GLProfile[GL4bc/GL4bc.hw]
0ms GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
Java version 1.8.0_102 / 1.8.0_121 / 1.8.0_152
I tried
- running at different computers with similar specs (works over there just fine)
- debug to find more specific place inside of the call, but got stuck at native call to Platform.initSingleton()
- run Platform.initSingleton() with -Djogamp.debug=ALL (see below)
- checked all libraries to be same as on working machines
- updating JDK and JRE to newest version
- reinstalling JDK and JRE to older version
- updating windows
- updating graphics driver to newest
- reinstalling (clean) graphics driver to version with which it is working elsewhere
- according to windows update history were installed KB4038788, KB890830, and KB4038806, none hint they could be the reason
- firewall does not seem to be blocking any system calls (off just to be sure)
- windows defender off to be sure
- compiling the test code into jar and running it from command line
It seems from debug prints, that the problem is somewhere in here
IOUtil.testDirExec(): test-exe <C:\Users\User\AppData\Local\Temp\jogamp_exe_tst3558906654350516679.exe>, existingFile false, returned 0
IOUtil.testDirExec(): abs-path <C:\Users\User\AppData\Local\Temp>: res 0 -> true
IOUtil.testDirExec(): total 30033ms, create 16ms, fill 0ms, execute 30017ms
IOUtil.testDirImpl(tempX1): <C:\Users\User\AppData\Local\Temp>, create true, exec true: true
IOUtil.testDirExec(): test-exe <C:\Users\User\AppData\Local\Temp\jogamp_0000\jogamp_exe_tst3791240964894525069.exe>, existingFile false, returned 0
IOUtil.testDirExec(): abs-path <C:\Users\User\AppData\Local\Temp\jogamp_0000>: res 0 -> true
IOUtil.testDirExec(): total 30016ms, create 0ms, fill 0ms, execute 30016ms
I'm running out of ideas, and I'm not exactly fond of the idea of reinstalling my whole system just to get back up, possibly encountering it again.
Any idea, experiences with that might cause this? What I find the most interesting is, that it eventually works, and initialization process is just delayed.
Using oracle JDK 1.8.0_102 / 1.8.0_121 / 1.8.0_152 (same on all, 121 worked a couple days ago) Tried drivers 388.13x64 (newest) and 385.69x64 (works on different machine)
Edit: Machine where it does not work has GTX 1070, one where it works GTX 960.