- Home /
Unity crashes with Access Violation
The Editor as well as standalone build crash on a specific action. Debugging won't do it for me.
In the error.log I get this message:
mygame.exe caused an Access Violation (0xc0000005)
in module mygame.exe at 0023:0137ed42.
Is it possible to see what is "at 0023:0137ed42", so I can identify the issue and resolve it in code?
I don't believe you can make use of that information in a helpful way. If you can, I certainly haven't discovered how to do so.
Is the address the same each time? I would be surprised... I actually asked a similar question very recently and never got a response. In my case, I have a suspicion that the OS throttled the maximum memory allocated to the game and the error was a result of some memory-intensive operation or combination of operations.
Luckily for you, you mentioned identifying a specific action which brings about this crash, right? That gives you a place to start looking. Trace your logic (use debug mode, debug statements, break points, the profiler, whatever you can) to identify what's causing the problem.
See also: http://blogs.msdn.com/b/jasone/archive/2014/11/12/what-is-an-access-violation.aspx
I feel like out-of-memory is it's own specific error. An access violation is more like a NullReferenceException. Are you using unmanaged code, or a .dll? I'm not sure how vanilla C# can even get an Access violation.
Answer by Seneral · Sep 02, 2015 at 05:38 PM
Read my post here, basically, if your code causes this, reading the stack trace here C:\Users*User*\AppData\Local\Unity\Editor\Editor.log should give you more information on what is causing this. Of course that requires you to reproduce the error in the editor
Answer by Ickity-Games · May 14, 2020 at 07:19 PM
Yeah but My code didn't cause this error for umteen iterations of Unity but when I updated to 2019.3.12f I'm getting this error
Your answer
Follow this Question
Related Questions
Unity application randomly freezing on occasion 2 Answers
Debugging and logging crashing? 1 Answer
Unity game crashes when build but not in editor 0 Answers
Distribute terrain in zones 3 Answers
Unity crashes if i dont build first. 0 Answers