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.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › opengl works only once in browsers
Page Index Toggle Pages: 1
opengl works only once in browsers (Read 4254 times)
opengl works only once in browsers
Jan 20th, 2010, 7:11am
 
hello,

i made something incredibly dumb, that causes me a big problem.
i uploaded some sketch applets to my homepage and checked if they were working. they did.
but every time i opened a sketch with the browser, i got a popup window, that i believe had something to with opengl or java or maybe both, i can't remember. there were 3 buttons to click "yes" "no" and "no, don't ask again". unfortunately i clicked no don't ask again and ever since i have a problem with my sketches. now when i open them only the first one works. all the others won't load (just a blank sketch). and if i load the one again that worked it gets stuck on "loading native libraries".
this problem only occurs with sketches that use opengl so i think that problem lies there. it doesn't seem to be a browserrelated problem, ff and ie both act the same here.

if i only could remember the content of that popup window, i could reset the settings, so that it comes back again. it was annoying sure, but at least the sketches worked. does anyone know, what popup window that was? opengl, stability, renderer, bla, i just don't know anymore...

till then i noobslap my face for being so dumb...
*slap* *slap* *slap*

Re: opengl works only once in browsers
Reply #1 - Jan 20th, 2010, 12:35pm
 
actually i am not 100% sure if it was that popup window that causes the trouble.

i think i described the problem too confusing, so here it is a bit clearer

