Summary: | GlueGen produces erroneous file URI on Windows, which breaks Netbeans's JarURLStreamHandler | ||
---|---|---|---|
Product: | Default | Reporter: | andreas_hauffe |
Component: | default | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | critical | ||
Priority: | --- | ||
Version: | unspecified | ||
Hardware: | pc_x86_64 | ||
OS: | windows | ||
Type: | --- | SCM Refs: |
c9093e491d4b78b12973ec1614bf3146fce26a83
|
Workaround: | --- | ||
Bug Depends on: | 757, 820 | ||
Bug Blocks: | 683 | ||
Attachments: | Test result: JOGL vs Netbeans |
The example was to large, so here is a link for the example: http://bugs.elamx.de/attachments/download/1/joglbug.zip (In reply to comment #1) > The example was to large, so here is a link for the example: > > http://bugs.elamx.de/attachments/download/1/joglbug.zip It surely would have been better to supply a small test case w/o any IDE dependencies .. oh well :) [And yes, please don't attach MBs of blobs to our poor bugzilla :] Please attach a test log (stderr and stdout redirected to a file, see Wiki/FAQ) with the debug property jogamp.debug=all set, i.e. -Djogamp.debug=all This shall validate my local test here which I perform now .. after installing latest NB .. etc etc tested w/ NB 7.4 - Linux: works - Windows: error as described below .. hence confirmed. I have to say, I don't really understand this project (me not an NB expert) and I do have troubles debugging it. Will cont. looking at it for a while .. Solved the mystery .. why it works w/ plain JOGL, but not w/ NB. The NB JarURLStreamHandler doesn't seem to like backslashes .. and erroneous windows file URI-parts, i.e. w/o a leading slash etc. at org.netbeans.JarClassLoader$JarURLStreamHandler.openConnection(JarClassLoader.java:980) Note to myself: READ THE STACKTRACE :) Remedy: encode file-path to proper URI on OS, where filepath-separator is not SLASH (e.g. Windows) and add a leading slash. ++++ Plain JOGL Test: IOUtil.toURL.0: isJAR true, hasSubURI true , uri jar:file:/D:/projects/jogamp/gluegen/build-win64/gluegen-rt-natives-windows-amd64.jar!/ -> file:/D:/projects/jogamp/gluegen/build-win64/gluegen-rt-natives-windows-amd64.jar IOUtil.toURL.2: jarEntry / , post !/ -> jar:file:D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar!/ IOUtil.toURL.X: mode 2, jar:file:/D:/projects/jogamp/gluegen/build-win64/gluegen-rt-natives-windows-amd64.jar!/ -> jar:file:D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar!/ getJarFile.1: jar:file:D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar!/ getJarFile res: D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar TempJarCache: addNativeLibs: jar:file:/D:/projects/jogamp/gluegen/build-win64/gluegen-rt-natives-windows-amd64.jar!/: nativeJar D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar (NEW) TempJarCache: validateCertificates: OK - No rootCerts in given class com.jogamp.common.os.Platform, nativeJar D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar JarUtil: extract: D:\projects\jogamp\gluegen\build-win64\gluegen-rt-natives-windows-amd64.jar -> C:\cygwin\tmp\jogamp_0000\file_cache\jln5782375957330586710\jln3154502003263786912, extractNativeLibraries true (null), extractClassFiles false, extractOtherFiles false ++++ NB Test: IOUtil.toURL.0: isJAR true, hasSubURI true , uri jar:file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/gluegen-rt-natives-windows-amd64.jar!/ -> file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/gluegen-rt-natives-windows-amd64.jar IOUtil.toURL.2: jarEntry / , post !/ -> jar:file:D:\projects\jogamp\jogl-bugs\857\joglbug\build\cluster\modules\ext\gluegen-rt-natives-windows-amd64.jar!/ getJarFile.1: jar:file:D:\projects\jogamp\jogl-bugs\857\joglbug\build\cluster\modules\ext\gluegen-rt-natives-windows-amd64.jar!/ IOUtil.toURL.X: mode 2, jar:file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/gluegen-rt-natives-windows-amd64.jar!/ -> jar:file:D:\projects\jogamp\jogl-bugs\857\joglbug\build\cluster\modules\ext\gluegen-rt-natives-windows-amd64.jar!/ Catched IOException: java.net.URISyntaxException: Illegal character in opaque part at index 7: file:D:\projects\jogamp\jogl-bugs\857\joglbug\build\cluster\modules\ext\gluegen-rt-natives-windows-amd64.jar, while addNativeJarLibsImpl(classFromJavaJar class com.jogamp.common.os.Platform, classJarURI jar:file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/gluegen-rt.jar!/com/jogamp/common/os/Platform.class, nativeJarBaseName gluegen-rt-natives-windows-amd64.jar): [ file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/gluegen-rt.jar -> file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/ ] + gluegen-rt-natives-windows-amd64.jar -> slim: jar:file:/D:/projects/jogamp/jogl-bugs/857/joglbug/build/cluster/modules/ext/gluegen-rt-natives-windows-amd64.jar!/ java.io.IOException: java.net.URISyntaxException: Illegal character in opaque part at index 7: file:D:\projects\jogamp\jogl-bugs\857\joglbug\build\cluster\modules\ext\gluegen-rt-natives-windows-amd64.jar at org.netbeans.JarClassLoader$JarURLStreamHandler.openConnection(JarClassLoader.java:980) at org.netbeans.JarClassLoader$JarURLStreamHandler.openConnection(JarClassLoader.java:932) at java.net.URL.openConnection(URL.java:971) at com.jogamp.common.util.JarUtil.getJarFile(JarUtil.java:459) at com.jogamp.common.util.cache.TempJarCache.addNativeLibs(TempJarCache.java:211) Created attachment 520 [details]
Test result: JOGL vs Netbeans
UnsatisfiedLinkError since JOGL 2.0.2 RC12 when using JOGL in Netbeans RCP applications - 'URL IOUtil.toURL(URI)' - Needs to encode the file-path portion on Windows(*) if exists. The file-path here shall only be encoded as follows: - backslash -> slash - ensure starting with slash (*) We perform above action for all OS, if 'false == File.separator.equals("/")' - Added high verbosity in DEBUG mode to easy debugging for future cases .. - Cleanup URI/URL unit tests, i.e. split URLCompositionTest into: - TestIOUtilURICompose - TestIOUtilURIHandling (Now covers Bug 857 as well) - TestUrisWithAssetHandler - TestURIQueryProps Tested all unit tests manually on GNU/Linux and Windows w/ JRE 7u45 Great!!! I checked in my Application and it works. Thank you very much! Now I can switch to a non-RC Version of JOGL. |
When using JOGL inside a netbeans RCP application there is a UnsatisfiedLinkError so that jogl is not working. ------------------------------------------------------------------------------- >Log Session: Friday, October 11, 2013 1:42:37 PM CEST >System Info: Product Version = joglbug 201309162201 Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.7.0_40-b43 Java Home = C:\Program Files\Java\jre7 System Locale; Encoding = de_DE (joglbug); Cp1252 Home Directory = C:\Users\hauffe Current Directory = H:\NetBeansProjects\joglbug\dist\joglbug User Directory = C:\Users\hauffe\AppData\Roaming\.joglbug\dev Cache Directory = C:\Users\hauffe\AppData\Roaming\.joglbug\dev\var\cache Installation = H:\NetBeansProjects\joglbug\dist\joglbug\joglbug H:\NetBeansProjects\joglbug\dist\joglbug\platform Boot & Ext. Classpath = C:\Program Files\Java\jre7\lib\resources.jar;C:\Program Files\Java\jre7\lib\rt.jar;C:\Program Files\Java\jre7\lib\sunrsasign.jar;C:\Program Files\Java\jre7\lib\jsse.jar;C:\Program Files\Java\jre7\lib\jce.jar;C:\Program Files\Java\jre7\lib\charsets.jar;C:\Program Files\Java\jre7\lib\jfr.jar;C:\Program Files\Java\jre7\classes;C:\Program Files\Java\jre7\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jre7\lib\ext\dnsns.jar;C:\Program Files\Java\jre7\lib\ext\jaccess.jar;C:\Program Files\Java\jre7\lib\ext\localedata.jar;C:\Program Files\Java\jre7\lib\ext\sunec.jar;C:\Program Files\Java\jre7\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jre7\lib\ext\sunmscapi.jar;C:\Program Files\Java\jre7\lib\ext\zipfs.jar Application Classpath = H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\org-openide-util-lookup.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\org-openide-util.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\boot.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\org-openide-modules.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-modules_pt_BR.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util-lookup_ru.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-modules_ru.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util-lookup_ja.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-modules_zh_CN.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util_zh_CN.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\boot_ja.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util-lookup_pt_BR.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\boot_ru.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-modules_ja.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util_pt_BR.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util_ja.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\org-openide-util_ru.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\boot_zh_CN.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\lib\locale\boot_pt_BR.jar Startup Classpath = H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\org-openide-filesystems.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\core.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\core_ja.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\org-openide-filesystems_pt_BR.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\org-openide-filesystems_ja.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\core_zh_CN.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\org-openide-filesystems_ru.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\core_ru.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\core_pt_BR.jar;H:\NetBeansProjects\joglbug\dist\joglbug\platform\core\locale\org-openide-filesystems_zh_CN.jar;H:\NetBeansProjects\joglbug\dist\joglbug\joglbug\core\locale\core_joglbug.jar ------------------------------------------------------------------------------- 3D [dev] 1.6.0-pre8-daily-experimental daily SEVERE [org.netbeans.core.modules] java.lang.UnsatisfiedLinkError: Can't load library: H:\NetBeansProjects\joglbug\dist\joglbug\gluegen-rt.dll at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:548) at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64) at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:95) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:412) at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:387) at com.jogamp.common.os.Platform$1.run(Platform.java:202) at java.security.AccessController.doPrivileged(Native Method) at com.jogamp.common.os.Platform.<clinit>(Platform.java:173) at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:82) at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:90) at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:74) at java.security.AccessController.doPrivileged(Native Method) at jogamp.opengl.ThreadingImpl.<clinit>(ThreadingImpl.java:73) at javax.media.opengl.Threading.disableSingleThreading(Threading.java:138) at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:117) at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:91) at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:832) at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:274) at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:316) at java.awt.GraphicsDevice.getBestConfiguration(Unknown Source) at de.test.Installer.restored(Installer.java:30) at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:471) [catch] at org.netbeans.core.startup.NbInstaller.loadImpl(NbInstaller.java:394) at org.netbeans.core.startup.NbInstaller.access$000(NbInstaller.java:105) at org.netbeans.core.startup.NbInstaller$1.run(NbInstaller.java:346) at org.openide.filesystems.FileUtil$2.run(FileUtil.java:435) at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:127) at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:609) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:419) at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:439) at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:343) at org.netbeans.ModuleManager.enable(ModuleManager.java:1194) at org.netbeans.ModuleManager.enable(ModuleManager.java:1017) at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:340) at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276) at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:301) at org.netbeans.core.startup.Main.getModuleSystem(Main.java:181) at org.netbeans.core.startup.Main.getModuleSystem(Main.java:150) at org.netbeans.core.startup.Main.start(Main.java:307) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123) at java.lang.Thread.run(Unknown Source) INFO [org.netbeans.core.startup.NbEvents]: Turning on modules: org.openide.util.lookup [8.22.1 201309162201] org.openide.util [8.33.1 201309162201] org.openide.modules [7.39.1 201309162201] org.openide.filesystems [8.8.1 201309162201] org.netbeans.api.annotations.common/1 [1.21.1 201309162201] org.openide.awt [7.59.1 201309162201] org.netbeans.api.progress/1 [1.35.1 201309162201] org.openide.dialogs [7.32.1 201309162201] org.openide.nodes [7.36.1 201309162201] org.openide.windows [6.65.1 201309162201] org.netbeans.modules.editor.mimelookup/1 [1.33.1 201309162201] org.openide.text [6.58.1 201309162201] org.netbeans.swing.tabcontrol [1.46.1 201309162201] org.netbeans.swing.outline [1.27.1 201309162201] org.openide.explorer [6.53.1 201309162201] org.openide.actions [6.32.1 201309162201] org.netbeans.modules.queries/1 [1.36.1 201309162201] org.openide.loaders [7.51.1 201309162201] org.openide.io [1.42.1 201309162201] org.netbeans.swing.plaf [1.34.1 201309162201] org.netbeans.spi.quicksearch [1.20.1 201309162201] org.netbeans.bootstrap/1 [2.63.1 201309162201] org.netbeans.core.startup/1 [1.51.1 201309162201] org.netbeans.modules.settings/1 [1.42.1 201309162201] org.netbeans.modules.sampler [1.7.1 201309162201] org.netbeans.modules.progress.ui [1.26.1 201309162201] org.netbeans.modules.print [7.19.1 201309162201] org.netbeans.modules.keyring [1.17.1 201309162201] org.netbeans.core/2 [3.43.1 201309162201] org.netbeans.modules.options.api/1 [1.36.1 201309162201] org.netbeans.modules.options.keymap [1.28.1 201309162201] org.netbeans.modules.masterfs/2 [2.44.1 201309162201] org.netbeans.libs.jna/1 [1.31.1 201309162201] org.netbeans.modules.masterfs.windows [1.7.1 201309162201] org.netbeans.modules.keyring.fallback [1.1.1 201309162201] org.netbeans.modules.keyring.impl [1.14.1 201309162201] org.netbeans.modules.editor.mimelookup.impl/1 [1.24.1 201309162201] org.netbeans.libs.osgi [1.15.1 201309162201] org.netbeans.libs.jna.platform/1 [1.1.1 201309162201] org.netbeans.libs.felix [2.9.1 201309162201] org.netbeans.core.windows/2 [2.66.1 201309162201] org.netbeans.core.ui/1 [1.38.1 201309162201] org.netbeans.core.output2/1 [1.34.1 201309162201] org.netbeans.core.network [1.1.1 201309162201] org.netbeans.core.netigso [1.23.1 201309162201] org.netbeans.core.nativeaccess/1 [1.23.1 201309162201] org.netbeans.core.multitabs [1.3.3.1 1 201309162201] org.netbeans.core.io.ui/1 [1.23.1 201309162201] jogamp [1.0 131011] javax.j3d [1.0 131011] de.test [1.0 131011] Catched IOException: java.net.URISyntaxException: Illegal character in opaque part at index 7: file:H:\NetBeansProjects\joglbug\dist\joglbug\joglbug\modules\ext\gluegen-rt-natives-windows-amd64.jar, while addNativeJarLibsImpl(classFromJavaJar class com.jogamp.common.os.Platform, classJarURI jar:file:/H:/NetBeansProjects/joglbug/dist/joglbug/joglbug/modules/ext/gluegen-rt.jar!/com/jogamp/common/os/Platform.class, nativeJarBaseName gluegen-rt-natives-windows-amd64.jar): [ file:/H:/NetBeansProjects/joglbug/dist/joglbug/joglbug/modules/ext/gluegen-rt.jar -> file:/H:/NetBeansProjects/joglbug/dist/joglbug/joglbug/modules/ext/ ] + gluegen-rt-natives-windows-amd64.jar -> slim: jar:file:/H:/NetBeansProjects/joglbug/dist/joglbug/joglbug/modules/ext/gluegen-rt-natives-windows-amd64.jar!/ INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded. INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: direct INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy: falled to default (corect if direct mode went before) INFO [org.netbeans.ui.metrics.laf]: USG_LOOK_AND_FEEL Diagnostic information Input arguments: -Xms24m -Xmx64m -XX:MaxPermSize=384m -Dnetbeans.user.dir=H:\NetBeansProjects\joglbug\dist\joglbug\bin -Djdk.home=C:\Program Files\Java\jre7 -Dnetbeans.home=H:\NetBeansProjects\joglbug\dist\joglbug\platform -Dnetbeans.user=C:\Users\hauffe\AppData\Roaming\.joglbug\dev -Dnetbeans.default_userdir_root= -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\Users\hauffe\AppData\Roaming\.joglbug\dev\var\log\heapdump.hprof -Dsun.awt.keepWorkingSetOnMinimize=true -Dnetbeans.dirs=H:\NetBeansProjects\joglbug\dist\joglbug\joglbug exit Compiler: HotSpot 64-Bit Tiered Compilers Heap memory usage: initial 24,0MB maximum 57,0MB Non heap memory usage: initial 23,4MB maximum 432,0MB Garbage collector: PS Scavenge (Collections=14 Total time spent=0s) Garbage collector: PS MarkSweep (Collections=0 Total time spent=0s) Classes: loaded=4181 total loaded=4181 unloaded 0 INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 3.220.692.992 INFO [null]: Total physical memory 3.220.692.992 WARNING [org.netbeans.TopSecurityManager]: use of system property netbeans.home has been obsoleted in favor of InstalledFileLocator/Places at org.netbeans.Clusters.relativeDirsWithHome(Clusters.java:137)