- Home /
Windows Standalone Crashes in -batchmode , how do I read the strack from the log?
I am running a dedicated server on a Windows Server 2003 VPS. I am running with -batchmode and -nographics enabled. It runs fine for a while, but after a few minutes with multiple people on the server I get a random crash. I can't seem to determine what exactly is the root cause of the crash and the error log doesn't seem to be much help either.
The only thing I can see that doesn't seem right is 'Read from location 00000000 caused an access violation.' which would seem like I am referencing a null reference, but without a readable stack trace, trying to drill this down would be impossible. This crash has never once happened on my mac, even when running with batchmode on my mac.
Is there a way to convert the following to something readable?
Error Log:
Unity Player [version: Unity 3.1.0f3_54715]
WindowsStandalone.exe caused an Access Violation (0xc0000005) in module WindowsStandalone.exe at 0023:005175d0.
Error occurred at 2011-01-17_120112. C:\WindowsStandalone\WindowsStandalone.exe, run by Administrator. 11% memory in use. 1000 MB physical memory [882 MB free]. 1000 MB paging file [882 MB free]. 0 MB user address space [3940 MB free]. Read from location 00000000 caused an access violation.
Context: EDI: 0x00000000 ESI: 0x0563ad18 EAX: 0x00000000 EBX: 0x00000000 ECX: 0x0000001b EDX: 0x00000000 EIP: 0x005175d0 EBP: 0x002df2d0 SegCs: 0x00000023 EFlags: 0x00010246 ESP: 0x002df200 SegSs: 0x0000002b
Bytes at CS:EIP: 8b 28 03 ea 89 2c 03 83 c0 04 83 e9 01 75 f1 eb
Stack: 0x002df200: 002df2d0 002df2d4 0563ad50 005177c5 ..-...-.P.c..wQ. 0x002df210: 00000000 0563abb8 04297fa0 00000003 ......c...)..... 0x002df220: 041cdd74 00000000 00000000 00000000 t............... 0x002df230: 00000000 00000000 00000000 00000000 ................ 0x002df240: 00000000 00000000 00000000 00000000 ................
Not exactly related, but being able to grab a stack trace in code can be helpful in tracking down such crash problems -- you can use System.Environment.StackTrace for this.
Answer by Mike 26 · Jan 19, 2011 at 10:37 PM
I encountered the same problem as you earlier. In our case, we had included a camera in our server scene on accident. Setting the -batchmode flag with a camera in the scene always caused our win32 server to crash (we've only used win32, no idea if this crashes on mac, or some other *nix variant). Our server crashed immediately on run though, we never got to a point when players could spawn. Are you spawning a camera somewhere in the server code?
Hope that helps,
-Mike
You are correct, I was able to finally debug the crash with windmp and found that it had something to do with cameras, so I just disable all cameras if the server is running as a dedicated server.