Skip to main content

java3d Issue 5: Frequent native exception: Canvas3D.destroyContext

9 replies [Last post]
ltravers
Offline
Joined: 2004-09-20
Points: 0

Is this the same issue as an old issue? This bug sounds the same:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4646041

Maybe the old discussion has some ideas for the current team.

I work on a science education project where a Java3D program displays molecules. (There are multiple JPanels each containg Cavas3D, all inside a big container.) It will be used by hundreds of students in January 2005. It's almost impossible for me to get this crash on my computer, but when the computer lab full of students at many stations is doing the Java3D stuff, this crash is a an absolute show-stopper.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kcr
Offline
Joined: 2004-03-17
Points: 0

> Is this the same issue as an old issue? This bug sounds the same:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4646041

The crash is in the same native method, wglDeleteContext, but I don't think that the root cause is the same. The biggest problem that we've had is that we've never been able to reproduce Issue 5 here. I gave a debug library to Herkules and had him run FlyingGuns until he was able to make it crash, but the debug output just confirmed that we were passing a valid context to wglDeleteContext. We couldn't find any reason why it should be crashing in the driver. If you have a test program that can reproduce this, we'd love to take a look at it. Or, I could send you a debuggable Java 3D library with some print statements and possibly get more information about the bug.

-- Kevin

herkules
Offline
Joined: 2003-06-12
Points: 0

it's still funny that is doesn't happen for you.

I can reproduce it in seconds on any machine I can access (all Windows though).

esc-altR-esc-altR-esc-altR .... finished....

Maybe I can find some time to narrow it down a bit for FlyingGuns is quite a big context....

herkules
Offline
Joined: 2003-06-12
Points: 0

Verified on a completely different platform. Booted my Linux!!!

With the current WebStart demo, took me 10 seconds to crash it.

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x5A02B743
Function=__nvsym06295+0xB
Library=/usr/lib/libGLcore.so.1

Current Java thread:
at javax.media.j3d.Canvas3D.destroyContext(Native Method)
at javax.media.j3d.Renderer.removeCtx(Unknown Source)
- locked <0x461b6330> (a java.lang.Object)
at javax.media.j3d.Renderer.doWork(Unknown Source)
at javax.media.j3d.J3dThread.run(Unknown Source)

Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:42 1112116 /usr/java/j2sdk1.4.2_01/jre/bin/java

kcr
Offline
Joined: 2004-03-17
Points: 0

Which version of the NVIDIA drivers? There was a long-standing crash-on-exit problem that would cause every Java 3D program to crash every time, and which NVIDIA just fixed (it's fixed in 66.29). If you are running the latest NVIDIA driver, then perhaps you've found a way to reproduce this crash on Linux, which could make it easier for us to track down. I'll try it out on Monday.

-- Kevin

herkules
Offline
Joined: 2003-06-12
Points: 0

Uh ... how can I find out the drivers version? But it is at least one year old.

Yesterday, I tested on a friends machine again with a completely different environment: WindowsME, GF4. Took 30 secs to produce the crash. Also happened on NT4 with an Intel video chip.

Strange: my feeling is that the crash NEVER occured with 1.3 and the following betas, happened in rare cases since 1.3.1 release and meanwhile happens nearly always. Of course, there is no proof.

First now I'll d'load latest driver (windows/66.93) and check it out again.

herkules
Offline
Joined: 2003-06-12
Points: 0

Latest driver didn't change anything.

Took some effort to verify the 1.3 observation. I installed the old 1.3 (not 1.3.1!) release. Had also to install a jre1.4.2 bc. it seems that 1.3 does not work with jre5 due to missing classes ...

I now have a setup where I can switch between j3d1.3 and j3d1.3.2.

With 1.3 - rock solid! With 1.3.2 - frequent crashes.
With 1.3, I tested hundreds of 'esc-resume' cycles. With 1.3.2, I have to be lucky to reach 5 (although sometimes I can reach 50 and more). Too weird.

Also, although this is a *very* subjective observation, ... seems to be smoother with 1.3.

Message was edited by: Herkules

kcr
Offline
Joined: 2004-03-17
Points: 0

We've finally managed to reproduce this bug locally. I can now make it happen on WIndows/XP running on an NVIDIA 6800 with the NVIDIA 66.93 driver. It is very intermittent, but we've made it crash about 4 times now. Maybe this will help us make headway. Btw, I still think this could be an NVIDIA driver bug. Has anyone ever seen this exact crash with any other card (e.g., ATI)? If so, please attach a complete stack trace to the Issue report:

http://java3d.dev.java.net/issues/show_bug.cgi?id=5

-- Kevin

kcr
Offline
Joined: 2004-03-17
Points: 0

Now that we are able to reproduce this locally, we have tracked down the problem to the way display list IDs are managed. A short term workaround is to disable Java 3D display lists:

java -Dj3d.displaylist=false ...

See the bug report for the latest info:

http://java3d.dev.java.net/issues/show_bug.cgi?id=5

kcr
Offline
Joined: 2004-03-17
Points: 0

We just checked in a fix for Issue 5. We also put a daily build with this fix on java.net. For a pointer to the build, see:

http://www.javadesktop.org/forums/thread.jspa?threadID=7341

For more info on the bug, see:

http://java3d.dev.java.net/issues/show_bug.cgi?id=5

-- Kevin