i open a browser
i have multiple applets that use opengl
the first one i open works just normal
every opengl applet i open afterwards doesn't start (white screen)
re-opening the first sketch, it's still working
when i close the browser and open it again i can choose another applet to open first which then works (and all others don't)

i allready tried resetting browser settings, re-installing java and re-installing graphic drivers. i think this could have a lot of reasons (maybe even the ominous popup-window)  but perhaps someone has an idea

thanks for reading!

EDIT: tried it on a friend's mac on safari and firefox and it worked without problems, maybe a hint towards that popup window being the trouble source
Re: opengl works only once in browsers
Reply #2 - Jan 21st, 2010, 11:52am
 
These are the 2 popups I got from FireFox
...
This problem is quite common but I have found FireFox to be better behaved than IE.
Re: opengl works only once in browsers
Reply #3 - Jan 22nd, 2010, 2:49am
 
hey great Quark, thank you! you found it, it's the upper one.

i still can't find the way to change it all back though.
this is how the java applet runtime settings look like for me
www.generalzombie.de/javacontrolpanel.jpg

unfortunately it's in german, but you probably understand it anyways Smiley
i was hoping for something letterbox-style, that just lets me restore the "ask user for directdraw" or something like that, now this is confusing.
must i write something like "directdraw=false" into the runtime-parameter column? or am i missing out on something?

you said this problem is quite common, so how do you handle it?

thank you very much so far
Re: opengl works only once in browsers
Reply #4 - Jan 22nd, 2010, 11:54am
 
Here is mine
...
Click on the image for full size and you will see the runtime parameter.

It is quite common in the sense that it is experienced by most people at some time or other when using OpenGL applets. I am sure there are other threads on the forum about this if you search it.

I know www.openprocessing.org did not allow OpenGL applets to be posted until recently.

For me personally this problem is particularly noticeable with IE, I use FireFox which seems to behave much better with OpenGL applets.
Smiley
Re: opengl works only once in browsers
Reply #5 - Jan 25th, 2010, 1:50am
 
i changed my runtime parameters to match yours, but it doesn't have any affect. still no popup window and still only the first opengl applet runs.

but i guess since you said that opengl support in applets is quite a new feature, that it might be a subject for improvement in the future. so i maybe just deal with it so long.

thank you very much!
Re: opengl works only once in browsers
Reply #6 - Jan 31st, 2010, 3:04pm
 
now a coule of days later the problem got worse.
i don't know why, but now no processing applet that uses opengl library is working online, not even once. offline the html file is working without problems. i make no changes to it, just upload it, and it's not working anymore. any other applet that's not using opengl library is also working fine online.
i have made a test applet, just one line drawn using opengl library that seems to be working on other computers (http://www.generalzombie.de/applet/index.html) but when i open it i get this error message in the java console (on firefox and ie) right after the processing loading.gif:

java.lang.NullPointerException
     at com.sun.opengl.util.JOGLAppletLauncher.start(JOGLAppletLauncher.java:404)
     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Ausnahme: java.lang.NullPointerException


on the other hand, i can open this java opengl applet without problems: https://jogl-demos.dev.java.net/applettest.html
so it seems to be some particular problem with processing.

so far i uninstalled and re-installed java, processing, my browsers and my graphic card drivers multiple times.
i am totally stuck here. any ideas anyone?
Re: opengl works only once in browsers
Reply #7 - Feb 1st, 2010, 12:40am
 
to give some more information on which processing applets work, here is what i tested:
- applet without imported libraries: working
- applet with minim library: working
- applet with "import processing.opengl.* but no OPENGL call in   size(w,h) : working
- applet with import processing.opengl.* and size(w,h,OPENGL): not working
- any other applet (not from me) that uses opengl: not working
- applet that uses opengl but no processing (the above mentioned https://jogl-demos.dev.java.net/applettest.html): working

also i am not sure if i know how to completely uninstall java. i just went windows->software-> uninstall java6 update 18, then re-installed it with firefox plugin manager and cleared the internet cache in the java console. does that get rid of every setting?

Re: opengl works only once in browsers
Reply #8 - Feb 2nd, 2010, 3:11pm
 
This seems to be some sort of bug, though it's not clear yet where it's happening. A report has been filed so I'm closing this thread so that any discussion can continue in the bug report:
http://dev.processing.org/bugs/show_bug.cgi?id=1452
Re: opengl works only once in browsers
Reply #9 - Feb 3rd, 2010, 1:08pm
 
I followed Frys link to the bugzilla, but for some reason I can't comment there.
Anyway I was inspired to try out the new method of loading opengl, to see if it works for you, you could check my 3D Sierpinski.
http://myweb.tiscali.co.uk/monkstone/tetrahedron/tetrahedron.html
Which was built using the svn version of processing built on Linux Has been built/exported using processing 1.1 (Ubuntu 9.10) Smiley

It works just great for me.. whether using Linux or Windows-XP, although it took a bit of time loading the libraries the first time on windows (on windows, I skipped from my Hilbert also opengl, to the Sierpinski and the Sierpinski came up right away).
Re: opengl works only once in browsers
Reply #10 - Mar 15th, 2010, 8:28am
 
I was having a JOGL problem in Safari under Snow Leopard, which loads plug-ins in 64-bit mode by default. Processing 1.1 includes the Fry fix and solves the JOGL problem, but my applet now crashes when loaded in Firefox 3.6 and earlier. When I use Firefox to visit http://myweb.tiscali.co.uk/monkstone/tetrahedron/tetrahedron.html I also get a crash.

Is this just a problem with my Firefox configuration, or does the http://myweb.tiscali.co.uk/monkstone/tetrahedron/tetrahedron.html page always crash in Firefox?
Re: opengl works only once in browsers
Reply #11 - Mar 15th, 2010, 11:37am
 
Just tried it to make sure, to make sure, still works for me Firefox on Kubuntu 9.10 (32 bit),  I don't have a Mac to try Cry, last time I tried it was fine using Firefox on Windows also (32 bit).
Re: opengl works only once in browsers
Reply #12 - Mar 15th, 2010, 11:46am
 
I cannot help you much but:
- My Firefox 3.6 on Mac OS 10.5 does not crash on that site
- I had some problems with OPENGL sketches before and in the end that was due to conflicting installations of JOGL native libraries. I would recommend to remove all instances of the jogl and related libraries from your computer (they are automatically downloaded with the applet) and try again

Andreas
Re: opengl works only once in browsers
Reply #13 - Mar 17th, 2010, 4:58am
 
Hi, this morning ff upgraded himself to version 3.6. None of the Applets were working anymore. Did a bit of googling and discovered that applets in ff3.6 only works if one have the latest JRE version (build 1.6.0_18-b07). Downloaded the latest JRE and OPENGL applets still continued to fail loading componets.

Code:

java.lang.NullPointerException
at com.sun.opengl.util.JOGLAppletLauncher.start(JOGLAppletLauncher.java:404)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Somewhere i also read that the new Processing 1.1 uses another technique to load JOGL stuff and in fact, when you export the applet, the page have different tags compared with the 'old' 1.0.7 exported page, wich was the version I had.

Now exported Applets with the latest Processing works ok, but on openprocessing (after a new resubmission) only works if you see them in their p5 page.

At this point i am curiuos to see what issues you are experiencing both for 'normal' and OPENGL works.

GC
Re: opengl works only once in browsers
Reply #14 - Mar 21st, 2010, 10:23am
 
martin_p wrote on Feb 3rd, 2010, 1:08pm:
I followed Frys link to the bugzilla, but for some reason I can't comment there.
Anyway I was inspired to try out the new method of loading opengl, to see if it works for you, you could check my 3D Sierpinski.
http://myweb.tiscali.co.uk/monkstone/tetrahedron/tetrahedron.html
Which was built using the svn version of processing built on Linux Has been built/exported using processing 1.1 (Ubuntu 9.10) Smiley

It works just great for me.. whether using Linux or Windows-XP, although it took a bit of time loading the libraries the first time on windows (on windows, I skipped from my Hilbert also opengl, to the Sierpinski and the Sierpinski came up right away).


Thx : it solved the native "export" menu who doesn't work.
I replace your tetraxxxxx.jar by my one and it'running under wista / IE7
Page Index Toggle Pages: 1