jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

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

jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
I have an Ardor3D project which I'm upgrading from Jogl 1 to Jogl 2.
For the Local standalone application the upgrade was successful. But for the webstart version I get this error:

java.lang.UnsatisfiedLinkError: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1(Ljava/lang/String;J)J
        at jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1(Native Method)
        at jogamp.opengl.windows.wgl.WGL.wglGetProcAddress(WGL.java:276)
        at jogamp.opengl.windows.wgl.WindowsWGLDynamicLibraryBundleInfo.toolGetProcAddress(WindowsWGLDynamicLibraryBundleInfo.java:57)
        at com.jogamp.common.os.DynamicLibraryBundle.toolDynamicLookupFunction(DynamicLibraryBundle.java:349)
        at com.jogamp.common.os.DynamicLibraryBundle.dynamicLookupFunction(DynamicLibraryBundle.java:376)
        at com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver.resolve(GLProcAddressResolver.java:53)
        at com.jogamp.gluegen.runtime.ProcAddressTable.setEntry(ProcAddressTable.java:151)
        at com.jogamp.gluegen.runtime.ProcAddressTable.reset(ProcAddressTable.java:127)
        at jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory.<init>(WindowsWGLDrawableFactory.java:104)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:171)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:193)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:213)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:235)
        at javax.media.opengl.GLDrawableFactory.initSingletonImpl(GLDrawableFactory.java:157)
        at javax.media.opengl.GLDrawableFactory.initSingleton(GLDrawableFactory.java:122)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1413)
        at javax.media.opengl.GLProfile.access$100(GLProfile.java:76)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:174)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:140)
        at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1887)
        at javax.media.opengl.GLProfile.get(GLProfile.java:818)
        at javax.media.opengl.GLProfile.get(GLProfile.java:847)
        at javax.media.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:653)
        at com.ardor3d.framework.jogl.CapsUtil.getCapsForSettings(CapsUtil.java:34)
        at com.ardor3d.framework.jogl.JoglAwtCanvas.<init>(JoglAwtCanvas.java:38)
        at org.concord.energy3d.scene.SceneManager.<init>(SceneManager.java:210)
        at org.concord.energy3d.scene.SceneManager.<clinit>(SceneManager.java:152)
        at org.concord.energy3d.MainApplication.main(MainApplication.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.javaws.Launcher.executeApplication(Unknown Source)
        at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)


The above seem to happen after loading OpenGL32.dll:

JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library OpenGL32.dll
#### Java Web Start Error:
#### java.lang.UnsatisfiedLinkError: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1(Ljava/lang/String;J)J

Is this because it can't find OpenGL32.dll? or OpenGL32.dll somehow doesn't have dispatch_wglGetProcAddress1 method.
I'm running this under Java 64bits by the way.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

gouessej
Administrator
Hi

I'm going to run my game under Windows 32 bits if possible, maybe today. I will try to see whether I reproduce your bug.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
There is no need for that because I already tested your game and it runs fine in my windows machine.

I just don't understand why my program doesn't run and throws that exception! Do you have any suggestions on how to to proceed with debugging it?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

gouessej
Administrator
Try to use the same JARs and compare your JNLP file with mine.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
wow it just worked!
Yesterday I used the jnlp of the Gears demo which runs fine in my windows machine but it didn't work for my project. (Would get stuck when loading OpenGL32.dll)

Today I tried the same thing and it worked this time! Did you change something today or last night?

Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

Sven Gothel
Administrator
On 11/06/2012 05:23 PM, runiter [via jogamp] wrote:
> wow it just worked!
> Yesterday I used the jnlp of the Gears demo which runs fine in my windows
> machine but it didn't work for my project. (Would get stuck when loading
> OpenGL32.dll)
>
> Today I tried the same thing and it worked this time! Did you change something
> today or last night?
>

Not last night, nope - but .. Thursday/Friday we released RC11.

