vm crash on program exit

Started by emzic, November 09, 2009, 16:40:10

Previous topic - Next topic

emzic

hello,
my application crashes the vm in in openal32.dll when i exit it. i am not sure if the cause is lwjgl, openal, or my code. maybe i am missing some cleaning up of native resources?

here is the hserr.pid

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x048dc059, pid=2076, tid=5992
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [OpenAL32.dll+0xc059]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

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

Current thread (0x02b6b400):  VMThread [stack: 0x02c50000,0x02ca0000] [id=5992]

siginfo: ExceptionCode=0xc0000005, reading address 0x04a1c8c0

Registers:
EAX=0x04a1c8c0, EBX=0x048d0000, ECX=0x04a021f0, EDX=0x00000000
ESP=0x02c9f9f4, EBP=0x02c9fa50, ESI=0x04a021d0, EDI=0x04a021a0
EIP=0x048dc059, EFLAGS=0x00010202

Top of Stack: (sp=0x02c9f9f4)
0x02c9f9f4:   00000001 04a021a0 048d6db2 04a021a0
0x02c9fa04:   00000000 048d6dee 04a021a0 048d6e1f
0x02c9fa14:   048e0328 048d0000 00000000 00000001
0x02c9fa24:   77135f21 00000000 02c9fa70 001b3ad8
0x02c9fa34:   00000001 02c9fa24 02c9f608 02c9faf0
0x02c9fa44:   048e1ff0 71554341 00000000 02c9fa5c
0x02c9fa54:   048e03d0 048d0000 02c9fa7c 7c90118a
0x02c9fa64:   048d0000 00000000 00000001 001b3ad8 

Instructions: (pc=0x048dc059)
0x048dc049:   c7 46 0c 01 00 00 00 e8 4f f0 ff ff 8b 46 08 59
0x048dc059:   8b 08 50 ff 51 08 8b 46 04 85 c0 74 06 8b 08 50 


Stack: [0x02c50000,0x02ca0000],  sp=0x02c9f9f4,  free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [OpenAL32.dll+0xc059]
C  [OpenAL32.dll+0x103d0]
C  [ntdll.dll+0x118a]
C  [ntdll.dll+0x23ada]
C  [kernel32.dll+0x1caae]
C  [kernel32.dll+0x1cb26]
C  [msvcr71.dll+0x8d04]
C  [msvcr71.dll+0x8d11]
V  [jvm.dll+0x1e924d]
V  [jvm.dll+0x1e852e]
V  [jvm.dll+0x1e887c]
V  [jvm.dll+0x1e8ca2]
V  [jvm.dll+0x173e4c]
C  [msvcr71.dll+0x9565]
C  [kernel32.dll+0xb729]

VM_Operation (0x037df8c0): Exit, mode: safepoint, requested by thread 0x034f5400


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

Java Threads: ( => current thread )
  0x003b6800 JavaThread "DestroyJavaVM" [_thread_blocked, id=5664, stack(0x00990000,0x009e0000)]
  0x034f5400 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2828, stack(0x03790000,0x037e0000)]
  0x032ab400 JavaThread "Thread-2" [_thread_blocked, id=5132, stack(0x03740000,0x03790000)]
  0x02c0dc00 JavaThread "AWT-Shutdown" [_thread_blocked, id=6136, stack(0x02f60000,0x02fb0000)]
  0x02c26800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2956, stack(0x02f10000,0x02f60000)]
  0x02bb8800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2628, stack(0x02e30000,0x02e80000)]
  0x02bb2c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=708, stack(0x02de0000,0x02e30000)]
  0x02bb1400 JavaThread "Attach Listener" daemon [_thread_blocked, id=4456, stack(0x02d90000,0x02de0000)]
  0x02bb0000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5120, stack(0x02d40000,0x02d90000)]
  0x02b6e400 JavaThread "Finalizer" daemon [_thread_blocked, id=3208, stack(0x02cf0000,0x02d40000)]
  0x02b6cc00 JavaThread "Reference Handler" daemon [_thread_blocked, id=5068, stack(0x02ca0000,0x02cf0000)]

