Strange problem on new laptop

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

Strange problem on new laptop

Tomd
Just tried my JOGL based application on a new laptop. It mainly works, except for one thing.

I am using TextureRenderer and a Texture to implement what is essentially a HUD. Works fine on every other machine I've tried, but doesn't appear at all on the new laptop. The main 3D content of the display is fine.

I've switched from the old 1.1.1 build to 2.0 b23, but this didn't help.

The new machine is a 64 bit AMD, Windows 7, but 32 bit Java, so I am using the Win 586i JOGL. Is that correct? It works fine on my development machine, (64 bit Intel, Windows 7, and 32 bit Java).

Any likely sources of this problem or suggestions for tracking it down?
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

gouessej
Administrator
This post was updated on .
Hi

Please switch to the latest release candidate or to the latest development build (build 23 is too old). JOGL 2.0 is not a drop-in replacement of JOGL 1.1.1a, the public API has changed, you might need to change some imports and some classes.

Edit.: there is a bug in OpenGL on 32 drivers used on 64 bits machine under Windows, Sven knows this one more than me, I use only GNU Linux.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Tomd
Is there any way to find out which JAR and DLL files I need for a basic Windows desktop app?

It took me quite a while to upgrade from 1.1.1 to 2.0 b23, I eventually found by trial and error, and a bit of guesswork,  that I needed gluegen-rt.jar, jogl.all.jar, newt.all.jar and nativewindow.all.jar (at least, it worked if I used those).

Now I come to upgrade to rc5, and some of those JARs don't seem to be in the release. I can't build under NetBeans, I don't even know which JAR has the GL2 class.

Am I missing something obvious, is there a document somewhere which explains what I need, or does everyone have this problem? I don't want to complain, JOGL is great, but this aspect of it is quite frustrating.
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
On Wednesday, December 21, 2011 01:58:33 PM Tomd [via jogamp] wrote:

>
> Is there any way to find out which JAR and DLL files I need for a basic
> Windows desktop app?
>
> It took me quite a while to upgrade from 1.1.1 to 2.0 b23, I eventually
> found by trial and error, and a bit of guesswork,  that I needed
> gluegen-rt.jar, jogl.all.jar, newt.all.jar and nativewindow.all.jar (at
> least, it worked if I used those).
>
> Now I come to upgrade to rc5, and some of those JARs don't seem to be in the
> release. I can't build under NetBeans, I don't even know which JAR has the
> GL2 class.
>
> Am I missing something obvious, is there a document somewhere which explains
> what I need, or does everyone have this problem? I don't want to complain,
> JOGL is great, but this aspect of it is quite frustrating.

Sorry, we haven't updates the WIKI yet.

I have posted to this earlier:
+++
Looks like you are not using jogl.all.jar, but the atomic ones ?
For the latter you need to include the nativewindow JARs as well,
however, I would encourage the jogl.all.jar's ..

Wade likes to update our Wiki page .. however, here is a little overview
about the new JAR files, etc:

http://forum.jogamp.org/setting-up-JOGL-in-Eclipse-on-Mac-OSX-Lion-Frustration-td3435692.html#a3436274
http://forum.jogamp.org/JogAmp-Deployment-Enhancements-Automatic-loading-of-native-JARs-Applet-Application-td3362447.html
+++

And I guess the information in there should solve the problem.

In short: You just need to add gluegen-rt.jar and jogl.all.jar - done.
No more native library stuff etc.
You may attach the source zip files to their respective JAR file.

After you are through with this, maybe you like to update the Wiki pages
in this regard ? This would be highly appreciated and I will give you an account.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Wade Walker
Administrator
In reply to this post by Tomd
I've updated the wiki page at http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL to be more explicit about exactly which files need to be downloaded, and from where  I've also fixed it to reflect the latest changes in the distribution (the change from .zip to .7z and the removal of the newt and nativewindow JARs). Let me know if there's anything unclear there.

Note that right now it only tells how to set up for building a JOGL app in an IDE or on the command line (as described at http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE). It doesn't yet say how to set up an applet or a Web Start app.
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Wade Walker
Administrator
In reply to this post by Tomd
I've also updated the instructions on how to build in NetBeans (among other IDEs) at https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE.
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Tomd
In reply to this post by Sven Gothel
Thanks, now i have gone right back to the start it does now build with just those two DLLs. I don't know why it didn't work before. I think sometimes the netbeans caching gets confused if you make a lot of changes

I am also trying to build the 64 bit version to try that. I get an odd error with rc5:

