11

我正在使用用 C 编写的 Windows 启动器启动我的 Java 软件。它基本上加载 jvm.dll 并使用它来初始化 JVM,而不使用 javaw。

现在,我尝试在 64 位上编译它并从 64 位 Java 安装中加载正确的 jvm.dll。

现在,Java 程序启动了,但由于 hs_err_pid 文件而崩溃。看起来 AWT 正在崩溃。

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (os_windows_x86.cpp:149), pid=8812, tid=10816
#  guarantee(result == EXCEPTION_CONTINUE_EXECUTION) failed: Unexpected result from topLevelExceptionFilter
#
# JRE version: 7.0_10-b18
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.6-b04 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   (Blah blah)


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

Current thread (0x0000000009b8c800):  JavaThread "AWT-Windows" daemon [_thread_in_native, id=10816, stack(0x000000000a3c0000,0x000000000a5c0000)]

Stack: [0x000000000a3c0000,0x000000000a5c0000]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.windows.WToolkit.init()Z+0
j  sun.awt.windows.WToolkit.run()V+9
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
=>0x0000000009b8c800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=10816, stack(0x000000000a3c0000,0x000000000a5c0000)]
  0x0000000009b8b800 JavaThread "AWT-Shutdown" [_thread_blocked, id=8348, stack(0x000000000a1c0000,0x000000000a3c0000)]
  0x0000000009b8a800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=7176, stack(0x0000000009fc0000,0x000000000a1c0000)]
  0x0000000007e8b000 JavaThread "Service Thread" daemon [_thread_blocked, id=7228, stack(0x00000000096d0000,0x00000000098d0000)]
  0x0000000007e88000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=9540, stack(0x00000000094d0000,0x00000000096d0000)]
  0x0000000007e76800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=5836, stack(0x00000000092d0000,0x00000000094d0000)]
  0x0000000007e75000 JavaThread "Attach Listener" daemon [_thread_blocked, id=7696, stack(0x00000000090d0000,0x00000000092d0000)]
  0x0000000007e73800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5496, stack(0x0000000008ed0000,0x00000000090d0000)]
  0x0000000007dee000 JavaThread "Finalizer" daemon [_thread_blocked, id=7688, stack(0x0000000008cd0000,0x0000000008ed0000)]
  0x0000000007de5000 JavaThread "Reference Handler" daemon [_thread_blocked, id=4204, stack(0x0000000008ad0000,0x0000000008cd0000)]
  0x000000000036c800 JavaThread "main" [_thread_blocked, id=7928, stack(0x0000000000030000,0x0000000000230000)]

Other Threads:
  0x0000000007ddd800 VMThread [stack: 0x00000000088d0000,0x0000000008ad0000] [id=9680]
  0x0000000007e96000 WatcherThread [stack: 0x00000000098d0000,0x0000000009ad0000] [id=8180]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 14336K, used 1229K [0x00000000f0000000, 0x00000000f1000000, 0x0000000100000000)
  eden space 12288K, 10% used [0x00000000f0000000,0x00000000f01334a8,0x00000000f0c00000)
  from space 2048K, 0% used [0x00000000f0e00000,0x00000000f0e00000,0x00000000f1000000)
  to   space 2048K, 0% used [0x00000000f0c00000,0x00000000f0c00000,0x00000000f0e00000)
 ParOldGen       total 32768K, used 0K [0x00000000d0000000, 0x00000000d2000000, 0x00000000f0000000)
  object space 32768K, 0% used [0x00000000d0000000,0x00000000d0000000,0x00000000d2000000)
 PSPermGen       total 21248K, used 4906K [0x00000000cae00000, 0x00000000cc2c0000, 0x00000000d0000000)
  object space 21248K, 23% used [0x00000000cae00000,0x00000000cb2ca830,0x00000000cc2c0000)

Card table byte_map: [0x0000000005550000,0x0000000005700000] byte_map_base: 0x0000000004ef9000

Polling page: 0x0000000000340000

Code Cache  [0x0000000002490000, 0x0000000002700000, 0x0000000005490000)
 total_blobs=258 nmethods=2 adapters=208 free_code_cache=48728Kb largest_free_block=49896960

Compilation events (4 events):
Event: 0.521 Thread 0x0000000007e76800    1             java.math.BigInteger::destructiveMulAdd (150 bytes)
Event: 0.544 Thread 0x0000000007e76800 nmethod 1 0x00000000024f08d0 code [0x00000000024f0a00, 0x00000000024f0d38]
Event: 0.632 Thread 0x0000000007e88000    2             java.lang.String::hashCode (55 bytes)
Event: 0.637 Thread 0x0000000007e88000 nmethod 2 0x00000000024f2990 code [0x00000000024f2ac0, 0x00000000024f2c38]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (10 events):
Event: 0.621 Thread 0x000000000036c800 Threw 0x00000000f008ef40 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jni.cpp:716
Event: 0.651 Thread 0x000000000036c800 Threw 0x00000000f00a1190 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.654 Thread 0x000000000036c800 Threw 0x00000000f00a4370 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jni.cpp:716
Event: 0.654 Thread 0x000000000036c800 Threw 0x00000000f00a4518 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jni.cpp:716
Event: 0.654 Thread 0x000000000036c800 Threw 0x00000000f00a4690 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jni.cpp:716
Event: 0.665 Thread 0x000000000036c800 Threw 0x00000000f00b5bf0 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.665 Thread 0x000000000036c800 Threw 0x00000000f00b5d18 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.676 Thread 0x000000000036c800 Threw 0x00000000f00b9238 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.677 Thread 0x000000000036c800 Threw 0x00000000f00b9360 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.813 Thread 0x000000000036c800 Threw 0x00000000f00d73f8 at C:\jdk7u2_64p\jdk7u10\hotspot\src\share\vm\prims\jni.cpp:716

