Wednesday, August 10, 2011

Minecraft crashes after logging in: A fatal error has been detected by the Java Runtime Environment

Question

Minecraft crashes after I click "Login" at the Minecraft Launcher Window. The credentials are valid, and minecraft.net and notch are up because I have tried to launch minecraft on another computer and it works. Things that I have tried and haven't worked:

  • Reinstalled java
  • Installed Java SE7, JDK7, JRE7
  • Reinstalled minecraft, forced update
  • Deleted .minecraft and deleted Minecraft.exe
  • Restarted the computer
  • Forced minecraft to update
  • Checked my internet connection
  • Deleted everything to do with minecraft, including Windows PF files and reinstalled minecraft

Interesting Observations

I noticed that the command that the minecraft.jar file is being run with says that it can have up to 1024mb of ram. I only have ~500mb of ram, so it would be referencing pointers in an unknown location. I also notice a gl issue, which I'm not really sure how to fix.

I have no idea what to do next. After Minecraft crashes, it generates a file named hs_err_pd(random number) which has some interesting crash information. The contents of the file is posted below (with personal information starred out):

Update

The issue does not have to do with Java 7. Updated log file.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5278b517, pid=2480, tid=228
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode windows-x86 )
# Problematic frame:
# C  [atioglx1.dll+0x3fb517]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#---------------  T H R E A D  ---------------Current thread (0x49e4c400):  JavaThread "Minecraft main thread" daemon [_thread_in_native, id=228, stack(0x49c30000,0x49c80000)]siginfo: ExceptionCode=0xc0000005, reading address 0x000000beRegisters:
EAX=0x00000000, EBX=0x00000000, ECX=0x00000000, EDX=0x49c7f4f0
ESP=0x49c7f4b0, EBP=0x52a58040, ESI=0x00000000, EDI=0x52a8e0a8
EIP=0x5278b517, EFLAGS=0x00010206Top of Stack: (sp=0x49c7f4b0)
0x49c7f4b0:   529de368 00000000 42353434 44324645
0x49c7f4c0:   30305c7d 4f5c3030 476e6570 72505c4c
0x49c7f4d0:   000000f0 00000065 00000000 00000000
0x49c7f4e0:   00000000 00000000 527abc8b 49c7f518
0x49c7f4f0:   00000000 00000608 00000000 00008000
0x49c7f500:   00001000 00000000 00000000 00000000
0x49c7f510:   00000000 00000000 49c7f474 49c7f55c
0x49c7f520:   49c7f55c 7c90e920 7c910060 ffffffff Instructions: (pc=0x5278b517)
0x5278b4f7:   e8 74 f5 ff ff b8 01 00 00 00 5f 5d 5e 5b 83 c4
0x5278b507:   30 c2 04 00 cc cc cc cc cc 83 ec 30 53 56 8b f1
0x5278b517:   8a 86 be 00 00 00 84 c0 8b da 74 1c e8 68 07 00
0x5278b527:   00 8a 86 be 00 00 00 84 c0 74 0d 5e b8 c8 00 00 Register to memory mapping:EAX=0x00000000 is an unknown value
EBX=0x00000000 is an unknown value
ECX=0x00000000 is an unknown value
EDX=0x49c7f4f0 is pointing into the stack for thread: 0x49e4c400
ESP=0x49c7f4b0 is pointing into the stack for thread: 0x49e4c400
EBP=0x52a58040 is an unknown value
ESI=0x00000000 is an unknown value
EDI=0x52a8e0a8 is an unknown valueStack: [0x49c30000,0x49c80000],  sp=0x49c7f4b0,  free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [atioglx1.dll+0x3fb517]  atiPPHSN+0x356267Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.opengl.WindowsContextImplementation.nCreate(Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;+0
j  org.lwjgl.opengl.WindowsContextImplementation.create(Lorg/lwjgl/opengl/PeerInfo;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;+10
j  org.lwjgl.opengl.Context.<init>(Lorg/lwjgl/opengl/PeerInfo;Lorg/lwjgl/opengl/ContextAttribs;Lorg/lwjgl/opengl/Context;)V+104
j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;Lorg/lwjgl/opengl/ContextAttribs;)V+88
j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;)V+9
j  org.lwjgl.opengl.Display.create()V+13
j  net.minecraft.client.Minecraft.a()V+135
j  net.minecraft.client.Minecraft.run()V+6
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub---------------  P R O C E S S  ---------------Java Threads: ( => current thread )
=>0x49e4c400 JavaThread "Minecraft main thread" daemon [_thread_in_native, id=228, stack(0x49c30000,0x49c80000)]
  0x49e4cc00 JavaThread "Timer hack thread" daemon [_thread_blocked, id=1168, stack(0x49b80000,0x49bd0000)]
  0x48ff4400 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=1608, stack(0x49570000,0x495c0000)]
  0x003b6800 JavaThread "DestroyJavaVM" [_thread_blocked, id=3492, stack(0x009c0000,0x00a10000)]
  0x490ac400 JavaThread "TimerQueue" daemon [_thread_blocked, id=2700, stack(0x49510000,0x49560000)]
  0x49068400 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=3992, stack(0x494c0000,0x49510000)]
  0x4903b800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=2284, stack(0x49310000,0x49360000)]
  0x4903a400 JavaThread "AWT-Shutdown" [_thread_blocked, id=1032, stack(0x492c0000,0x49310000)]
  0x49037000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3456, stack(0x49260000,0x492b0000)]
  0x48cdf400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3980, stack(0x48f30000,0x48f80000)]
  0x48cdc800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3968, stack(0x48ee0000,0x48f30000)]
  0x48cd7c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=2500, stack(0x48e90000,0x48ee0000)]
  0x48cd6400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2496, stack(0x48e40000,0x48e90000)]
  0x48cc9800 JavaThread "Finalizer" daemon [_thread_blocked, id=3056, stack(0x48df0000,0x48e40000)]
  0x48cc5000 JavaThread "Reference Handler" daemon [_thread_blocked, id=3296, stack(0x48da0000,0x48df0000)]Other Threads:
  0x48cc1000 VMThread [stack: 0x48d50000,0x48da0000] [id=740]
  0x48cea000 WatcherThread [stack: 0x48f80000,0x48fd0000] [id=3964]VM state:not at safepoint (normal execution)VM Mutex/Monitor currently owned by a thread: NoneHeap
 def new generation   total 157248K, used 79087K [0x02a90000, 0x0d530000, 0x17fe0000)
  eden space 139776K,  56% used [0x02a90000, 0x077cbc10, 0x0b310000)
  from space 17472K,   0% used [0x0b310000, 0x0b310000, 0x0c420000)
  to   space 17472K,   0% used [0x0c420000, 0x0c420000, 0x0d530000)
 tenured generation   total 349568K, used 0K [0x17fe0000, 0x2d540000, 0x42a90000)
   the space 349568K,   0% used [0x17fe0000, 0x17fe0000, 0x17fe0200, 0x2d540000)
 compacting perm gen  total 13056K, used 12886K [0x42a90000, 0x43750000, 0x46a90000)
   the space 13056K,  98% used [0x42a90000, 0x43725b78, 0x43725c00, 0x43750000)