java.io.FileNotFoundException: C:\jogl\jogl-rc5-64bit\jar\gluegen-rt-natives-windows-i586.jar (The system cannot find the file specified)

The project doesn't reference that file (which doesn't exist anyway), why would the 64 bit gluegen be trying to drag in an i586 file? (I tried with rc4 and got the same message).

Something else very odd too. After running my application on the laptop, java panels don't render properly. The effect is similar to the effect on Vista when you can see a background window through the title bars of another window - faded, very blurred and shapes distorted. It really looks like an image filter has been applied.

This affects ALL java applications, eg the Java window in Control Panel, until the machine is power cycled.
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
On Wednesday, December 21, 2011 06:29:57 PM Tomd [via jogamp] wrote:

>
> Thanks, now i have gone right back to the start it does now build with just
> those two DLLs. I don't know why it didn't work before. I think sometimes
> the netbeans caching gets confused if you make a lot of changes
>
> I am also trying to build the 64 bit version to try that. I get an odd error
> with rc5:
>
> java.io.FileNotFoundException:
> C:\jogl\jogl-rc5-64bit\jar\gluegen-rt-natives-windows-i586.jar (The system
> cannot find the file specified)
>
> The project doesn't reference that file (which doesn't exist anyway), why
> would the 64 bit gluegen be trying to drag in an i586 file? (I tried with
> rc4 and got the same message).

Because your JVM is 32bit !
Gluegen RT detects your JVM and OS / architecture
and attempts to load the native JAR file accordingly.

So drag in the 32bit jogamp packages or use a 64bit JVM.

>
> Something else very odd too. After running my application on the laptop,
> java panels don't render properly. The effect is similar to the effect on
> Vista when you can see a background window through the title bars of another
> window - faded, very blurred and shapes distorted. It really looks like an
> image filter has been applied.
>
> This affects ALL java applications, eg the Java window in Control Panel,
> until the machine is power cycled.

Maybe - after installing the proper jogamp package,
you can run those etc\test_dbg.bat and etc\test.bat
and send the produced log files.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
In reply to this post by Wade Walker
On Wednesday, December 21, 2011 04:50:47 PM Wade Walker [via jogamp] wrote:

>
> I've updated the wiki page at
> http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL to be more
> explicit about exactly which files need to be downloaded, and from where
> I've also fixed it to reflect the latest changes in the distribution (the
> change from .zip to .7z and the removal of the newt and nativewindow JARs).
> Let me know if there's anything unclear there.
>
> Note that right now it only tells how to set up for building a JOGL app in
> an IDE or on the command line (as described at
> http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE).
> It doesn't yet say how to set up an applet or a Web Start app.
>
>

kudos - thank you

For RC6 we will have the 'jogamp-all-platforms.7z' file,
which is possible due to the native JAR loading.

The latter gets rid of the plain DLL files and hence we won't have
file name collisions.

The jogamp-all-platforms.7z' file will just drop the 'lib' folder
and have all native JAR files included.
Indeed this will ease up the whole thing I guess.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Tomd
In reply to this post by Sven Gothel
Sven Gothel wrote
Because your JVM is 32bit !
Gluegen RT detects your JVM and OS / architecture
and attempts to load the native JAR file accordingly.
Sorry I didn't know it did that.

I don't have good access to the laptop so I was trying to run the 64 bit version on my 32 bit development system just in case it threw any obvious problems up. This made me wonder if I had the right jars.

