Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Windows build crashing, only on some machines

Discussion in 'Editor & General Support' started by Tomer-Barkan, Apr 12, 2016.

  1. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    Hey,

    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...
     
  2. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    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.


    This should help: http://docs.unity3d.com/Manual/LogFiles.html
     
  3. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    I got the log, that's where I found the Access Violation. This is what it says in error.log:
    Code (CSharp):
    1. judgment.exe caused an Access Violation (0xc0000005)
    2.   in module judgment.exe at 0023:00f9610d.
    3.  
    4. Error occurred at 2016-04-12_002500.
    5. C:\Program Files (x86)\Steam\steamapps\common\Judgment\judgment.exe, run by evilc_000.
    6. 31% memory in use.
    7. 0 MB physical memory [0 MB free].
    8. 0 MB paging file [0 MB free].
    9. 0 MB user address space [3363 MB free].
    10. Read from location 000000fe caused an access violation.
    11.  
    12. Context:
    13. EDI:    0x13fc3ad8  ESI: 0x00000001  EAX:   0x26fdf870
    14. EBX:    0x00000000  ECX: 0x00000000  EDX:   0x26fdf870
    15. EIP:    0x00f9610d  EBP: 0x006bf23c  SegCs: 0x00000023
    16. EFlags: 0x00210202  ESP: 0x006bf22c  SegSs: 0x0000002b
    17.  
    18. Bytes at CS:EIP:
    19. 38 8b fe 00 00 00 74 20 c6 00 01 8b 45 14 8b 48
    20.  
    And then there's a stack trace.
    The output_log.txt file:
    Code (CSharp):
    1. Crash!!!
    2. SymInit: Symbol-SearchPath: '.;C:\Program Files (x86)\Steam\steamapps\common\Judgment;C:\Program Files (x86)\Steam\steamapps\common\Judgment;C:\Windows;C:\Windows\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'evilc_000'
    3. OS-Version: 6.3.9600 () 0x300-0x1
    4. C:\Program Files (x86)\Steam\steamapps\common\Judgment\judgment.exe:judgment.exe (00A40000), size: 17604608 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files (x86)\Steam\steamapps\common\Judgment\judgment.exe', fileVersion: 5.3.4.47953
    5. C:\Windows\SYSTEM32\ntdll.dll:ntdll.dll (77AE0000), size: 1503232 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\ntdll.dll', fileVersion: 6.3.9600.18202
    6.  
    7. ...
    8.  
    9.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00F9610D)
    10. 0x00F9610D (judgment)
    11.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00F96281)
    12. 0x00F96281 (judgment)
    13.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00FA231E)
    14. 0x00FA231E (judgment)
    15.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00B14B7B)
    16. 0x00B14B7B (judgment)
    17.  
    18. ...
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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 ?
     
  5. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    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
     
  6. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    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.
     
  7. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
  8. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    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...

    Hmmm, looking over the log again:

    [c:\buildslave\unity\build\runtime\ui\batchgenerator.cpp:220] UI::prepareBatch
    [c:\buildslave\unity\build\runtime\ui\batchgenerator.cpp:257] UI::prepareBatchess
    [c:\buildslave\unity\build\runtime\ui\uijobs.cpp:179] UI::prepareBatchesJob
    [c:\buildslave\unity\build\runtime\ui\uijobs.cpp:294] UI::UIGeometryJob

    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.
     
  9. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    If anyone can get through to unity, case number is 788681.

    Your rambling gets me thinking, so no need to apologize. Thanks for your help.
     
  10. Jokode

    Jokode

    Joined:
    Sep 7, 2014
    Posts:
    2
    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..

    Finally, here is a snippet from the output log.
    Code (CSharp):
    1. ========== OUTPUTING STACK TRACE ==================
    2.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 007D610D)
    3. 0x007D610D (TableTopSoccer)
    4.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 007D6281)
    5. 0x007D6281 (TableTopSoccer)
    6.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 007E231E)
    7. 0x007E231E (TableTopSoccer)
    8.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00354B7B)
    9. 0x00354B7B (TableTopSoccer)
    10.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00354E82)
    11. 0x00354E82 (TableTopSoccer)
    12.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00353D4C)
    13. 0x00353D4C (TableTopSoccer)
    14.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 007E56EB)
    15. 0x007E56EB (TableTopSoccer)
    16.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00354B7B)
    17. 0x00354B7B (TableTopSoccer)
    18.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 003543E0)
    19. 0x003543E0 (TableTopSoccer)
    20.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00354E2A)
    21. 0x00354E2A (TableTopSoccer)
    22.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00353D4C)
    23. 0x00353D4C (TableTopSoccer)
    24.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 0041DD37)
    25. 0x0041DD37 (TableTopSoccer)
    26.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 008AC0EE)
    27. 0x008AC0EE (TableTopSoccer)
    28.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 008B0CAE)
    29. 0x008B0CAE (TableTopSoccer)
    30.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 004F40ED)
    31. 0x004F40ED (TableTopSoccer)
    32. 0x74BC38F4 (KERNEL32) BaseThreadInitThunk
    33. 0x77E45DE3 (ntdll) RtlUnicodeStringToInteger
     
    OuterCloud likes this.
  11. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    @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.

    It will get you a long way to pinpoint the issue.
     
  12. Jokode

    Jokode

    Joined:
    Sep 7, 2014
    Posts:
    2
    Hi Tomer, that is a very good idea - I didn't really realize about the hidden branches on steam! I will do that today - thanks for the tip!
     
  13. Tomer-Barkan

    Tomer-Barkan

    Joined:
    Jul 31, 2012
    Posts:
    150
    Good luck, let us know if you find something.
     
  14. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Any luck finding the problem? I have encountered the same issue, but no one seems to respond to my post.
     
  15. Coredumping

    Coredumping

    Joined:
    Dec 17, 2014
    Posts:
    51
    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.
     
    Last edited: May 14, 2016
  16. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    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)
     
  17. atomicr00ster

    atomicr00ster

    Joined:
    Dec 3, 2012
    Posts:
    2
    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.
     
  18. mortennost

    mortennost

    Joined:
    Oct 8, 2013
    Posts:
    18
    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.
     
  19. Coredumping

    Coredumping

    Joined:
    Dec 17, 2014
    Posts:
    51
    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.
     
  20. sunburnedgames

    sunburnedgames

    Joined:
    Jul 20, 2015
    Posts:
    8
    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.
     
  21. sunburnedgames

    sunburnedgames

    Joined:
    Jul 20, 2015
    Posts:
    8
    If someone still has this problem - gone after we upgraded to 5.4.1
     
    Dave-Carlile likes this.