Other Threads:
=>0x02b6b400 VMThread [stack: 0x02c50000,0x02ca0000] [id=5992]

VM state:at safepoint (shutting down)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x003b5810] Threads_lock - owner thread: 0x02b6b400

Heap
 def new generation   total 960K, used 605K [0x22990000, 0x22a90000, 0x22e70000)
  eden space 896K,  66% used [0x22990000, 0x22a25550, 0x22a70000)
  from space 64K,  13% used [0x22a70000, 0x22a722a8, 0x22a80000)
  to   space 64K,   0% used [0x22a80000, 0x22a80000, 0x22a90000)
 tenured generation   total 4096K, used 1913K [0x22e70000, 0x23270000, 0x26990000)
   the space 4096K,  46% used [0x22e70000, 0x2304e410, 0x2304e600, 0x23270000)
 compacting perm gen  total 12288K, used 3402K [0x26990000, 0x27590000, 0x2a990000)
   the space 12288K,  27% used [0x26990000, 0x26ce2af8, 0x26ce2c00, 0x27590000)
    ro space 8192K,  63% used [0x2a990000, 0x2aea8b20, 0x2aea8c00, 0x2b190000)
    rw space 12288K,  53% used [0x2b190000, 0x2b805138, 0x2b805200, 0x2bd90000)

