org.lwjgl.examples.spaceinvaders.Game crashes in lwjgl-win32

Started by cs224, May 30, 2006, 12:35:11

Previous topic - Next topic

cs224

Hello,

I've just downloaded and installed lwjgl-win32-0.99 and was trying to start with the spaceinvaders example. I am not sure if this example is still supposed to run, but I would like to report, that the attempt to run it crashes the JVM (most recent SUN JDK version at the moment: 1.5.0_07):

-- snip start --
Use -fullscreen for fullscreen mode
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d74d40e, pid=3852, tid=2380
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# V  [jvm.dll+0x8d40e]
#
# An error report file with more information is saved as hs_err_pid3852.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
-- snip end --

Another interesting point is that the crash does not seem to happen in LWJGL code, but in the core JDK method java.awt.image.BufferedImage.getGraphics(). Therefore I am not even sure if this bug report is correctly addressed in this forum. Did anybody else manage to run this spaceinvader example successfully recently?

Here is the complete stack tract of the JVM:
-- snip start --
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d74d40e, pid=3852, tid=2380
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# V  [jvm.dll+0x8d40e]
#

---------------  T H R E A D  ---------------

Current thread (0x00356660):  JavaThread "main" [_thread_in_vm, id=2380]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:
EAX=0x00000000, EBX=0x00000000, ECX=0x00356640, EDX=0x0ada89f8
ESP=0x0006ecf8, EBP=0x0006ed24, ESI=0x00356660, EDI=0x0ada89f0
EIP=0x6d74d40e, EFLAGS=0x00210202

Top of Stack: (sp=0x0006ecf8)
0x0006ecf8:   0006ed8c 00356720 00000004 00356660
0x0006ed08:   00356720 06e1c8f8 6d7017df 00356660
0x0006ed18:   06e1c8f8 06e1c8f8 0ada89f0 0006ed58
0x0006ed28:   6d0c7585 00356720 00000000 6d126e58
0x0006ed38:   0ada89f4 00356660 06e1c8f8 06e1c8f8
0x0006ed48:   0006ed3c 0006ee7c 6d0f3430 00000000
0x0006ed58:   0006ed84 00a79f55 00356720 0006ed8c
0x0006ed68:   0006ed68 06e1c8f8 0006ed90 06e1d828

Instructions: (pc=0x6d74d40e)
0x6d74d3fe:   00 00 00 83 7d 14 00 0f 84 97 00 00 00 8b 45 0c
0x6d74d40e:   ff 30 e8 dd 97 ff ff 59 50 56 8d 4d 08 e8 54 8b