Anyway, after all that I have 64 bit JOGL running on the laptop but the original problem still remains :( The HUD items don't appear.

I will try to recreate the problem in a simple one file project.

Just so I understand, are gluegen-rt.jar and jogl.all.jar identical for 32 and 64 bit? ie if I want to create both versions, can I build my Java once and just use it with a different set of DLLs?
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
On Wednesday, December 21, 2011 07:44:32 PM Tomd [via jogamp] wrote:

>
> Sven Gothel wrote
> >
> > Because your JVM is 32bit !
> > Gluegen RT detects your JVM and OS / architecture
> > and attempts to load the native JAR file accordingly.
> >
>
> Sorry I didn't know it did that.
>
> I don't have good access to the laptop so I was trying to run the 64 bit
> version on my 32 bit development system just in case it threw any obvious
> problems up. This made me wonder if I had the right jars.
>
> Anyway, after all that I have 64 bit JOGL running on the laptop but the
> original problem still remains :( The HUD items don't appear.
>
> I will try to recreate the problem in a simple one file project.
>
> Just so I understand, are gluegen-rt.jar and jogl.all.jar identical for 32
> and 64 bit?
Yes, sure they are (proper abstraction).

> ie if I want to create both versions, can I build my Java once
> and just use it with a different set of DLLs?
Yes. Better use the created native JARs, since they will _not_
cause a naming conflict and are unique.

As I mentioned in my other post (reply to Wade),
we will have the -all-platforms.7z soon.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Tomd
I didn't think for a moment you guys wouldn't do abstraction. I just hadn't met native JARs before.

The all-platforms will let me create one bundle which installs on anything and sorts itself out at runtime? That would be brilliant.

On the original problem, I am starting to think it could be an alpha channel issue. Not convinced yet.
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
In reply to this post by Wade Walker
On Wednesday, December 21, 2011 04:50:47 PM Wade Walker [via jogamp] wrote:
>
> I've updated the wiki page at
> http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL to be more
> explicit about exactly which files need to be downloaded, and from where
> I've also fixed it to reflect the latest changes in the distribution (the
> change from .zip to .7z and the removal of the newt and nativewindow JARs).
> Let me know if there's anything unclear there.

http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL:

> Now you may copy the required JARs out of each jar folder and the native libraries out of each lib folder. For a full desktop installation, here are the files you need:

Can you remove the DLL and lib part, but focus on the native JAR files ?

The DLLs and lib folder should not be required anymore
and using the native JAR files is much easier.

Using the native JARs also aliases away the different set of platform DLLs
like: nativewindow_win32.dll libnativewindow_x11.so ...
(Your table has an error there as well, ie win32 for all)

They also may be gone w/ the all-platforms 7z file, or will be relocated
in their respective platform subfolder to resolve naming conflicts, lib/<os.and.arch>/ :
  lib/linux-i586/
  lib/linux-amd64/
  ...

My opinion: Remove the notion of the lib folder and focus on native JAR files.
Maybe put the native lib folder in a bottom section like 'more details' .. or so.

>
> Note that right now it only tells how to set up for building a JOGL app in
> an IDE or on the command line (as described at
> http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE).
> It doesn't yet say how to set up an applet or a Web Start app.
>

Here again we may need to describe the different deployment forms
as demonstrated on our test-applet-page (Dual, LApplet, JApplet, NApplet, ..).
I actually prefere NApplet right now, since it doesn't require JNLP and is just
less work to do.

Plus we may need to update the Object/Embed stuff, since simple Applet tags won't
do it anymore (-> Safari for example).

What do you think ?

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
In reply to this post by Wade Walker
On Wednesday, December 21, 2011 05:06:59 PM Wade Walker [via jogamp] wrote:
>
> I've also updated the instructions on how to build in NetBeans (among other
> IDEs) at
> https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE.
>

https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE:

> Eclipse IDE.Create a user library:
>   Double-click "Native library location", type the directory where native library files are stored, and click "OK".

Shouldn't we use the native JAR files here ? As I have described in bug 522,
  <https://jogamp.org/bugzilla/show_bug.cgi?id=522>
it works pretty well.

Even creating those packages w/ Eclipse with the
following 2 export types of 'Library handling':
  - Copy required libraries into a sub-folder next to the generated JAR
  - Package required libraries into generated JAR
is compatible with the native JARs.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Wade Walker
Administrator
I fixed the problem in the table of native libraries that you found, and created a bug (https://jogamp.org/bugzilla/show_bug.cgi?id=542) to add instructions for the native library JARs.

I'd like to test these myself on all our platforms and IDEs before adding the instructions -- I haven't had a chance to try it out yet
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Sven Gothel
Administrator
On Thursday, December 22, 2011 03:55:41 PM Wade Walker [via jogamp] wrote:
>
> I fixed the problem in the table of native libraries that you found, and
> created a bug (https://jogamp.org/bugzilla/show_bug.cgi?id=542) to add
> instructions for the native library JARs.
>
> I'd like to test these myself on all our platforms and IDEs before adding
> the instructions -- I haven't had a chance to try it out yet

Of course, thank you for reviewing. We know, it's always very welcome!

I hope this process will make it rock solid.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: Strange problem on new laptop

Tomd
Fixed my original problem, thanks very much for the help.

I don't know exactly what was wrong. I discovered that this code worked on the new machine:

http://java2s.com/Open-Source/Java-Document-2/3D/jzy3d/demos/j2d/TestTextureRenderer.java.htm#TestTextureRenderer

So I ripped out all my code for rendering the texture and replaced with the (considerably simpler) code from the sample. Must have been something wrong in my original code which I was getting away with on the other systems I've tested.

Anyway, I now have an installer which works for both 32 and 64 bit, which is excellent.