It could have been that your JNLP and/or Applet JAR cache was 'corrupt' or
something.

~Sven



signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

gouessej
Administrator
In reply to this post by runiter
Maybe you pointed to the wrong JARs in your JNLP file or maybe those in /deployment/webstart/ were not up to date.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

Sven Gothel
Administrator
On 11/06/2012 07:44 PM, gouessej [via jogamp] wrote:
> Maybe you pointed to the wrong JARs in your JNLP file or maybe those in
> /deployment/webstart/ were not up to date.

Yes they are all symbolic links, see
  <http://forum.jogamp.org/JOAL-Couln-t-load-native-AL-library-tp4026603p4026797.html>

In general
  webstart == jogamp-current
  webstart-next == jogamp-next

As described here:

http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases#Current_Aliases

~Sven



signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
I have a different problem now.

I downloaded the following jar file:

http://jogamp.org/deployment/jogamp-current/jar/jogl-all.jar

But if I double click it, java tells me that it's corrupt.

If I tries to extract it using winRar, it give the following error msg:

jogl-all.jar: The archive is either in unknown format or damaged

any ideas why it would be working online but become corrupted as soon as I download it?!
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

Sven Gothel
Administrator
On 11/06/2012 10:32 PM, runiter [via jogamp] wrote:

> I have a different problem now.
>
> I download the following jar file:
>
> http://jogamp.org/deployment/jogamp-current/jar/jogl-all.jar
>
> But if I double click it, java tells me that it's corrupt.
>
> If I tries to extract it using winRar, it give the following error msg:
>
> jogl-all.jar: The archive is either in unknown format or damaged
>
> any ideas why it would be working online but become corrupted as soon as I
> download it?!
it's not corrupt but in a diff. format :)

So you may try 'wget' or 'curl' and you will receive the JAR file.

Upon further inspection you may notice it's gzipped/pack200'ed
when downloading it via the web-browser.

I answered this a few times .. well, guess we shall put this in our Wiki/FAQ.

~Sven



signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
Thanks for the quick reply Sven.
I have to ask, why not just use the standard jar packaging? does the small reduction in file size really worth the headache for us users who just want to get your library up and running asap? If I may I like to vote to have jogl-all.jar package using standard format.

I tried to extract it using wget and curl and unfortunately both of these software seem to not have GUI option and require some complex command line codes that I couldn't figure out in the 15 minutes that I spent on it even though I'm an experienced programmer.

Could you please make post the standard format (format that can be open with java jar) jogl-all.jar somewhere so I can download it?

Thanks very much.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
If you're curious why I need jogl-all.jar, in order to figure out why I'm get exception in post #1 I decided to link to gears demo jnlp which worked great. Now as the next step I download the following:

jogl-all-awt.jnlp
jar/jogl-all.jar
jar/jogl-all-natives-windows-amd64.jar

and modified jogl-all-awt.jnlp so that it uses the local jogl-all.jar which I downloaded.
Java webstart seem to find my jogl-all.jar and download it but then throws exception that it can't find its classes:

java.lang.ClassNotFoundException: javax.media.opengl.awt.GLCanvas
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.concord.energy3d.scene.SceneManager.<init>(SceneManager.java:210)
        at org.concord.energy3d.scene.SceneManager.<clinit>(SceneManager.java:152)
        at org.concord.energy3d.MainApplication.main(MainApplication.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.javaws.Launcher.executeApplication(Unknown Source)
        at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

Sven Gothel
Administrator
In reply to this post by runiter
On 11/07/2012 09:00 PM, runiter [via jogamp] wrote:
> Thanks for the quick reply Sven.
> I have to ask, why not just use the standard jar packaging? does the small
> reduction in file size really worth the headache for us users who just want to
> get your library up and running asap? If I may I like to vote to have
> jogl-all.jar package using standard format.

We do follow the standard in deployment:
  <http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/pack200.html>
  <http://www.thrysoee.dk/pack200/>

>
> I tried to extract it using wget and curl and unfortunately both of these
> software seem to not have GUI option and require some complex command line
> codes that I couldn't figure out in the 15 minutes that I spent on it even
> though I'm an experienced programmer.
Well, sorry to say - but that is how it is.

>
> Could you please make post the standard format (format that can be open with
> java jar) jogl-all.jar somewhere so I can download it?

Go to subdir archives <http://jogamp.org/deployment/jogamp-current/archive>,
where you will find all unsigned JARs in one 7z archive:
  <http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z>

You can sign them yourself if you like.

BTW .. the jogamp-all-platforms.7z is the proposed way to go for development.

~Sven



signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
Yes I found all the unsigned jars in that url. Thank you very much.

So after I extracted the files and put them in my folder and tried to run the jnlp it naturally complained that the jars were not signed. So then I signed the jar files but now I get the following exception when I run my jnlp:

java.lang.SecurityException: Illegal Access - prefix jogl., with cert class class jogamp.opengl.Debug
        at com.jogamp.common.util.PropertyAccess.addTrustedPrefix(PropertyAccess.java:55)
        at jogamp.opengl.Debug.<clinit>(Debug.java:52)
        at javax.media.opengl.awt.GLCanvas.<clinit>(GLCanvas.java:154)
        at org.concord.energy3d.scene.SceneManager.<init>(SceneManager.java:210)
        at org.concord.energy3d.scene.SceneManager.<clinit>(SceneManager.java:152)
        at org.concord.energy3d.MainApplication.main(MainApplication.java:27)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.javaws.Launcher.executeApplication(Unknown Source)
        at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Any idea what this exception mean?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

gouessej
Administrator
Do you really use the JARs extracted from the 7z archive? If you sign all JARs with the same certificate like me, it should work.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
I fixed it thank you.
The problem was that I thought I could let the jnlp use the local jogl files but use the remote gluegen jnlp hosted in your site.
Turned out I needed to download gluegen too and sign it.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogamp.opengl.windows.wgl.WGL.dispatch_wglGetProcAddress1

runiter
curious, I noticed that Jogl 1 only loaded 2 dll files:

JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library jogl_awt.dll

whereas Jogl 2 loads more:

JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library OpenGL32.dll
JNLPClassLoader: Finding library libGLESv1_CM.so.2.dll
JNLPClassLoader: Finding library libGLESv1_CM.so.dll
JNLPClassLoader: Finding library GLESv1_CM.dll
JNLPClassLoader: Finding library GLES_CM.dll
JNLPClassLoader: Finding library GLES_CL.dll
JNLPClassLoader: Finding library libGLESv1_CM.dll
JNLPClassLoader: Finding library libGLES_CM.dll
JNLPClassLoader: Finding library libGLES_CL.dll
JNLPClassLoader: Finding library libEGL.so.1.dll
JNLPClassLoader: Finding library libEGL.so.dll
JNLPClassLoader: Finding library EGL.dll
JNLPClassLoader: Finding library libEGL.dll
JNLPClassLoader: Finding library libGLESv2.so.2.dll
JNLPClassLoader: Finding library libGLESv2.so.dll
JNLPClassLoader: Finding library GLESv2.dll
JNLPClassLoader: Finding library GLES20.dll
JNLPClassLoader: Finding library GLESv2_CM.dll
JNLPClassLoader: Finding library libGLESv2.dll
JNLPClassLoader: Finding library libGLESv2_CM.dll
JNLPClassLoader: Finding library libGLES20.dll
JNLPClassLoader: Finding library libEGL.so.1.dll
JNLPClassLoader: Finding library libEGL.so.dll
JNLPClassLoader: Finding library EGL.dll
JNLPClassLoader: Finding library libEGL.dll

Are all these dlls really needed?
Jogl 2 seem to consume 20Kb more memory, I'm not sure if this is related to loading these dlls.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D