Stack: [0x00030000,0x00070000),  sp=0x0006ecf8,  free space=251k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x8d40e]
C  [awt.dll+0xc7585]
j  java.awt.Component.initIDs()V+0
j  java.awt.Component.<clinit>()V+94
v  ~StubRoutines::call_stub
V  [jvm.dll+0x86401]
V  [jvm.dll+0xdb172]
V  [jvm.dll+0x862d2]
V  [jvm.dll+0x78dbf]
V  [jvm.dll+0x77ca8]
V  [jvm.dll+0xa3657]
V  [jvm.dll+0x894e7]
C  [awt.dll+0xe4e0d]
j  sun.awt.windows.WToolkit.initIDs()V+0
j  sun.awt.windows.WToolkit.<clinit>()V+19
v  ~StubRoutines::call_stub
V  [jvm.dll+0x86401]
V  [jvm.dll+0xdb172]
V  [jvm.dll+0x862d2]
V  [jvm.dll+0x78dbf]
V  [jvm.dll+0x77ca8]
V  [jvm.dll+0xc6987]
V  [jvm.dll+0xc7624]
V  [jvm.dll+0xc750a]
V  [jvm.dll+0x81ae1]
j  sun.awt.Win32GraphicsEnvironment.<clinit>()V+0
v  ~StubRoutines::call_stub
V  [jvm.dll+0x86401]
V  [jvm.dll+0xdb172]
V  [jvm.dll+0x862d2]
V  [jvm.dll+0x78dbf]
V  [jvm.dll+0x77ca8]
V  [jvm.dll+0xa3657]
V  [jvm.dll+0x9ca03]
C  [java.dll+0x13d8]
j  java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
j  java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5
j  java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment()Ljava/awt/GraphicsEnvironment;+24
j  java.awt.image.BufferedImage.createGraphics()Ljava/awt/Graphics2D;+0
j  java.awt.image.BufferedImage.getGraphics()Ljava/awt/Graphics;+1
j  org.lwjgl.examples.spaceinvaders.TextureLoader.convertImageData(Ljava/awt/image/BufferedImage;Lorg/lwjgl/examples/spaceinvaders/Texture;)Ljava/nio/ByteBuffer;+141
j  org.lwjgl.examples.spaceinvaders.TextureLoader.getTexture(Ljava/lang/String;IIII)Lorg/lwjgl/examples/spaceinvaders/Texture;+83
j  org.lwjgl.examples.spaceinvaders.TextureLoader.getTexture(Ljava/lang/String;)Lorg/lwjgl/examples/spaceinvaders/Texture;+32
j  org.lwjgl.examples.spaceinvaders.Sprite.<init>(Lorg/lwjgl/examples/spaceinvaders/TextureLoader;Ljava/lang/String;)V+25
j  org.lwjgl.examples.spaceinvaders.Game.getSprite(Ljava/lang/String;)Lorg/lwjgl/examples/spaceinvaders/Sprite;+9
j  org.lwjgl.examples.spaceinvaders.Game.initialize()V+187
j  org.lwjgl.examples.spaceinvaders.Game.<init>(Z)V+97
j  org.lwjgl.examples.spaceinvaders.Game.main([Ljava/lang/String;)V+33
v  ~StubRoutines::call_stub
V  [jvm.dll+0x86401]
V  [jvm.dll+0xdb172]
V  [jvm.dll+0x862d2]
V  [jvm.dll+0x8d2a2]
C  [javaw.exe+0x14c5]
C  [javaw.exe+0x3151]
C  [kernel32.dll+0x16d4f]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  java.awt.Component.initIDs()V+0
j  java.awt.Component.<clinit>()V+94
v  ~StubRoutines::call_stub
j  sun.awt.windows.WToolkit.initIDs()V+0
j  sun.awt.windows.WToolkit.<clinit>()V+19
v  ~StubRoutines::call_stub
j  sun.awt.Win32GraphicsEnvironment.<clinit>()V+0
v  ~StubRoutines::call_stub
j  java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
j  java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5
j  java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment()Ljava/awt/GraphicsEnvironment;+24
j  java.awt.image.BufferedImage.createGraphics()Ljava/awt/Graphics2D;+0
j  java.awt.image.BufferedImage.getGraphics()Ljava/awt/Graphics;+1
j  org.lwjgl.examples.spaceinvaders.TextureLoader.convertImageData(Ljava/awt/image/BufferedImage;Lorg/lwjgl/examples/spaceinvaders/Texture;)Ljava/nio/ByteBuffer;+141
j  org.lwjgl.examples.spaceinvaders.TextureLoader.getTexture(Ljava/lang/String;IIII)Lorg/lwjgl/examples/spaceinvaders/Texture;+83
j  org.lwjgl.examples.spaceinvaders.TextureLoader.getTexture(Ljava/lang/String;)Lorg/lwjgl/examples/spaceinvaders/Texture;+32
j  org.lwjgl.examples.spaceinvaders.Sprite.<init>(Lorg/lwjgl/examples/spaceinvaders/TextureLoader;Ljava/lang/String;)V+25
j  org.lwjgl.examples.spaceinvaders.Game.getSprite(Ljava/lang/String;)Lorg/lwjgl/examples/spaceinvaders/Sprite;+9
j  org.lwjgl.examples.spaceinvaders.Game.initialize()V+187
j  org.lwjgl.examples.spaceinvaders.Game.<init>(Z)V+97
j  org.lwjgl.examples.spaceinvaders.Game.main([Ljava/lang/String;)V+33
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
 0x00a3bab8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3884]
 0x00a3a0e8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3148]
 0x00a393b8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1616]
 0x00a370f0 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=1052]
 0x00a36508 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=776]
 0x00356888 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=3740]
 0x00a26998 JavaThread "Finalizer" daemon [_thread_blocked, id=2516]
 0x00a25500 JavaThread "Reference Handler" daemon [_thread_blocked, id=3768]
=>0x00356660 JavaThread "main" [_thread_in_vm, id=2380]

