Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Crash after almost every compile (on script change)

Discussion in 'Editor & General Support' started by Ludiq, May 26, 2016.

  1. Ludiq

    Ludiq

    Joined:
    Mar 6, 2015
    Posts:
    594
    The editor crashes after almost every compile (I don't mean when I build the game; just when I make a script change and the C# projects are recompiled). For obvious reasons, this has become infuriating (adding a single space in any of my scripts will cause a crash).

    I know it happens after the compile phase because, when I reopen Unity, the scripts have been updated with the changes (i.e. I can play with the modified behaviours). However, I have no idea what Unity does after a compile, and I can't find any documentation about it.

    I'm getting a Unity Error Reporter dialog but I don't know how to interpret the crash logs to help me figure out what's wrong. Access violation at memory adresses don't help me much...

    Because I am using @alexzzzz 's (awesome) C# 5.0 and 6.0 integration in Unity, I doubt Unity will even consider the bug report; it'll likely be dismissed as a side-effect of hacking the build process. But, as I said, the compilation works; it's what comes after that doesn't. And that mystery phase is not affected by the wrapper.

    Besides, this bug didn't happen before (in other words: the C# 6 integration used to work flawlessly). I can't pin-point when it started happening, though. I can try to go through my older commits to try and figure out what changed to cause it, but it's a very, very tedious process. If you have any idea as to what may be going on, please let me know!

    (If it means anything to anyone, here are the logs)

    error.log
    Code (csharp):
    1. Unity Editor [version: Unity 5.3.5f1_960ebf59018a]
    2.  
    3. Unity.exe caused an Access Violation (0xc0000005)
    4.   in module Unity.exe at 0033:40318f50.
    5.  
    6. Error occurred at 2016-05-26_101052.
    7. C:\Program Files\Unity\Editor\Unity.exe, run by [Redacted].
    8. 28% memory in use.
    9. 16338 MB physical memory [11685 MB free].
    10. 32722 MB paging file [27223 MB free].
    11. 134217728 MB user address space [134214526 MB free].
    12. Read from location 20f804f0 caused an access violation.
    13.  
    14. Context:
    15. RDI:    0x20f804f0  RSI: 0x005fe140  RAX:   0x00000000
    16. RBX:    0x244bbee0  RCX: 0xffffffff  RDX:   0x20f804f0
    17. RIP:    0x40318f50  RBP: 0x005fe059  SegCs: 0x00000033
    18. EFlags: 0x00010286  RSP: 0x005fdfd0  SegSs: 0x0000002b
    19. R8:    0x00000000  R9: 0x00000000  R10:   0x064ac080
    20. R11:    0x005fe118  R12: 0x00000000  R13:   0x00000000
    21. R14:    0x068cb750  R15: 0x00000000
    22.  
    23. Bytes at CS:EIP:
    24. f2 ae 48 f7 d1 4c 8d 41 ff 48 8d 4d 0f e8 1e 9a
    25.  
    26. Stack:
    27. 0x005fdfd0: 00000000 00000000 bf1b0abd 00007ff8 ................
    28. 0x005fdfe0: 24f9da20 00000000 89c791f5 00007ff8  ..$............
    29. 0x005fdff0: 22507450 00000000 005fe060 00000000 PtP"....`._.....
    30. 0x005fe000: 00000000 0000b769 005fe140 00000000 ....i...@._.....
    31. 0x005fe010: fffffffe ffffffff 89c66a00 00007ff8 .........j......
    32. 0x005fe020: 24f9da20 00000000 00000000 00000000  ..$............
    33. 0x005fe030: 0000000f 00000000 00000000 00000000 ................
    34. 0x005fe040: 24f9da00 00000000 89c61bf8 00007ff8 ...$............
    35. 0x005fe050: 00000000 00000000 0000000f 00000000 ................
    36. 0x005fe060: 00000000 00000000 00000000 00000000 ................
    37. 0x005fe070: 0a995970 00000000 00000000 00000000 pY..............
    38. 0x005fe080: 0000000f 00000000 00000000 00000000 ................
    39. 0x005fe090: b42bba3f 0000b769 8760df70 00000000 ?.+.i...p.`.....
    40. 0x005fe0a0: 088db200 00000000 244bbee0 00000000 ..........K$....
    41. 0x005fe0b0: 005fe139 00000000 4032051c 00000001 9._.......2@....
    42. 0x005fe0c0: 00000000 00000000 00000000 00000000 ................
    43. 0x005fe0d0: 00000000 00000000 00000000 00000000 ................
    44. 0x005fe0e0: 8760df70 00000000 404c8b58 00000001 p.`.....X.L@....
    45. 0x005fe0f0: 00000000 00000000 8760df70 00000000 ........p.`.....
    46. 0x005fe100: 00000000 00000000 89b784f7 00007ff8 ................
    47. 0x005fe110: fffffffe ffffffff 73616c43 746f4e73 ........ClassNot
    48. 0x005fe120: 6e756f46 00000064 0000000d 00000000 Found...........
    49. 0x005fe130: 0000000f 00000000 00000000 00000000 ................
    50. 0x005fe140: 00400000 00000000 24f9da20 00000000 ..@..... ..$....
    Editor.log
    Code (csharp):
    1.  
    2. LICENSE SYSTEM [2016526 10:7:57] No start/stop license dates set
    3.  
    4. LICENSE SYSTEM [2016526 10:7:57] Next license update check is after 2016-05-24T21:32:04
    5.  
    6. Built from '5.3/release' branch; Version is '5.3.5f1 (960ebf59018a) revision 9834175'; Using compiler version '160040219'
    7. OS: 'Windows 10  (10.0.0) 64bit' Language: 'en' Physical Memory: 16338 MB
    8. BatchMode: 0, IsHumanControllingUs: 1, StartBugReporterOnCrash: 1, Is64bit: 1, IsPro: 0
    9. Initialize mono
    10. Mono path[0] = 'C:/Program Files/Unity/Editor/Data/Managed'
    11. Mono path[1] = 'C:/Program Files/Unity/Editor/Data/Mono/lib/mono/2.0'
    12. Mono path[2] = 'C:/Program Files/Unity/Editor/Data/UnityScript'
    13. Mono config path = 'C:/Program Files/Unity/Editor/Data/Mono/etc'
    14. Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56116
    15. IsTimeToCheckForNewEditor: Update time 1464216650 current 1464271759
    16. C:/Users/[Redacted]
    17. Loading GUID <-> Path mappings...0.000396 seconds
    18. Loading Asset Database...0.064186 seconds
    19. Audio: FMOD Profiler initialized on port 54900
    20. AssetDatabase consistency checks...0.308125 seconds
    21. Initialize engine version: 5.3.5f1 (960ebf59018a)
    22. GfxDevice: creating device client; threaded=1
    23. Direct3D:
    24.     Version:  Direct3D 11.0 [level 11.0]
    25.     Renderer: NVIDIA GeForce GTX 970 (ID=0x13c2)
    26.     Vendor:   NVIDIA
    27.     VRAM:     4008 MB
    28. Begin MonoManager ReloadAssembly
    29. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEngine.dll (this message is harmless)
    30. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\UnityEditor.dll (this message is harmless)
    31. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.Locator.dll (this message is harmless)
    32. Refreshing native plugins compatible for Editor in 40.38 ms, found 2 plugins.
    33. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\I18N.dll (this message is harmless)
    34. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\I18N.West.dll (this message is harmless)
    35. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.DataContract.dll (this message is harmless)
    36. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Core.dll (this message is harmless)
    37. Platform assembly: C:\Program Files\Unity\Editor\Data\Managed\Unity.IvyParser.dll (this message is harmless)
    38. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.dll (this message is harmless)
    39. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Xml.dll (this message is harmless)
    40. Platform assembly: C:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\System.Configuration.dll (this message is harmless)
    41. Platform assembly: C:\Program Files\Unity\Editor\Data\PackageManager\Unity\PackageManager\5.3.5\Unity.PackageManager.dll (this message is harmless)
    42. Initializing Unity.PackageManager (PackageManager) v5.3.5 for Unity v5.3.5f1
    43. Setting StandaloneWindows v5.3.5 for Unity v5.3.5f1 to C:\Program Files\Unity\Editor\Data\PlaybackEngines\WindowsStandaloneSupport
    44. Setting Advertisements v5.3.5 for Unity v5.3.5f1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\Advertisements
    45.   UnityEngine.Advertisements.dll (Extension) GUID: 739bbd9f364b4268874f9fd86ab3beef
    46.   Editor/UnityEditor.Advertisements.dll (Extension) GUID: 97decbdab0634cdd991f8d23ddf0dead
    47. Setting EditorTestsRunner v5.3.5 for Unity v5.3.5f1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\EditorTestsRunner
    48.   Editor/nunit.framework.dll (Extension) GUID: 7cbab2be89b54486bbd23a6fe637d30e
    49.   Editor/UnityEditor.EditorTestsRunner.dll (Extension) GUID: 3c0ad459c1534645b5d603b7cc258f97
    50. Setting GUISystem v5.3.5 for Unity v5.3.5f1 to C:\Program Files\Unity\Editor\Data\UnityExtensions\Unity\GUISystem
    51.  
    compilation.log (from the C# 6.0 wrapper)
    Code (CSharp):
    1. ********************************************************************************
    2. *                      Thursday, May 26, 2016 10:21:05 AM                      *
    3. ********************************************************************************
    4. CSharpCompilerWrapper.exe version: 1.7.0.0
    5. Platform: Windows
    6. Target assembly: Assembly-CSharp-firstpass.dll
    7. Project directory: C:\Users\[Redacted]
    8. Unity 'Data' or 'Frameworks' directory: C:/Program Files/Unity/Editor/Data
    9. Compiler: Microsoft C# 6.0
    10.  
    11. - Compilation -----------------------------------------------
    12.  
    13. Process: C:\Users\[Redacted]\CSharp60Support\Roslyn\csc.exe
    14. Arguments: -nostdlib+ -noconfig -nologo -r:"C:/Program Files/Unity/Editor/Data\Mono/lib/mono/2.0/mscorlib.dll" -r:"C:/Program Files/Unity/Editor/Data\Mono/lib/mono/2.0/System.dll" -r:"C:/Program Files/Unity/Editor/Data\Mono/lib/mono/2.0/System.Core.dll" -r:"C:/Program Files/Unity/Editor/Data\Mono/lib/mono/2.0/System.Xml.dll" @Temp/UnityTempFile-663aa3c3d422f8c41965154e4b73681b
    15. Exit code: 0
    16. Elapsed time: 1.62 sec
    17.  
    18. - Compiler output (0 lines):
    19.  
    20. - Compiler errors (0 lines):
    21.  
    22. - PDB to MDB conversion --------------------------------------
    23.  
    24. Process: C:\Users\[Redacted]\CSharp60Support\Roslyn\pdb2mdb.exe
    25. Arguments: Temp\Assembly-CSharp-firstpass.dll
    26. Exit code: 0
    27. Elapsed time: 0.21 sec
    28.  
    29. - pdb2mdb.exe output (0 lines):
     
    Last edited: May 26, 2016
  2. Ludiq

    Ludiq

    Joined:
    Mar 6, 2015
    Posts:
    594
  3. Jason-Michael

    Jason-Michael

    Joined:
    Jul 6, 2015
    Posts:
    15
    i have exactly the same issue of yours, but i dont use the C# 5.0 and 6.0 integration.
    first i thought it might be the Editor scripts that cause this problem, but after i deleted all the Editor script the problem still happens, so please post here if you have any progress .
     
  4. Bellesteck

    Bellesteck

    Joined:
    Oct 9, 2013
    Posts:
    5
    Try installing Visual Studio Tools for Unity. This worked for me.