大家下午好/晚上好;
我今天写的是我最近在使用 Java 时遇到的一个奇怪问题:每当我尝试运行 Java 应用程序时,它都会崩溃!我搜索了无数网站,多次卸载和重新安装 Java,甚至问过我的几个程序员同事。似乎没有人知道这里发生了什么。
到目前为止,我只有两个潜在的线索:首先,我是 ZoomText 用户(ZoomText 是一个屏幕放大程序)并且当 ZoomText 关闭时 Java 工作正常(据我所知);所以它可能是 Java 和 ZoomText 之间的一些内部/系统级别的“分歧”。其次,每次崩溃(所以每次我启动 Java 时)我都会得到这些标记为 hs_err_pid 的怪异文本文件,后跟随机数。以下是其中一个文件的示例:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x705ba690, pid=3936, tid=424
#
# JRE version: 7.0_25-b17
# Java VM: Java HotSpot(TM) Client VM (23.25-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# V [jvm.dll+0x12a690]
#
# 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:
# http://bugreport.sun.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x04d79400): JavaThread "Thread-2" daemon [_thread_in_vm, id=424, stack(0x05950000,0x059a0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x4d009bc4
Registers:
EAX=0x00000001, EBX=0x345c0010, ECX=0x4d009bb4, EDX=0x00000001
ESP=0x0599f140, EBP=0x0599f17c, ESI=0x04d79400, EDI=0x4d009bb4
EIP=0x705ba690, EFLAGS=0x00010202
Top of Stack: (sp=0x0599f140)
0x0599f140: 0599f234 04d79400 345c0010 0599f234
0x0599f150: 04d79400 345c0010 00000016 00000000
0x0599f160: 38fefa90 0599f198 70493d83 04d79400
0x0599f170: a1bdf85f 04d79400 04d79400 0599f1a0
0x0599f180: 705ce294 345c0010 0599f234 00000001
0x0599f190: 04d79400 023aa624 04d79400 345c0010
0x0599f1a0: 0599f1d8 7055dbda 023aa624 345c0010
0x0599f1b0: 0599f234 04d79400 04d79400 385c01e0
Instructions: (pc=0x705ba690)
0x705ba670: 08 00 cc cc cc cc cc cc cc cc cc cc cc cc cc cc
0x705ba680: 55 8b ec 83 ec 30 53 56 57 8b f9 e8 d0 e3 ff ff
0x705ba690: 8b 47 10 8b 75 14 3b f0 74 34 8b 4f 10 8b 06 8b
0x705ba6a0: 50 40 51 8b ce ff d2 84 c0 74 11 33 db 89 77 10
Register to memory mapping:
EAX=0x00000001 is an unknown value
EBX=0x345c0010 is an oop
java.lang.Object
- klass: 'java/lang/Object'
ECX=0x4d009bb4 is an unknown value
EDX=0x00000001 is an unknown value
ESP=0x0599f140 is pointing into the stack for thread: 0x04d79400
EBP=0x0599f17c is pointing into the stack for thread: 0x04d79400
ESI=0x04d79400 is a thread
EDI=0x4d009bb4 is an unknown value
Stack: [0x05950000,0x059a0000], sp=0x0599f140, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x12a690]
V [jvm.dll+0x13e294]
V [jvm.dll+0xcdbda]
j java.lang.Object.wait(J)V+0
j com.sun.java.accessibility.AccessBridge.getAccessibleNameFromContext(Ljavax/accessibility/AccessibleContext;)Ljava/lang/String;+31
v ~StubRoutines::call_stub
V [jvm.dll+0x124afa]
V [jvm.dll+0x1d224e]
V [jvm.dll+0x124b7d]
V [jvm.dll+0xab2f6]
V [jvm.dll+0xad0d3]
C [JavaAccessBridge-32.dll+0x1307]
C [JavaAccessBridge-32.dll+0xc792] Java_com_sun_java_accessibility_AccessBridge_popupMenuWillBecomeVisible+0x1149
C [JavaAccessBridge-32.dll+0xc86d] Java_com_sun_java_accessibility_AccessBridge_popupMenuWillBecomeVisible+0x1224
C [USER32.dll+0x16238] gapfnScSendMessage+0x270
C [USER32.dll+0x412a1] SendNotifyMessageW+0x341
C [USER32.dll+0x410e2] SendNotifyMessageW+0x182
C [USER32.dll+0x2b160] DrawTextExA+0xd3
C [USER32.dll+0x16238] gapfnScSendMessage+0x270
C [USER32.dll+0x168ea] gapfnScSendMessage+0x922
C [USER32.dll+0x17177] GetWindowLongW+0x18a
C [USER32.dll+0x172f1] GetDC+0xab
C [ntdll.dll+0x100e6] KiUserCallbackDispatcher+0x2e
C [JavaAccessBridge-32.dll+0xca04] Java_com_sun_java_accessibility_AccessBridge_popupMenuWillBecomeVisible+0x13bb
j com.sun.java.accessibility.AccessBridge.run()V+0
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x124afa]
V [jvm.dll+0x1d224e]
V [jvm.dll+0x124caf]
V [jvm.dll+0x124d17]
V [jvm.dll+0xcf06f]
V [jvm.dll+0x144447]
V [jvm.dll+0x1445b0]
V [jvm.dll+0x177bb9]
C [msvcr100.dll+0x5c6de] endthreadex+0x3a
C [msvcr100.dll+0x5c788] endthreadex+0xe4
C [KERNEL32.dll+0x13677] BaseThreadInitThunk+0x12
C [ntdll.dll+0x39d72] RtlInitializeExceptionChain+0x63
C [ntdll.dll+0x39d45] RtlInitializeExceptionChain+0x36
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.Object.wait(J)V+0
j com.sun.java.accessibility.AccessBridge.getAccessibleNameFromContext(Ljavax/accessibility/AccessibleContext;)Ljava/lang/String;+31
v ~StubRoutines::call_stub
j com.sun.java.accessibility.AccessBridge.run()V+0
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x002ca800 JavaThread "DestroyJavaVM" [_thread_blocked, id=992, stack(0x02280000,0x022d0000)]
0x04d89800 JavaThread "AWT-EventQueue-0" [_thread_in_vm, id=1764, stack(0x054d0000,0x05520000)]
0x04d84400 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=1336, stack(0x058c0000,0x05910000)]
=>0x04d79400 JavaThread "Thread-2" daemon [_thread_in_vm, id=424, stack(0x05950000,0x059a0000)]
0x04d31c00 JavaThread "EventQueueMonitor-ComponentEvtDispatch" daemon [_thread_blocked, id=932, stack(0x05030000,0x05080000)]
0x04d16800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=4192, stack(0x05090000,0x050e0000)]
0x04d16000 JavaThread "AWT-Shutdown" [_thread_blocked, id=608, stack(0x04a40000,0x04a90000)]
0x04d13800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3808, stack(0x04fc0000,0x05010000)]
0x023a6000 JavaThread "Service Thread" daemon [_thread_blocked, id=4364, stack(0x04af0000,0x04b40000)]
0x0239d400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=184, stack(0x04a90000,0x04ae0000)]
0x0239c000 JavaThread "Attach Listener" daemon [_thread_blocked, id=3140, stack(0x049d0000,0x04a20000)]
0x02399000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3260, stack(0x04550000,0x045a0000)]
0x02383c00 JavaThread "Finalizer" daemon [_thread_blocked, id=928, stack(0x045b0000,0x04600000)]
0x02382400 JavaThread "Reference Handler" daemon [_thread_blocked, id=3588, stack(0x047b0000,0x04800000)]
Other Threads:
0x02380800 VMThread [stack: 0x04500000,0x04550000] [id=3156]
0x023b8000 WatcherThread [stack: 0x04cb0000,0x04d00000] [id=1532]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 4928K, used 3369K [0x245c0000, 0x24b10000, 0x29b10000)
eden space 4416K, 76% used [0x245c0000, 0x2490a540, 0x24a10000)
from space 512K, 0% used [0x24a10000, 0x24a10000, 0x24a90000)
to space 512K, 0% used [0x24a90000, 0x24a90000, 0x24b10000)
tenured generation total 10944K, used 0K [0x29b10000, 0x2a5c0000, 0x345c0000)
the space 10944K, 0% used [0x29b10000, 0x29b10000, 0x29b10200, 0x2a5c0000)
compacting perm gen total 12288K, used 921K [0x345c0000, 0x351c0000, 0x385c0000)
the space 12288K, 7% used [0x345c0000, 0x346a66e0, 0x346a6800, 0x351c0000)
ro space 10240K, 42% used [0x385c0000, 0x38a04240, 0x38a04400, 0x38fc0000)
rw space 12288K, 54% used [0x38fc0000, 0x39644d58, 0x39644e00, 0x39bc0000)
Card table byte_map: [0x04440000,0x044f0000] byte_map_base: 0x0431d200
Polling page: 0x00220000
Code Cache [0x02440000, 0x02500000, 0x04440000)
total_blobs=296 nmethods=92 adapters=139 free_code_cache=32019Kb largest_free_block=32787904
Compilation events (10 events):
Event: 1.490 Thread 0x0239d400 87 java.lang.AbstractStringBuilder::append (48 bytes)
Event: 1.490 Thread 0x0239d400 nmethod 87 0x024f8fc8 code [0x024f90e0, 0x024f9208]
Event: 1.653 Thread 0x0239d400 88 ! sun.awt.AppContext::get (121 bytes)
Event: 1.654 Thread 0x0239d400 nmethod 88 0x024f94c8 code [0x024f95e0, 0x024f99bc]
Event: 1.714 Thread 0x0239d400 89 ! javax.accessibility.AccessibleBundle::loadResourceBundle (111 bytes)
Event: 1.715 Thread 0x0239d400 nmethod 89 0x024f9e88 code [0x024fa0a0, 0x024fa6cc]
Event: 1.715 Thread 0x0239d400 90 java.lang.ref.Reference::get (5 bytes)
Event: 1.715 Thread 0x0239d400 nmethod 90 0x024fae88 code [0x024faf80, 0x024fb000]
Event: 1.715 Thread 0x0239d400 92 java.util.HashMap$KeySet::contains (9 bytes)
Event: 1.716 Thread 0x0239d400 nmethod 92 0x024fb048 code [0x024fb150, 0x024fb1ec]
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Internal exceptions (10 events):
Event: 0.143 Thread 0x002ca800 Threw 0x24621b70 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jni.cpp:716
Event: 0.199 Thread 0x002ca800 Threw 0x2468efa0 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.199 Thread 0x002ca800 Threw 0x2468f5d8 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.203 Thread 0x002ca800 Threw 0x246a0df0 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.203 Thread 0x002ca800 Threw 0x246a1000 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.204 Thread 0x002ca800 Threw 0x246a4a60 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.204 Thread 0x002ca800 Threw 0x246a4c70 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.739 Thread 0x002ca800 Threw 0x2477dbe8 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.798 Thread 0x002ca800 Threw 0x24783de0 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Event: 0.816 Thread 0x002ca800 Threw 0x24789f20 at C:\jdk7u2_32P\jdk7u25\hotspot\src\share\vm\prims\jvm.cpp:1235
Events (10 events):
Event: 1.652 loading class 0x04d88b48 done
Event: 1.653 loading class 0x39c90328
Event: 1.654 loading class 0x04d3bfd8
Event: 1.654 loading class 0x04d3bfd8 done
Event: 1.702 loading class 0x04d3bc78
Event: 1.702 loading class 0x04d3bc78 done
Event: 1.704 loading class 0x04d9df78
Event: 1.704 loading class 0x04d9df78 done
Event: 1.716 loading class 0x04d3d538
Event: 1.716 loading class 0x04d3d538 done
Dynamic libraries:
0x00360000 - 0x0038f000
0x77600000 - 0x77780000
0x71b80000 - 0x71bbf000
0x75c50000 - 0x75d50000
0x77060000 - 0x770a6000
0x77160000 - 0x77200000
0x751d0000 - 0x7527c000
0x77140000 - 0x77159000
0x76f70000 - 0x77060000
0x75170000 - 0x751d0000
0x75160000 - 0x7516c000
0x75310000 - 0x75410000
0x76160000 - 0x761f0000
0x75490000 - 0x7549a000
0x75bb0000 - 0x75c4d000
0x73540000 - 0x736de000
0x75da0000 - 0x75df7000
0x75a20000 - 0x75a80000
0x76e40000 - 0x76f0c000
0x707e0000 - 0x7089e000
0x70490000 - 0x707d2000
0x73860000 - 0x73867000
0x75e00000 - 0x75e35000
0x76150000 - 0x76156000
0x74dc0000 - 0x74df2000
0x75f00000 - 0x75f05000
0x74bd0000 - 0x74bdc000
0x74ad0000 - 0x74af0000
0x742b0000 - 0x742c3000
0x70340000 - 0x70484000
0x75280000 - 0x7530f000
0x756c0000 - 0x7581c000
0x74ab0000 - 0x74ac3000
0x750a0000 - 0x75120000
0x67af0000 - 0x67b0b000
0x739f0000 - 0x73a93000
0x73960000 - 0x739ee000
0x73850000 - 0x73859000
0x67b80000 - 0x67bcd000
0x74b70000 - 0x74bac000
0x761f0000 - 0x76e39000
0x71410000 - 0x714ab000
0x715d0000 - 0x71657000
0x754d0000 - 0x7566d000
0x75e40000 - 0x75e67000
0x756a0000 - 0x756b2000
0x67c20000 - 0x67c26000
0x10000000 - 0x1003f000
0x67ef0000 - 0x67f19000
0x734a0000 - 0x734c0000
0x74be0000 - 0x74be6000
0x74070000 - 0x74076000
0x67c60000 - 0x67c79000
0x67fa0000 - 0x67fca000
0x73460000 - 0x73491000
0x73440000 - 0x73454000
0x72050000 - 0x7208c000
0x72030000 - 0x72036000
0x74060000 - 0x7406f000
0x727d0000 - 0x72800000
0x708f0000 - 0x7095c000
0x733d0000 - 0x733de000
0x73f10000 - 0x73ffb000
VM Arguments:
java_command: C:\Users\Owner\Desktop\My Projects\Java projects\QuizApp\QuizApp.jar
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=C:\Program Files\Java\jdk1.7.0_21\bin
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Java\jdk1.7.0_21\bin
USERNAME=Owner
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 37 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7600
CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 37 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht, tsc, tscinvbit
Memory: 4k page, physical 2086740k(927864k free), swap 4173480k(2773328k free)
vm_info: Java HotSpot(TM) Client VM (23.25-b01) for windows-x86 JRE (1.7.0_25-b17), built on Jun 21 2013 13:06:48 by "java_re" with unknown MS VC++:1600
time: Tue Sep 17 17:32:15 2013
elapsed time: 1 seconds
现在我写 Java 的时间已经够久了,我知道这绝对不是 Java 代码——它几乎看起来像是加密的东西,或者是比特或字节级别的东西,一些我很想理解的深暗操作系统级别的东西,但是不要(还)。也许只是我的电脑告诉我停止编写 Java 并切换到 Python 或 PHP!:)
不过说真的,我以前从未见过这样的事情,而且我完全不知道还有什么办法可以解决它。这不仅仅是我创建的应用程序——它影响到甚至使用 Java 的任何事物。我点击的任何运行 Java 的东西都会崩溃。
但无论如何,这里有一些我在谷歌上找到的更多信息。显然玩“我的世界”游戏的人也遇到了同样的问题,但似乎没有人有解决办法。一个人说这是驱动程序的问题,您需要卸载/重新安装驱动程序(这对我来说听起来像是一个冒险的计划;但也许不是;我还不知道驱动程序的东西,所以也许是这样)。还有一个人说这与清除 Java 缓存(我尝试过)有关,另一个人认为这与“显卡”有关(遗憾的是,我对硬件的了解比对驱动程序的了解要少)。但我认为其中一些理论可能会有所帮助。
提前感谢您提供有关该主题的任何见解或信息。我真的很感激。