Hi,
I have some c++ code that I am trying to link with
java. I have followed the recommended steps (javah, compile, link library) and everything compiles fine. When I run my program begins in Java and the C++ code is called correctly. All of the C++ code executes (I checked by inserting some print statements) but the JVM crashes before getting back to the java code.
Here is the error message I get.
I have tried this on 1.4.2_04 and 1.5 (both server and client VM for 1.5).
Any advice, solutions, or work arrounds would be greatly appreciated.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# Internal Error (53484152454432554E54494D450E43505001A1), pid=3936, tid=2188
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode, sharing)
--------------- T H R E A D ---------------
Current
thread (0x00355f48): JavaThread "main" [_thread_in_Java, id=2188]
Stack: [0x00030000,0x00070000), sp=0x0006f560, free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x110e45]
V [jvm.dll+0x60f11]
V [jvm.dll+0xe7fdb]
V [jvm.dll+0xd2881]
V [jvm.dll+0xd3b6a]
V [jvm.dll+0x81534]
V [jvm.dll+0x8841c]
C [javaw.exe+0x14c0]
C [javaw.exe+0x313d]
C [kernel32.dll+0x214c7]
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x009fb308 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3416]
0x009f9ee8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2224]
0x009f9188 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2220]
0x0035f580 JavaThread "Finalizer" daemon [_thread_blocked, id=2216]
0x0035e148 JavaThread "Reference Handler" daemon [_thread_blocked, id=2212]
=>0x00355f48 JavaThread "main" [_thread_in_Java, id=2188]
Other Threads:
0x009f60d0 VMThread [id=2208]
0x009fc510 WatcherThread [id=2232]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 181K [0x22a60000, 0x22b00000, 0x22f40000)
eden space 512K, 35% used [0x22a60000, 0x22a8d490, 0x22ae0000)
from space 64K, 0% used [0x22ae0000, 0x22ae0000, 0x22af0000)
to space 64K, 0% used [0x22af0000, 0x22af0000, 0x22b00000)
tenured generation total 1408K, used 0K [0x22f40000, 0x230a0000, 0x26a60000)
the space 1408K, 0% used [0x22f40000, 0x22f40000, 0x22f40200, 0x230a0000)
compacting perm gen total 8192K, used 22K [0x26a60000, 0x27260000, 0x2aa60000)
the space 8192K, 0% used [0x26a60000, 0x26a65ab8, 0x26a65c00, 0x27260000)
ro space 8192K, 66% used [0x2aa60000, 0x2afb0a70, 0x2afb0c00, 0x2b260000)
rw space 12288K, 46% used [0x2b260000, 0x2b7f3ce0, 0x2b7f3e00, 0x2be60000)
Dynamic libraries:
0x00400000 - 0x0040c000 C:\Program Files\Java\jdk1.5.0\bin\javaw.exe
0x77f50000 - 0x77ff7000 C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f46000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5d000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78087000 C:\WINDOWS\system32\RPCRT4.dll
0x77d40000 - 0x77dcc000 C:\WINDOWS\system32\USER32.dll
0x7e090000 - 0x7e0d1000 C:\WINDOWS\system32\GDI32.dll
0x77c10000 - 0x77c63000 C:\WINDOWS\system32\MSVCRT.dll
0x6d630000 - 0x6d7b4000 C:\Program Files\Java\jdk1.5.0\jre\bin\client\jvm.dll
0x76b40000 - 0x76b6c000 C:\WINDOWS\System32\WINMM.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jdk1.5.0\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\System32\PSAPI.DLL
0x6d600000 - 0x6d60c000 C:\Program Files\Java\jdk1.5.0\jre\bin\verify.dll
0x6d2f0000 - 0x6d30d000 C:\Program Files\Java\jdk1.5.0\jre\bin\java.dll
0x6d620000 - 0x6d62f000 C:\Program Files\Java\jdk1.5.0\jre\bin\zip.dll
0x10000000 - 0x10008000 C:\Documents and Settings\cwalstad\Desktop\poker program\MouseController.dll
VM Arguments:
java_command: com.awesomo.ui.PlayerAction
Environment Variables:
PATH=C:\CBuilderX\bin;C:\Tcl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\j2sdk1.4.2_04\bin;C:\Program Files\Microsoft SDK\Bin\.;C:\Program Files\Microsoft SDK\Bin\WinNT\.;C:\CBuilderX\bin;C:\Program Files\Microsoft SDK\Bin\.;C:\Program Files\Microsoft SDK\Bin\WinNT\.
USERNAME=cwalstad
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 11 Stepping 1, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 1
CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse
Memory: 4k page, physical 261100k(80076k free), swap 1272100k(1053668k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0-beta2-b51) for windows-x86, built on May 13 2004 02:09:25 by "java_re" with MS VC++ 6.0