We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
OPenGL applets, woo. (Read 6048 times)
Re: OPenGL applets, woo.
Reply #15 - Apr 25th, 2006, 12:22pm
 
I'm having some wierd problems with opengl applets online too? running in a browser works perfectly when running it locally off my hard drive but as soon as I try running it on a remote server (exact same files) I get these errors listed in the java console:
java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file sun/java2d/opengl/OGLUtilities
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.opengl.impl.Java2D$2.run(Java2D.java:368)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.Java2D.getOGLUtilitiesIntField(Java2D.java:365)
at com.sun.opengl.impl.Java2D.<clinit>(Java2D.java:70)
at com.sun.opengl.impl.GLContextImpl.<init>(GLContextImpl.java:75)
at com.sun.opengl.impl.windows.WindowsGLContext.<init>(WindowsGLContext.java:77)
at com.sun.opengl.impl.windows.WindowsGLContext.<init>(WindowsGLContext.java:71)
at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.<init>(WindowsOnscreenGLCon
text.java:52)
at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.createContext(WindowsOnscr
eenGLDrawable.java:88)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:118)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:82)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:75)
at processing.opengl.PGraphicsGL.<init>(PGraphicsGL.java:116)
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 processing.core.PApplet.createGraphics(PApplet.java:981)
at processing.core.PApplet.createGraphics(PApplet.java:935)
at processing.core.PApplet.size(PApplet.java:849)
at processing.core.PApplet.size(PApplet.java:792)
at SketchPad.setup(SketchPad.java:64)
at processing.core.PApplet.handleDisplay(PApplet.java:1263)
at processing.core.PGraphics.requestDisplay(PGraphics.java:535)
at processing.core.PApplet.run(PApplet.java:1146)
at java.lang.Thread.run(Unknown Source)
Error while running applet.
java.lang.RuntimeException: Incompatible magic value 1008813135 in class file sun/java2d/opengl/OGLUtilities
at processing.core.PApplet.createGraphics(PApplet.java:998)
at processing.core.PApplet.createGraphics(PApplet.java:935)
at processing.core.PApplet.size(PApplet.java:849)
at processing.core.PApplet.size(PApplet.java:792)
at SketchPad.setup(SketchPad.java:64)
at processing.core.PApplet.handleDisplay(PApplet.java:1263)
at processing.core.PGraphics.requestDisplay(PGraphics.java:535)
at processing.core.PApplet.run(PApplet.java:1146)
at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException: Incompatible magic value 1008813135 in class file sun/java2d/opengl/OGLUtilities
at processing.core.PApplet.createGraphics(PApplet.java:998)
at processing.core.PApplet.createGraphics(PApplet.java:935)
at processing.core.PApplet.size(PApplet.java:849)
at processing.core.PApplet.size(PApplet.java:792)
at SketchPad.setup(SketchPad.java:64)
at processing.core.PApplet.handleDisplay(PApplet.java:1263)
at processing.core.PGraphics.requestDisplay(PGraphics.java:535)
at processing.core.PApplet.run(PApplet.java:1146)
at java.lang.Thread.run(Unknown Source)
Re: OPenGL applets, woo.
Reply #16 - Apr 25th, 2006, 3:34pm
 
opengl applets require java 1.4 to be installed, your browser might be using java 1.3 and causing the error.
Re: OPenGL applets, woo.
Reply #17 - Apr 25th, 2006, 5:10pm
 
Hi Ben,

I have made an opengl test app and uploaded here:
http://www.atomless.com/openglapplettester/applet/
it's simple as poss just with a class extending PApplet and the draw method sets the backround colour randomly.

I get the same error with this applet as with the applet I'm currently working on and both work perfectly locally in the same browser(firefox).

here is the java console output:

Java Plug-in 1.5.0_06
Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\james
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
java.lang.NoClassDefFoundError
at com.sun.opengl.impl.GLContextImpl.<init>(GLContextImpl.java:75)
at com.sun.opengl.impl.windows.WindowsGLContext.<init>(WindowsGLContext.java:77)
at com.sun.opengl.impl.windows.WindowsGLContext.<init>(WindowsGLContext.java:71)
at com.sun.opengl.impl.windows.WindowsOnscreenGLContext.<init>(WindowsOnscreenGLCon
text.java:52)
at com.sun.opengl.impl.windows.WindowsOnscreenGLDrawable.createContext(WindowsOnscr
eenGLDrawable.java:88)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:118)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:82)
at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:75)
at processing.opengl.PGraphicsGL.<init>(PGraphicsGL.java:116)
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 processing.core.PApplet.createGraphics(PApplet.java:981)
at processing.core.PApplet.createGraphics(PApplet.java:935)
at processing.core.PApplet.size(PApplet.java:849)
at processing.core.PApplet.size(PApplet.java:792)
at openglapplettester.setup(openglapplettester.java:16)
at processing.core.PApplet.handleDisplay(PApplet.java:1263)
at processing.core.PGraphics.requestDisplay(PGraphics.java:535)
at processing.core.PApplet.run(PApplet.java:1146)
at java.lang.Thread.run(Unknown Source)
Error while running applet.
java.lang.RuntimeException
at processing.core.PApplet.createGraphics(PApplet.java:998)
at processing.core.PApplet.createGraphics(PApplet.java:935)
at processing.core.PApplet.size(PApplet.java:849)
at processing.core.PApplet.size(PApplet.java:792)
at openglapplettester.setup(openglapplettester.java:16)
at processing.core.PApplet.handleDisplay(PApplet.java:1263)
at processing.core.PGraphics.requestDisplay(PGraphics.java:535)
at processing.core.PApplet.run(PApplet.java:1146)
at java.lang.Thread.run(Unknown Source)
java.lang.RuntimeException
at processing.core.PApplet.createGraphics(PApplet.java:998)
at processing.core.PApplet.createGraphics(PApplet.java:935)
at processing.core.PApplet.size(PApplet.java:849)
at processing.core.PApplet.size(PApplet.java:792)
at openglapplettester.setup(openglapplettester.java:16)
at processing.core.PApplet.handleDisplay(PApplet.java:1263)
at processing.core.PGraphics.requestDisplay(PGraphics.java:535)
at processing.core.PApplet.run(PApplet.java:1146)
at java.lang.Thread.run(Unknown Source)
Re: OPenGL applets, woo.
Reply #18 - Apr 25th, 2006, 7:47pm
 