No shared spaces configured.Code Cache  [0x00a10000, 0x00bc0000, 0x02a10000)
 total_blobs=1031 nmethods=797 adapters=169 free_code_cache=31814784 largest_free_block=0Dynamic libraries:
0x00400000 - 0x00424000     C:\Program Files\Java\jre6\bin\javaw.exe
0x7c900000 - 0x7c9b2000     C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f6000     C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000     C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f03000     C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000     C:\WINDOWS\system32\Secur32.dll
0x7e410000 - 0x7e4a1000     C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000     C:\WINDOWS\system32\GDI32.dll
0x76390000 - 0x763ad000     C:\WINDOWS\system32\IMM32.DLL
0x629c0000 - 0x629c9000     C:\WINDOWS\system32\LPK.DLL
0x74d90000 - 0x74dfb000     C:\WINDOWS\system32\USP10.dll
0x7c340000 - 0x7c396000     C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d7f0000 - 0x6da9f000     C:\Program Files\Java\jre6\bin\client\jvm.dll
0x76b40000 - 0x76b6d000     C:\WINDOWS\system32\WINMM.dll
0x6bd00000 - 0x6bd0d000     C:\WINDOWS\system32\SYNCOR11.DLL
0x6d7a0000 - 0x6d7ac000     C:\Program Files\Java\jre6\bin\verify.dll
0x6d320000 - 0x6d33f000     C:\Program Files\Java\jre6\bin\java.dll
0x76bf0000 - 0x76bfb000     C:\WINDOWS\system32\PSAPI.DLL
0x6d7e0000 - 0x6d7ef000     C:\Program Files\Java\jre6\bin\zip.dll
0x6d000000 - 0x6d14b000     C:\Program Files\Java\jre6\bin\awt.dll
0x73000000 - 0x73026000     C:\WINDOWS\system32\WINSPOOL.DRV
0x77c10000 - 0x77c68000     C:\WINDOWS\system32\msvcrt.dll
0x774e0000 - 0x7761e000     C:\WINDOWS\system32\ole32.dll
0x773d0000 - 0x774d3000     C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\COMCTL32.dll
0x77f60000 - 0x77fd6000     C:\WINDOWS\system32\SHLWAPI.dll
0x5d090000 - 0x5d12a000     C:\WINDOWS\system32\comctl32.dll
0x5ad70000 - 0x5ada8000     C:\WINDOWS\system32\uxtheme.dll
0x74720000 - 0x7476c000     C:\WINDOWS\system32\MSCTF.dll
0x755c0000 - 0x755ee000     C:\WINDOWS\system32\msctfime.ime
0x7c9c0000 - 0x7d1d7000     C:\WINDOWS\system32\shell32.dll
0x6d230000 - 0x6d27f000     C:\Program Files\Java\jre6\bin\fontmanager.dll
0x6d600000 - 0x6d613000     C:\Program Files\Java\jre6\bin\net.dll
0x71ab0000 - 0x71ac7000     C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000     C:\WINDOWS\system32\WS2HELP.dll
0x6d620000 - 0x6d629000     C:\Program Files\Java\jre6\bin\nio.dll
0x71a50000 - 0x71a8f000     C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000     C:\WINDOWS\system32\DNSAPI.dll
0x76d60000 - 0x76d79000     C:\WINDOWS\system32\iphlpapi.dll
0x76fb0000 - 0x76fb8000     C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000     C:\WINDOWS\system32\WLDAP32.dll
0x64000000 - 0x64025000     C:\Program Files\Bonjour\mdnsNSP.dll
0x76fc0000 - 0x76fc6000     C:\WINDOWS\system32\rasadhlp.dll
0x662b0000 - 0x66308000     C:\WINDOWS\system32\hnetcfg.dll
0x71a90000 - 0x71a98000     C:\WINDOWS\System32\wshtcpip.dll
0x68000000 - 0x68036000     C:\WINDOWS\system32\rsaenh.dll
0x769c0000 - 0x76a74000     C:\WINDOWS\system32\USERENV.dll
0x5b860000 - 0x5b8b5000     C:\WINDOWS\system32\netapi32.dll
0x605d0000 - 0x605d9000     C:\WINDOWS\System32\mslbui.dll
0x6d780000 - 0x6d788000     C:\Program Files\Java\jre6\bin\sunmscapi.dll
0x77a80000 - 0x77b15000     C:\WINDOWS\system32\CRYPT32.dll
0x77b20000 - 0x77b32000     C:\WINDOWS\system32\MSASN1.dll
0x4a220000 - 0x4a28b000     C:\Documents and Settings\***********\Application Data\.minecraft\bin\natives\lwjgl.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
0x77c00000 - 0x77c08000     C:\WINDOWS\system32\VERSION.dll
0x6d350000 - 0x6d356000     C:\Program Files\Java\jre6\bin\jawt.dll
0x69000000 - 0x694ff000     C:\WINDOWS\system32\atioglxx.dll
0x52390000 - 0x52a08000     C:\WINDOWS\system32\atioglx1.dllVM Arguments:
jvm_args: -Xms512m -Xmx1024m 
java_command: C:\Documents and Settings\******************\Desktop\Minecraft.exe
Launcher Type: SUN_STANDARDEnvironment Variables:
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\PC-Doctor for Windows\services;C:\Program Files\ATI Technologies\ATI Control Panel;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jre6\bin
USERNAME=********
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel---------------  S Y S T E M  ---------------OS: Windows XP Build 2600 Service Pack 3CPU:total 2 (1 cores per cpu, 2 threads per core) family 15 model 2 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, htMemory: 4k page, physical 523244k(80324k free), swap 1278552k(391804k free)vm_info: Java HotSpot(TM) Client VM (20.1-b02) for windows-x86 JRE (1.6.0_26-b03), built on May  4 2011 00:50:59 by "java_re" with MS VC++ 7.1 (VS2003)time: Mon Aug 08 16:10:07 2011
elapsed time: 31 seconds

