Random Crash

Started by Jon, December 18, 2006, 06:59:13

Previous topic - Next topic

Jon

Every so often (it's really rare as in 1 in a 100 chance), an LWJGL powered app will open the window frame, then the title bar will tile across my whole screen and kill the computer. The only way out is a hard reset. I know it's not my game because this happened once with one of Kev's demos. I don't know if it's a drivers issue as I have a really nice card (GeForce 7800). Has anybody else experienced this strange effect before?

oak

In our 2 years with LWJGL (and JME) we have had (in)frequent crashes. And now that we have started the first closed beta-test we see that our testers crash every now and then too. The nasty part is that the crashes do not seem to come from the same place all the time. I will attack all the hs_err_pidXXXX.log files that I have around (I delete them every now and then when they clutter up my workspace).

It seems the crash both happens on Linux and Windows (we still have no hs_err_pidXXX.log from MAC, but we will soon).

I hope that these can be meaningful to some of the LWJGL devs. And I strongly suggest that all other LWJGL users who experience random crashes post their hs_err_pidXXX.log files here such that we can try to figure out what is wrong.
ove Zig !

oak

Size limits forced be to split this over several posts  :P
ove Zig !

oak

More error-logs (these all come from one Windows XP machine, except hs_err_pid1180.log which comes from an other Windows XP machine)
ove Zig !

Matzon

many of these crashes are not related to lwjgl, but rather the OpenGL driver AND improper use of OpenGL commands. For instance:
QuoteC  [libGLcore.so.1+0x1bb805]
j  org.lwjgl.opengl.GL11.nglDeleteTextures(ILjava/nio/IntBuffer;IJ)V+0
- deleting stuff that isn't there?

QuoteJava frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  org.lwjgl.opengl.GL11.nglClear(IJ)V
J  com.jme.renderer.lwjgl.LWJGLRenderer.clearBuffers()V
J  net.gamalocus.cotwl2.client.ClientApplication.render(F)V
J  net.gamalocus.cotwl2.client.ClientApplication.start()V
j  net.gamalocus.cotwl2.client.ClientApplication.main([Ljava/lang/String;)V+132
calling opengl commands without a display ?

QuoteC  [libc.so.6+0x68116]
C  [libc.so.6+0x6a1bd]
C  [libc.so.6+0x6bfc0]  __libc_malloc+0x90
C  [libfontmanager.so+0x26f0d]
C  [libfontmanager.so+0x1f05b]
C  [libfontmanager.so+0x1f6ec]
C  [libfontmanager.so+0x45b20]  Java_sun_font_FileFont_getGlyphImage+0x150
j  sun.font.FileFont.getGlyphImage(JI)J+0
not lwjgl related at all

and so forth.

I am not saying that there are no errors in the code, its just that getting a dump of a trace it not necessarily enough information. We would always like a version and what was being done at the time as a minimum. A test case is preferred - and a patch even more so ;)

oak

Ok, point taken. The only problem is these errors occur at random in our game, hence test cases are very difficult to produce - and patches even more so :D

But, I got just what I wanted: Someone telling me that I am in fact doing something wrong :p, this is valuable information since now I can actually fix it.

Thank you!
ove Zig !

oak

I have a few questions (sorry if you find them quite simple):

Quote from: Matzon on March 07, 2008, 09:22:40
QuoteC  [libGLcore.so.1+0x1bb805]
j  org.lwjgl.opengl.GL11.nglDeleteTextures(ILjava/nio/IntBuffer;IJ)V+0
- deleting stuff that isn't there?
How do you see that there is nothing there?

Quote from: Matzon on March 07, 2008, 09:22:40
QuoteJava frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  org.lwjgl.opengl.GL11.nglClear(IJ)V
J  com.jme.renderer.lwjgl.LWJGLRenderer.clearBuffers()V
J  net.gamalocus.cotwl2.client.ClientApplication.render(F)V
J  net.gamalocus.cotwl2.client.ClientApplication.start()V
j  net.gamalocus.cotwl2.client.ClientApplication.main([Ljava/lang/String;)V+132
calling opengl commands without a display ?
How can you see that there is no display?

Quote from: Matzon on March 07, 2008, 09:22:40
QuoteC  [libc.so.6+0x68116]
C  [libc.so.6+0x6a1bd]
C  [libc.so.6+0x6bfc0]  __libc_malloc+0x90
C  [libfontmanager.so+0x26f0d]
C  [libfontmanager.so+0x1f05b]
C  [libfontmanager.so+0x1f6ec]
C  [libfontmanager.so+0x45b20]  Java_sun_font_FileFont_getGlyphImage+0x150
j  sun.font.FileFont.getGlyphImage(JI)J+0
not lwjgl related at all
Granted, that was my mistake. Sorry.

I know that the question is sort of: "How do I read the stack-trace", but you seem to see things more clearly - so maybe you could enlighten me.
ove Zig !

princec

Because those two methods are honest-to-goodness, utterly simple direct calls to a native library. LWJGL does absolutely nothing except call the driver - so it's the driver that is crashing.

Cas :)

Matzon

Quote from: oak on March 07, 2008, 11:48:27
Quote from: Matzon on March 07, 2008, 09:22:40
QuoteC  [libGLcore.so.1+0x1bb805]
j  org.lwjgl.opengl.GL11.nglDeleteTextures(ILjava/nio/IntBuffer;IJ)V+0
- deleting stuff that isn't there?
How do you see that there is nothing there?
because we dont do anything in the method - 99% of all opengl/openal calls is just passing data to actual native method.

Quote from: oak on March 07, 2008, 11:48:27
Quote from: Matzon on March 07, 2008, 09:22:40
QuoteJava frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  org.lwjgl.opengl.GL11.nglClear(IJ)V
J  com.jme.renderer.lwjgl.LWJGLRenderer.clearBuffers()V
J  net.gamalocus.cotwl2.client.ClientApplication.render(F)V
J  net.gamalocus.cotwl2.client.ClientApplication.start()V
j  net.gamalocus.cotwl2.client.ClientApplication.main([Ljava/lang/String;)V+132
calling opengl commands without a display ?
How can you see that there is no display?
I can't be entirely sure (notice the ?) - but glClear is so basic and the stacktrace so small that it is probably the reason.

oak

Ok, thanks. I will dive into these cases and see if I can figure out what we are doing wrong.
ove Zig !