Dynamic libraries:
0x00400000 - 0x00424000 	C:\WINDOWS\system32\java.exe
0x7c900000 - 0x7c9b2000 	C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f6000 	C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 	C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f02000 	C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000 	C:\WINDOWS\system32\Secur32.dll
0x7c340000 - 0x7c396000 	C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da8b000 	C:\Program Files\Java\jre6\bin\client\jvm.dll
0x7e410000 - 0x7e4a1000 	C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000 	C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 	C:\WINDOWS\system32\WINMM.dll
0x76390000 - 0x763ad000 	C:\WINDOWS\system32\IMM32.DLL
0x6d7b0000 - 0x6d7bc000 	C:\Program Files\Java\jre6\bin\verify.dll
0x6d330000 - 0x6d34f000 	C:\Program Files\Java\jre6\bin\java.dll
0x6d290000 - 0x6d298000 	C:\Program Files\Java\jre6\bin\hpi.dll
0x76bf0000 - 0x76bfb000 	C:\WINDOWS\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000 	C:\Program Files\Java\jre6\bin\zip.dll
0x6d000000 - 0x6d14a000 	C:\Program Files\Java\jre6\bin\awt.dll
0x73000000 - 0x73026000 	C:\WINDOWS\system32\WINSPOOL.DRV
0x77c10000 - 0x77c68000 	C:\WINDOWS\system32\msvcrt.dll
0x774e0000 - 0x7761d000 	C:\WINDOWS\system32\ole32.dll
0x773d0000 - 0x774d3000 	C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
0x77f60000 - 0x77fd6000 	C:\WINDOWS\system32\SHLWAPI.dll
0x6d230000 - 0x6d284000 	C:\Program Files\Java\jre6\bin\fontmanager.dll
0x10000000 - 0x1000c000 	C:\Program Files\Ditto\focus.dll
0x74720000 - 0x7476c000 	C:\WINDOWS\system32\MSCTF.dll
0x03050000 - 0x03054000 	C:\Program Files\Unlocker\UnlockerHook.dll
0x7c9c0000 - 0x7d1d7000 	C:\WINDOWS\system32\SHELL32.dll
0x03060000 - 0x03073000 	C:\Program Files\PowerMenu\PowerMenuHook.dll
0x755c0000 - 0x755ee000 	C:\WINDOWS\system32\msctfime.ime
0x77c00000 - 0x77c08000 	C:\WINDOWS\system32\VERSION.dll
0x032d0000 - 0x0331d000 	C:\Documents and Settings\muser\My Documents\repos\javarepo\melodai\lib\jogl.dll
0x5ed00000 - 0x5edcc000 	C:\WINDOWS\system32\OPENGL32.dll
0x68b20000 - 0x68b40000 	C:\WINDOWS\system32\GLU32.dll
0x73760000 - 0x737ab000 	C:\WINDOWS\system32\DDRAW.dll
0x73bc0000 - 0x73bc6000 	C:\WINDOWS\system32\DCIMAN32.dll
0x6d360000 - 0x6d366000 	C:\Program Files\Java\jre6\bin\jawt.dll
0x037e0000 - 0x037e5000 	C:\Documents and Settings\muser\My Documents\repos\javarepo\melodai\lib\jogl_awt.dll
0x69500000 - 0x69f60000 	C:\WINDOWS\system32\nvoglnt.dll
0x04860000 - 0x048b7000 	C:\Documents and Settings\muser\My Documents\repos\javarepo\melodai\lib\lwjgl.dll
0x048d0000 - 0x049f9000 	C:\Documents and Settings\muser\My Documents\repos\javarepo\melodai\lib\OpenAL32.dll
0x73f10000 - 0x73f6c000 	C:\WINDOWS\system32\dsound.dll
0x76c30000 - 0x76c5e000 	C:\WINDOWS\system32\WINTRUST.dll
0x77a80000 - 0x77b15000 	C:\WINDOWS\system32\CRYPT32.dll
0x77b20000 - 0x77b32000 	C:\WINDOWS\system32\MSASN1.dll
0x76c90000 - 0x76cb8000 	C:\WINDOWS\system32\IMAGEHLP.dll
0x72d20000 - 0x72d29000 	C:\WINDOWS\system32\wdmaud.drv
0x72d10000 - 0x72d18000 	C:\WINDOWS\system32\msacm32.drv
0x77be0000 - 0x77bf5000 	C:\WINDOWS\system32\MSACM32.dll
0x77bd0000 - 0x77bd7000 	C:\WINDOWS\system32\midimap.dll
0x73ee0000 - 0x73ee4000 	C:\WINDOWS\system32\KsUser.dll
0x68000000 - 0x68036000 	C:\WINDOWS\system32\rsaenh.dll
0x769c0000 - 0x76a74000 	C:\WINDOWS\system32\USERENV.dll
0x5b860000 - 0x5b8b5000 	C:\WINDOWS\system32\netapi32.dll
0x6d610000 - 0x6d623000 	C:\Program Files\Java\jre6\bin\net.dll
0x71ab0000 - 0x71ac7000 	C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 	C:\WINDOWS\system32\WS2HELP.dll
0x71a50000 - 0x71a8f000 	C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 	C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 - 0x76fb8000 	C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000 	C:\WINDOWS\system32\WLDAP32.dll
0x16080000 - 0x160a5000 	C:\Program Files\Bonjour\mdnsNSP.dll
0x76d60000 - 0x76d79000 	C:\WINDOWS\system32\Iphlpapi.dll
0x76fc0000 - 0x76fc6000 	C:\WINDOWS\system32\rasadhlp.dll

VM Arguments:
java_command: melodai.jar
Launcher Type: SUN_STANDARD

Environment Variables:
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
PATH=C:\Program Files\Microsoft DirectX SDK (August 2007)\Utilities\Bin\x86;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program Files\Perforce;C:\Program Files\WinSCP\;C:\Dev\Tools\Common\Bin\widgets3d;C:\Program Files\TortoiseSVN\bin;c:\program files\ant\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server 5.1\bin
USERNAME=muser
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 10, GenuineIntel



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

OS: Windows XP Build 2600 Service Pack 3

CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1

Memory: 4k page, physical 2097151k(1189032k free), swap 4194303k(2836016k free)

vm_info: Java HotSpot(TM) Client VM (14.3-b01) for windows-x86 JRE (1.6.0_17-b04), built on Oct 11 2009 00:52:06 by "java_re" with MS VC++ 7.1

time: Mon Nov 09 16:31:32 2009
elapsed time: 2 seconds


thanks for any help on this!

broumbroum

I use a shutdown hook for openal :
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {

                        public void run() {
                            if (AL.isCreated()) {
                                AL.destroy();
                            }
                        }
                    }));