Events (10 events):
Event: 0.829 loading class 0x0000000009b17db0 done
Event: 0.829 loading class 0x0000000009afb160
Event: 0.829 loading class 0x0000000009afb160 done
Event: 0.831 loading class 0x0000000009b7ae20
Event: 0.832 loading class 0x0000000009b7ae20 done
Event: 0.835 Thread 0x0000000009b8a800 Thread added: 0x0000000009b8a800
Event: 0.838 loading class 0x0000000009b1f1f0
Event: 0.838 loading class 0x0000000009b1f1f0 done
Event: 0.842 Thread 0x0000000009b8b800 Thread added: 0x0000000009b8b800
Event: 0.903 Thread 0x0000000009b8c800 Thread added: 0x0000000009b8c800


Dynamic libraries:
0x0000000000400000 - 0x0000000000454000     C:\Users\Username\Desktop\Launcher 2\bin\Launcher.exe
0x00000000776e0000 - 0x0000000077889000     C:\Windows\SYSTEM32\ntdll.dll
0x00000000775c0000 - 0x00000000776df000     C:\Windows\system32\KERNEL32.dll
0x000007fefd6e0000 - 0x000007fefd74b000     C:\Windows\system32\KERNELBASE.dll
0x000007fefe2d0000 - 0x000007fefe3ab000     C:\Windows\system32\ADVAPI32.dll
0x000007fefdb50000 - 0x000007fefdbef000     C:\Windows\system32\msvcrt.dll
0x000007fefda00000 - 0x000007fefda1f000     C:\Windows\SYSTEM32\sechost.dll
0x000007feff4c0000 - 0x000007feff5ed000     C:\Windows\system32\RPCRT4.dll
0x00000000774c0000 - 0x00000000775ba000     C:\Windows\system32\USER32.dll
0x000007feff910000 - 0x000007feff977000     C:\Windows\system32\GDI32.dll
0x000007feff900000 - 0x000007feff90e000     C:\Windows\system32\LPK.dll
0x000007feff5f0000 - 0x000007feff6b9000     C:\Windows\system32\USP10.dll
0x000007feff8d0000 - 0x000007feff8fe000     C:\Windows\system32\IMM32.DLL
0x000007fefde60000 - 0x000007fefdf69000     C:\Windows\system32\MSCTF.dll
0x0000000057bb0000 - 0x00000000582cf000     C:\Program Files\Java\jre7\bin\server\jvm.dll
0x000007fefa5f0000 - 0x000007fefa5f9000     C:\Windows\system32\WSOCK32.dll
0x000007feff980000 - 0x000007feff9cd000     C:\Windows\system32\WS2_32.dll
0x000007fefde50000 - 0x000007fefde58000     C:\Windows\system32\NSI.dll
0x000007fefa530000 - 0x000007fefa56b000     C:\Windows\system32\WINMM.dll
0x00000000778b0000 - 0x00000000778b7000     C:\Windows\system32\PSAPI.DLL
0x0000000071fa0000 - 0x0000000072072000     C:\Windows\system32\MSVCR100.dll
0x0000000071060000 - 0x000000007106f000     C:\Program Files\Java\jre7\bin\verify.dll
0x000000006b0a0000 - 0x000000006b0c8000     C:\Program Files\Java\jre7\bin\java.dll
0x000000006ca30000 - 0x000000006ca45000     C:\Program Files\Java\jre7\bin\zip.dll
0x000000005e580000 - 0x000000005e713000     C:\Program Files\Java\jre7\bin\awt.dll
0x000007fefe1f0000 - 0x000007fefe2c7000     C:\Windows\system32\OLEAUT32.dll
0x000007feff6c0000 - 0x000007feff8c3000     C:\Windows\system32\ole32.dll
0x000007fef96a0000 - 0x000007fef96b8000     C:\Windows\system32\DWMAPI.DLL

VM Arguments:
java_command: <unknown>
Launcher Type: generic

Environment Variables:
JRE_HOME=C:\Program Files\Java\jre7
PATH=(Blah blah)
USERNAME=Username
OS=Windows_NT
PROCESSOR_IDENTIFIER=AMD64 Family 15 Model 107 Stepping 2, AuthenticAMD



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

OS: Windows 7 , 64 bit Build 7601 Service Pack 1

CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 107 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, mmxext, 3dnowpref, tsc

Memory: 4k page, physical 3144952k(861460k free), swap 7633028k(3062020k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (23.6-b04) for windows-amd64 JRE (1.7.0_10-b18), built on Nov 28 2012 05:00:40 by "java_re" with unknown MS VC++:1600

time: Tue Sep 10 22:20:47 2013
elapsed time: 1 seconds
4

2 回答 2

1

你是在问你能做些什么来解决这个问题吗?

关于这个主题的一个非常好的文档是来自(最初)Sun的 Java 故障排除指南。有关hs_err_pid*文件的信息,请参阅“系统崩溃故障排除”一章。

请参阅附录 C - 致命错误日志

并注意只有在实际 JVM 崩溃时才会创建 hs_err_pid.log 文件。如果您的应用程序“仅”由于某处未处理的异常而退出,则不会创建此类文件。

您确定崩溃是真正的 JVM 崩溃吗?

于 2013-11-01T20:20:36.533 回答
1

所以,我发现并解决了这个问题。我有一个应用程序清单 ( MSDN ),其中定义了处理器架构x86。我将其更改为*解决问题的方法。

于 2014-02-11T07:47:50.137 回答