We just released our first game, and it’s working just fine for hundreds of people, but a few are getting crashes due to “Access Violation”.
Couldn’t find anything in common, one had an AMD graphics card, the other nVidia. One had windows 10, the other windows 8…
Any ideas? I have no idea how to begin to debug this. I tried upgrading unity to 5.3.4p2 because I saw several crash issues were fixed, but it didn’t help. I also contacted Unity support but who knows when/if they will answer…
A player log should be created when this happens. I’m not sure where it’s stored and it differs based on environment, but you should be able to google the location. The log may contain something useful to point you in the right direction.
All you have is this log? do you have any other useful information?
For example - a crash reporting system where this crash was reported with some more information? or the actual crash minidump file ?
Also - are you able to reproduce this crash yourself ? if not, do you have any data tracking for this particular player to help you pinpoint what steps were performed just around the time of crash ?
I do have a dump file, unfortunately I can’t reproduce myself.
I can’t find any useful information in the dump file.
There doesn’t seem to be anything in common with all the times this happens. Unfortunately there is no stack trace so it’s hard to tell. After updating to Unity 5.3.4p2 (latest patch) - the crash still happens, but it no longer appears in the output log and there is no error.log
You might want to look into integrating some sort of crash reporting system into your game. Here is an example asset (no idea if it works) that can send crash reports to an email address. If you can send your app to a specific user then you might try doing a development build which includes debug symbols and such. This might be better at crash dumps and stack traces? But that is just a wild guess and it’s not something I’ve looked into or relied on.
I have a trace system I can conditionally compile into my game that lets me do very detailed (and expensive) logging of what’s going on. Something like that would allow you to narrow down the code that’s executing during the crash. That would no doubt be a very intrusive change for you at this point and the least desirable option, but sometimes you gotta do what you gotta do.
Definitely looks like something in Unity - something with the batching specifically. I don’t know the best way to contact support but it seems like it’s something they would need to look into. File a bug report and include all of the data you can and mention the issue number here. Maybe someone here can get the attention of the devs so they can take a look.
Otherwise, ugh. Since it seems batching related - if it were me, while I’m waiting/hoping for a Unity dev to response, I’d probably start mucking with things to do with batching… trying to change the order of things - maybe force something to not batch when it ordinarily would. For example I’ve had a couple of situations where something would cause Unity’s compiler to crash, so I’d change the code around until it stopped crashing. Ugly as sin to be sure, and especially difficult if you’re having to give new versions to a customer to try out…
It seems like it’s probably UI related as well. That might help target things you try to change or inform the questions you ask the customer it’s happening to? “What were you doing with the UI at the time?” Sorry, I’m pretty much rambling at this point.
Just wanted to add to this, I am also seeing similar crashes with my game too. I have had two users report this client crash, and I cannot reproduce it myself at all. I am very reluctant to add in custom logging as the we all know that it is expensive, and the game is now in production… I also very little idea what is causing this problem so I would be adding logging all over the place to get to the bottom of it…
However, one (possibly) useful thing that one of these two users has confirmed (the other one hasn’t confirmed yet) - this crash only happens when he is running the game in Windowed mode. He can play without issues in Fullscreen. This user is running AMD Radeon HD 8470D, the other one is an NVidia card.
Not sure if this is the same issue as OP, but thought I would at least mention this windowed mode thing in case it helps Unity get to the bottom of this…
@Jokode , one thing you really need is to get these crash logs with debug symbols, it will show you where it is crashing.
No need to add custom logs for that, just a development build.
If you have anyone that has this crashes happen consistently, just send them a dev build. If you’re using steam you can use a hidden branch for that.
I am now stumbling into the same problem after updating to 5.3.4p3 and 5.3.4p6. I’ve found this thread by searching specifically for “Read from location 000000fe caused an access violation.” It’s interesting that “000000fe” is present in the logs I’ve received as well.
The crash seems to happen in builds both with and without Steam integration, 32bit and 64bit and mostly on Windows 8+ systems.
Edit:
Found this thread about Rust searching specifically for the 00000fe violation: https://facepunch.com/showthread.php?t=1509581
The overlap here seems to be “[c:\buildslave\unity\build\runtime\jobs\internal\jobqueue.cpp:347] JobQueue::Exec”
Edit:
Since this issue was also present for OP in Unity 4(?) and is not present in an older build of my game in Unity 5.2, this must be related to a specific feature of Unity that is breaking.
We get a lot of these crash reports from customers in our games Verdun and Marooners. Seems to be since 5.2 for us.
I’ve filed a big report with several dumps (but no debug dumps unfortunately, case #803315)
I recently upgraded my project to Unity 5 (5.3.4) and am noticing these ‘Attempt to access invalid address.’ crashes quite frequently now. Would love to find some sort of resolution here.
Does anyone have more information about this? Or even managed to find a workaround for it?
We also have a fair bit of customers experiencing this issue. For some it happens at a random point in the game, and then not again after restarting. For others it’s a concurrent issue in one or more specific spots. We haven’t been able to find anything specific that may cause this other than it seems to be on Windows machines only.
EDIT: This seems to have started happening after building standalone Windows builds after the 5.3 update.
Unfortunately, seeing as this is not easily reproducible, I couldn’t get any help from Unity support. However, I’m currently on Unity 5.3.5p3 and it seems to be gone.
I had a hunch that it might have something to do with a thread I start on launch to download a news feed from a website using .NET’s web request class. I wrote some code to abort the thread if the scene is changed, which might have had some influence. It’s the only thing I could think of that might fail after a random amount of time after having changed scenes, which was when the crash would occur.
We have a few players who have reported the same problem. Strangely Visual Studio can’t find batchgenerator.cpp despite us using the Unity symbol server and the Steam build for the debugging of the crashdump. If someone has found a solution by now, please let us know.