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