Help with Unity Crash error

Hello there everyone. I hope this is the correct place to ask for help.

Im a staff member for the game 7 Days To Die. And some of our users are experiencing a crash when they try start up the game. We’re unable to find out what is causing the issue. Is there any chance any of you know? Below is the crash log our user’s are providing us with.

Most of our users are running Windows 7 32bit or 64bit.
Thank you for your help in advance.

Unity Player [version: Unity 4.2.0f4_38efbd14869d]

7DaysToDie.exe caused an Access Violation (0xc0000005)
in module 7DaysToDie.exe at 0033:3f8d5365.

Error occurred at 2013-09-08_164824.
C:\Program Files (x86)\7DaysToDie-Alpha\7DaysToDie.exe, run by a.
40% memory in use.
4095 MB physical memory [2433 MB free].
10234 MB paging file [8009 MB free].
8388608 MB user address space [8388450 MB free].
Read from location 00000000 caused an access violation.

Context:
RDI: 0x00000000 RSI: 0x00000000 RAX: 0x00000000
RBX: 0x00000001 RCX: 0xffffffff RDX: 0x00000000
RIP: 0x3f8d5365 RBP: 0x002af910 SegCs: 0x00000033
EFlags: 0x00010246 RSP: 0x002af810 SegSs: 0x0000002b
R8: 0x00000000 R9: 0x00000000 R10: 0x00000037
R11: 0x002af940 R12: 0x03da8a68 R13: 0x00000000
R14: 0x00000002 R15: 0x0273c340

Bytes at CS:EIP:
f2 ae 48 f7 d1 4c 8d 41 ff 48 8d 4d d8 e8 99 74 Module 1
C:\Windows\system32\MSVCR100.dll
Image Base: 0x74730000 Image Size: 0x000d2000
File Size: 829264 File Time: 2011-06-11_011538
Version:
Company: Microsoft Corporation
Product: Microsoft® Visual Studio® 2010
FileDesc: Microsoft® C Runtime Library
FileVer: 10.0.40219.325
ProdVer: 10.0.40219.325

Module 2
C:\Windows\system32\USER32.dll
Image Base: 0x76d80000 Image Size: 0x000fa000
File Size: 1008128 File Time: 2010-11-20_142728
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: Multi-User Windows USER API Client DLL
FileVer: 6.1.7601.17514
ProdVer: 6.1.7601.17514

Module 3
C:\Windows\system32\kernel32.dll
Image Base: 0x76e80000 Image Size: 0x0011f000
File Size: 1162752 File Time: 2011-07-16_063714
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: Windows NT BASE API Client DLL
FileVer: 6.1.7601.17651
ProdVer: 6.1.7601.17651

Module 4
C:\Windows\SYSTEM32\ntdll.dll
Image Base: 0x77310000 Image Size: 0x001a9000
File Size: 1731920 File Time: 2011-11-17_074120
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: NT Layer DLL
FileVer: 6.1.7601.17725
ProdVer: 6.1.7601.17725

Module 5
C:\Windows\system32\PSAPI.DLL
Image Base: 0x774e0000 Image Size: 0x00007000
File Size: 9216 File Time: 2009-07-14_024154
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: Process Status Helper
FileVer: 6.1.7600.16385
ProdVer: 6.1.7600.16385


== [end of error.log] ==

You can find more reports here http://7daystodie.com/forums/forum/game-support/help-support/105208-oops-the-game-crashed

What does the player log say?

Not support myself but just going to say im having the same issues with every unity game and im also using windows 7 64 bit. Identical error except for what game causes it. Access violation. My personal suspicion says it might have something to do with DEP or “Data execution protection” that windows 7 has wired on everything. But i haven’t been able to confirm this, any attempts to shut DEP down has so far been inconclusive. Not sure if i managed to shut it down at all to test my theory. In the end it might not be related to that at all.

Hi there. Thanks for the reply. Unfortunately we do not have access to a computer on which the game crashes so far and players are finding it hard to provide us with logs we’re wanting since they don’t understand our requests.
But we did do a small test application that only shows a button and asked a customer to start it and it crashes as well…

Is it possible that it may be something like .net frameworks missing? Because we’ve asked them to install that, and microsoft visual c++ 2008 and 2010 which usually fixes most crashes. But to no avail with these guys.

I have attached two crash logs though. Maybe this is actually what you are asking for? One is from the game. The other the test program

Thats exactly what we see on some our customer’s computers. But we don’t have access to their computer’s so helping them is rather difficult. And teamviewer isn’t easy to really use since our support is ticket based so they are likely to not be on while we’re answering their ticket.

We’ve had our fair share of similar reports from Steam users. Apologies in advance if some of this is teaching you to suck eggs.

0x00000000 are NULL reference pointer errors ( I saw one user in your forum report this ). To help you detect null variables, you might want to add checks to your code, and output some debug info if a variable you expected to not be null is null. Generally these are easy enough to fix.

if ( myObj != null )
   // do something
else
  // output debug info

Here’s an example of code that might cause a null reference pointer crash:

MyComponent component = gameObject.GetComponent<MyComponent> ();
component.MyMethod ();

// if gameObject doesn't have MyComponent attached you'd be calling MyMethod() on a NULL pointer which would result in a crash. The code would however compile without issue.

0xc0000005 can be caused by all sorts of things. Often looking at the stack trace we’re able to get a hint at what’s happening, although frankly they are incredibly time consuming to track down because there is often no associated log entry. In our case it looked like passing an animation name to to CrossFadeQueued that doesn’t exist was causing a crash. They are difficult to find though because there’s no exception raised, it’s a full blown crash. Sometimes it’s a bug in Unity.

The best course of action we’ve found is to understand what is happening in the game when the crash happens. Then trying to narrow down the code being executed prior to the crash happening by dumping out a lot of debug info. And looking carefully at the stack output to see if it offers any clues as to what might be happening.

We get by, but I’d love to hear from others how they approach fixing crashes using just the stack output. Let’s face it, any bug that writes something to the output log is simple to fix. Null pointer crashes are easy enough to fix with a detailed debug trail and the 0x0000 error code. It’s these darn 0xc00000005 crashes that are the killers.

What’s your memory footprint when running the game? Anything above 1.25GB and you’re going to start having memory-related problems on 32-bit builds.

Thank you very much for your answer.
Regarding the null reference checks and your example: I would rather expect a NRE (NullReferenceException) than a crash of Mono/Unity Player if I access a null reference. Or at least this is my experience so far.

Regarding the memory issue: this problem is only about “Unity player crashes on startup”. We are aware that an out-of-memory situation leads to a Unity player crash.

Thanks again

NRE won’t help when you pass a null pointer into an unmanaged Unity API method that will case an 0x0000000 crash. We wrapped most of our common code blocks in try statements in the internal development builds to help with debugging and not one gets triggered ( because the error isn’t occuring in managed Mono code ). We’ll probably remove them in the final version because they are meant to be expensive ( although I’ll have to run some speed tests first ).

Read from location 00000000 caused an access violation. - that’s got null reference pointer written all over it.

https://www.google.co.uk/#newwindow=1&q=Read+from+location+00000000+caused+an+access+violation.+null+pointer

Sorry for this rather late reply.
Im well aware of this. But keep in mind the game is crashing on startup. AKA, it won’t start. It’s not occurring during the game at all. Some of our users are unable to start the game at all.

And sadly none of us have been able to find a PC with this issue that we have access to so we can try and fix it.
Im trying to get dxdiag reports from our users and find out if they’re perhaps missing something required from Unity. But sadly not much luck there yet.