Answer

Let's look at what is happening: Minecraft is trying to do something which returns 0xc0000005.

In ntstatus.h, a list of error code definitions, 0xc0000005 is STATUS_ACCESS_VIOLATION.

MSDN - Analyze Crashes to Find Security Vulnerabilities in Your Apps reports:

Access violation exceptions (STATUS_ACCESS_VIOLATION) are generated by modern processors when a memory access caused by an instruction or program execution does not satisfy certain conditions defined by the processor architecture or memory management unit structures.

So, we now know that Minecraft does something that causes invalid memory access.


But, what exactly is Minecraft doing?

j  org.lwjgl.opengl.WindowsContextImplementation.nCreate(Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;+0
j  org.lwjgl.opengl.WindowsContextImplementation.create(Lorg/lwjgl/opengl/PeerInfo;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;+10
j  org.lwjgl.opengl.Context.<init>(Lorg/lwjgl/opengl/PeerInfo;Lorg/lwjgl/opengl/ContextAttribs;Lorg/lwjgl/opengl/Context;)V+104
j  org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;Lorg/lwjgl/opengl/ContextAttribs;)V+88

Here we see, Minecraft tries to allocate an OpenGL Device Context buffer in memory.

The thread mentioned by Ben Blank has a different stack trace and thus is irrelevant.


We first have to get more knowledge about your memory, which you gave:

I noticed that the command that the minecraft.jar file is being run with says that it can have up to 1024mb of ram. I only have ~500mb of ram, so it would be referencing pointers in an unknown location. I also notice a gl issue, which I'm not really sure how to fix.

Given that low amount of memory, I'm going to guess that your graphics card uses 128 MB shared memory which means that it uses RAM memory to operate. I'm guessing that your Windows uses another 100 MB. There is only 250 MB of memory remaining for Minecraft, and your page file.


Minecraft uses from 512 MB to 1 GB, consider that playing Minecraft will cause disk trashing.

VM Arguments:
jvm_args: -Xms512m -Xmx1024m 


So, now, where does the problem lie?

"so it would be referencing pointers in an unknown location" -- no. Just because you tell it it's allowed to use 1024 MB doesn't mean it ignores allocation errors when it runs out of space and creates invalid addresses out of thin air to reference. For all I know it wouldn't even matter, Windows would just give it space in the page file. - Matthew Read

This comment on the question is not 100% correct, there are exceptions that don't use the page file.

Exactly, OpenGL Device Context buffers must be in RAM; the solution is to buy more RAM.

I doubt if 1 GB will do the job given that Minecraft can use up to 1 GB; better to be safe than sorry and get 2 GB to avoid future problems. This also makes sure you don't experience disk trashing to the page file, which can have a great impact on the performance...

Or well, I could be all wrong and it could be a driver problem. But seriously, 512 MB isn't enough...

No comments:

Post a Comment