that looks like you've installed an incompatible version of jogl somewhere on your machine.
Re: OPenGL applets, woo.
Reply #19 - Apr 25th, 2006, 7:58pm
 
thanks ben.

ok, I feared as much. So, if I uninstall my current java install and re-install the latest java from sun that should fix things right??
Re: OPenGL applets, woo.
Reply #20 - Apr 25th, 2006, 7:59pm
 
is it not kind of wierd that it works in a browser locally but not when run from a server?
Re: OPenGL applets, woo.
Reply #21 - Apr 25th, 2006, 10:14pm
 
actually that looks more like things are corrupt with the files on the server. perhaps your ftp/sftp client is screwing things up? like not sending some of the files as binary or some files as incomplete?
Re: OPenGL applets, woo.
Reply #22 - Jun 22nd, 2006, 6:45pm
 
I tried the OpenGL applet for the first time and got an error that said it was Unable to load libjogl.jnilib.

So, i tracked down a copy and added it to the applet folder, no luck.  Wondering what I did wrong.

-robert

Oh, Mac OSX 10.4.6, Java 1.4.2_09, exported out of Processing 115, and implemented the processingHacks changes to the html doc.

UPDATE ------------------------------
Oops, its an intel mac issue.  Works fine on my slightly older mac laptop.
Re: OPenGL applets, woo.
Reply #23 - Aug 7th, 2006, 9:17pm
 
I'm getting some strange errors from an OpenGL applet I've created & was wondering if anyone had similar experience and/or insight. While it runs fine on some machines/JVMs, it won't load at all on other, throwing the following Exception (the below from OSX, Java1.5)..
thanks much -dc


Java Plug-in 1.5.0_06
JRE 1.5.0_06 Java HotSpot(TM) Client VM
-----------------------------------------------------
java.lang.NullPointerExceptionat sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.ClassFormatError: Truncated class file
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.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)at sun.applet.AppletPanel.createApplet(Unknown Source)at sun.plugin.AppletViewer.createApplet(Unknown Source)at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-8"java.lang.NullPointerExceptionat sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerExceptionat sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Re: OPenGL applets, woo.
Reply #24 - Aug 7th, 2006, 9:21pm
 
I am having the same issue on intel macs -- does anyone have any insight or workaround ideas?
thanks, -dc

flight404 wrote on Jun 22nd, 2006, 6:45pm:
I tried the OpenGL applet for the first time and got an error that said it was Unable to load libjogl.jnilib.

So, i tracked down a copy and added it to the applet folder, no luck.  Wondering what I did wrong.

-robert

Oh, Mac OSX 10.4.6, Java 1.4.2_09, exported out of Processing 115, and implemented the processingHacks changes to the html doc.

UPDATE ------------------------------
Oops, its an intel mac issue.  Works fine on my slightly older mac laptop.

Re: OPenGL applets, woo.
Reply #25 - Aug 8th, 2006, 3:34am
 
i think there may be issues with the opengl stuff and intel macs in the most recent releases.. i think it'll be ironed out for 0116.
Re: OPenGL applets, woo.
Reply #26 - Oct 2nd, 2006, 3:17am
 
Exported an OpenGL applet with 0117 and get this error when I try to run it in the browser:

Code:

java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.sun.opengl.util.JOGLAppletLauncher.start(JOGLAppletLauncher.java:288)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Just looks like something isn't signed.

Also, the exporter looks for jogl-natives-linux.jar, rather than jogl-natives-linux-i586.jar, which is what the file is actually named. Renaming it fixed this problem, of course.
Re: OPenGL applets, woo.
Reply #27 - Oct 2nd, 2006, 3:21am
 
that looks like two things

1) is there a nightly build of the jogl code somewhere in your sketchbook or libraries directories? this would cause the error for the thing not being signed. did the security dialog come up saying "do you trust this code from sun?"

2) it looks like it's also an *older* version of jogl than what's shipped with processing 0117, because the naming for the jar files has changed with the more recent releases of jogl.

i'm not sure whether these are something wrong on your end or ours, but check on that stuff first.


edit: scratch that.. the version of jogl.jar that's included with 0117 is the wrong file. it's not signed, and may even be an earlier version. damn, that's annoying, i dunno how it was the wrong file. until the next release, you can download this file:

http://download.java.net/media/jogl/builds/archive/jsr-231-1.0.0/jogl-1_0_0-webstart.zip

and copy the jogl.jar from inside that .zip to opengl/library/jogl.jar. when you export, it'll work properly again.
Re: OPenGL applets, woo.
Reply #28 - Oct 2nd, 2006, 3:56am
 
I checked the naming in 0115 for the linux native and it does not have i568 in it. The version that is included with 0116 does, however.

Also, thank you for being so amazingly prompt in responding to this.
Pages: 1 2