Other Threads:
 0x00a21360 VMThread [id=1856]
 0x00a3cd08 WatcherThread [id=3616]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation   total 576K, used 115K [0x02a70000, 0x02b10000, 0x02f50000)
 eden space 512K,  10% used [0x02a70000, 0x02a7cf80, 0x02af0000)
 from space 64K,  99% used [0x02b00000, 0x02b0fea0, 0x02b10000)
 to   space 64K,   0% used [0x02af0000, 0x02af0000, 0x02b00000)
tenured generation   total 1408K, used 663K [0x02f50000, 0x030b0000, 0x06a70000)
  the space 1408K,  47% used [0x02f50000, 0x02ff5e70, 0x02ff6000, 0x030b0000)
compacting perm gen  total 8192K, used 3810K [0x06a70000, 0x07270000, 0x0aa70000)
  the space 8192K,  46% used [0x06a70000, 0x06e28b48, 0x06e28c00, 0x07270000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x0040d000    C:\Programme\Java\jre1.5.0_07\bin\javaw.exe
0x7c910000 - 0x7c9c7000    C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c906000    C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e4a000    C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee1000    C:\WINDOWS\system32\RPCRT4.dll
0x77d10000 - 0x77da0000    C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f37000    C:\WINDOWS\system32\GDI32.dll
0x77be0000 - 0x77c38000    C:\WINDOWS\system32\MSVCRT.dll
0x6d6c0000 - 0x6d857000    C:\Programme\Java\jre1.5.0_07\bin\client\jvm.dll
0x76af0000 - 0x76b1e000    C:\WINDOWS\system32\WINMM.dll
0x6d280000 - 0x6d288000    C:\Programme\Java\jre1.5.0_07\bin\hpi.dll
0x76bb0000 - 0x76bbb000    C:\WINDOWS\system32\PSAPI.DLL
0x6d380000 - 0x6d3b5000    C:\Programme\Java\jre1.5.0_07\bin\jdwp.dll
0x6d690000 - 0x6d69c000    C:\Programme\Java\jre1.5.0_07\bin\verify.dll
0x6d300000 - 0x6d31d000    C:\Programme\Java\jre1.5.0_07\bin\java.dll
0x6d6b0000 - 0x6d6bf000    C:\Programme\Java\jre1.5.0_07\bin\zip.dll
0x6d220000 - 0x6d227000    C:\Programme\Java\jre1.5.0_07\bin\dt_socket.dll
0x71a10000 - 0x71a27000    C:\WINDOWS\system32\WS2_32.dll
0x71a00000 - 0x71a08000    C:\WINDOWS\system32\WS2HELP.dll
0x719b0000 - 0x719f0000    C:\WINDOWS\System32\mswsock.dll
0x76ee0000 - 0x76f07000    C:\WINDOWS\system32\DNSAPI.dll
0x76f70000 - 0x76f78000    C:\WINDOWS\System32\winrnr.dll
0x76f20000 - 0x76f4d000    C:\WINDOWS\system32\WLDAP32.dll
0x76f80000 - 0x76f86000    C:\WINDOWS\system32\rasadhlp.dll
0x66710000 - 0x66769000    C:\WINDOWS\system32\hnetcfg.dll
0x719f0000 - 0x719f8000    C:\WINDOWS\System32\wshtcpip.dll
0x10000000 - 0x10043000    C:\Programme\Java\jre1.5.0_07\bin\lwjgl.dll
0x72210000 - 0x7223b000    C:\WINDOWS\system32\DINPUT.dll
0x5f0d0000 - 0x5f19c000    C:\WINDOWS\system32\OPENGL32.dll
0x68fc0000 - 0x68fe0000    C:\WINDOWS\system32\GLU32.dll
0x736d0000 - 0x73719000    C:\WINDOWS\system32\DDRAW.dll
0x73b30000 - 0x73b36000    C:\WINDOWS\system32\DCIMAN32.dll
0x77bd0000 - 0x77bd8000    C:\WINDOWS\system32\VERSION.dll
0x0af00000 - 0x0af0d000    C:\WINDOWS\system32\PGP60hk.dll
0x746a0000 - 0x746eb000    C:\WINDOWS\system32\MSCTF.dll
0x69500000 - 0x69a1a000    C:\WINDOWS\system32\nvoglnt.dll
0x0be60000 - 0x0be6d000    C:\Programme\CyberLink\Shared Files\CLRCEngine.dll
0x68d90000 - 0x68d99000    C:\WINDOWS\system32\HID.DLL
0x73d30000 - 0x73e2e000    C:\WINDOWS\system32\MFC42.DLL
0x774b0000 - 0x775ed000    C:\WINDOWS\system32\ole32.dll
0x770f0000 - 0x7717c000    C:\WINDOWS\system32\OLEAUT32.dll
0x61dc0000 - 0x61dce000    C:\WINDOWS\system32\MFC42LOC.DLL
0x778f0000 - 0x779e4000    C:\WINDOWS\system32\SETUPAPI.DLL
0x76bf0000 - 0x76c1e000    C:\WINDOWS\system32\WINTRUST.dll
0x77a50000 - 0x77ae5000    C:\WINDOWS\system32\CRYPT32.dll
0x77af0000 - 0x77b02000    C:\WINDOWS\system32\MSASN1.dll
0x76c50000 - 0x76c78000    C:\WINDOWS\system32\IMAGEHLP.dll
0x6d000000 - 0x6d167000    C:\Programme\Java\jre1.5.0_07\bin\awt.dll
0x72f70000 - 0x72f96000    C:\WINDOWS\system32\WINSPOOL.DRV
0x76330000 - 0x7634d000    C:\WINDOWS\system32\IMM32.dll
0x0bff0000 - 0x0c0e6000    C:\Programme\Java\jre1.5.0_07\bin\OpenAL32.dll
0x76f90000 - 0x7700f000    C:\WINDOWS\system32\CLBCATQ.DLL
0x77010000 - 0x770e3000    C:\WINDOWS\system32\COMRes.dll
0x73e70000 - 0x73ecc000    C:\WINDOWS\system32\dsound.dll
0x72c90000 - 0x72c99000    C:\WINDOWS\system32\wdmaud.drv
0x72c80000 - 0x72c88000    C:\WINDOWS\system32\msacm32.drv
0x77bb0000 - 0x77bc5000    C:\WINDOWS\system32\MSACM32.dll
0x77ba0000 - 0x77ba7000    C:\WINDOWS\system32\midimap.dll
0x73e40000 - 0x73e44000    C:\WINDOWS\system32\KsUser.dll
0x6d190000 - 0x6d1bf000    C:\Programme\Java\jre1.5.0_07\bin\cmm.dll
0x6d3c0000 - 0x6d3df000    C:\Programme\Java\jre1.5.0_07\bin\jpeg.dll

VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1386
java_command: org.lwjgl.examples.spaceinvaders.Game
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Programme\Java\jdk1.5.0
PATH=C:\Programme\Java\jdk1.5.0\bin;C:\java\apache-ant-1.6.2\bin;C:\texmf\miktex\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
USERNAME=cs
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 12 Stepping 0, AuthenticAMD



---------------  S Y S T E M  ---------------

OS: Windows XP Build 2600 Service Pack 2

CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2

Memory: 4k page, physical 523760k(106572k free), swap 1276340k(894944k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_07-b03) for windows-x86, built on May  3 2006 01:04:38 by "java_re" with MS VC++ 6.0
-- snip end --

Thanks for any further help/suggestions in this direction.
-
Christian Schuhegger
http://www.el-chef.de/

Matzon


cs224

Could you please tell me
1) if this spaceinvaders example is still maintained and supposed to work? And
2) if my problem is reproducible on other machines? It could be that the problem is a local problem of my installation and it would help to know if other WindowsXP/JDK1.5.0_07 installations have the same problem?

Thanks a lot for help and further suggestions on how to debug/solve the problem.
-
Christian Schuhegger
http://www.el-chef.de/

Matzon

spaceinvaders should work fine - what about the other examples?

cs224

I've just done a test of all of the other examples and they work fine. After doing those tests I thought I could try the space invaders aswell and as a surprise I noticed that the example is working as it should be. I cannot explain this behaviour really, but what I guess is that the problem may have been caused by the upgrade of the JVM, which I did just before trying the space invader example. I did not do a reboot the last time when I did this upgrade. This is just a guess.

The good point is that the example works and there is no problem in the lwgl examples.

Thanks for your assistance and help nevertheless!
-
Christian Schuhegger
http://www.el-chef.de/