• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by mBeierl · Apr 09, 2015 at 09:48 PM · editorbuildcrash

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?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlwaysSunny · Apr 09, 2015 at 09:47 PM 1
Share

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

avatar image Owen-Reynolds · Apr 10, 2015 at 02:29 AM 0
Share

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.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity game crashes when build but not in editor 0 Answers

Debugging and logging crashing? 1 Answer

Distribute terrain in zones 3 Answers

Unity crashes if i dont build first. 0 Answers

Unity application randomly freezing on occasion 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges