Search Unity

[SOLVED]DontDestroyOnLoad() causing Unity 5.2.0 crash

Discussion in 'Editor & General Support' started by ArachnidAnimal, Sep 9, 2015.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
    I just upgraded to unity 5.2.0. When exiting playmode in the editor, Unity crashes and closes.
    This issue did not occur with any previous versions of Unity.

    After many hours I tracked the problem down to the following code:

    Code (csharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public class Main2: MonoBehaviour
    5. {
    6.    public GameObject _globalItems;
    7.  
    8.    public void Awake()
    9.    {
    10.      UnityEngine.Object.DontDestroyOnLoad (_globalItems);
    11.    }
    12. }
    13.  
    I verified the gameObject is not null.
    I filled a bug report, I don't yet have a number.

    The log has:
    Load scene 'Temp/__EditModeScene' time: 92.080276 ms
    Crash!!!
    SymInit: Symbol-SearchPath: 'C:/Program Files/Unity/Editor/Data/MonoEmbedRuntime;.;C:\Users\PC-User\Desktop\BugReporting2;C:\Program Files\Unity\Editor;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'PC-User'
    OS-Version: 6.3.9600 () 0x300-0x1
    C:\Program Files\Unity\Editor\Unity.exe:Unity.exe (0000000140000000), size: 55009280 (result: 0), SymType: 'PDB', PDB: 'C:\Program Files\Unity\Editor\Unity_x64.pdb', fileVersion: 5.2.0.38013
    C:\WINDOWS\SYSTEM32\ntdll.dll:ntdll.dll (00007FFCAED30000), size: 1753088 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\ntdll.dll', fileVersion: 6.3.9600.17936
    C:\WINDOWS\system32\KERNEL32.DLL:KERNEL32.DLL (00007FFCAE820000), size: 1302528 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\KERNEL32.DLL', fileVersion: 6.3.9600.17415
    C:\WINDOWS\system32\KERNELBASE.dll:KERNELBASE.dll (00007FFCAC0C0000), size: 1134592 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\KERNELBASE.dll', fileVersion: 6.3.9600.17415
    C:\Program Files\Unity\Editor\Unwrap.dll:Unwrap.dll (00007FFC9D100000), size: 262144 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files\Unity\Editor\Unwrap.dll'
    C:\Program Files\Unity\Editor\GeometryToolbox.dll:GeometryToolbox.dll (00007FFC9D0D0000), size: 188416 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files\Unity\Editor\GeometryToolbox.dll'
    C:\Program Files\Unity\Editor\FreeImage.dll:FreeImage.dll (0000000180000000), size: 2777088 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files\Unity\Editor\FreeImage.dll', fileVersion: 3.11.0.0
    C:\WINDOWS\system32\ole32.dll:eek:le32.dll (00007FFCAE5C0000), size: 1654784 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\ole32.dll', fileVersion: 6.3.9600.17905
    C:\WINDOWS\system32\WS2_32.dll:WS2_32.dll (00007FFCAE560000), size: 368640 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\system32\WS2_32.dll', fileVersion: 6.3.9600.17415
    C:\WINDOWS\SYSTEM32\HID.DLL:HID.DLL (00007FFCAB050000), size: 53248 (result: 0), SymType: '-exported-', PDB: 'C:\WINDOWS\SYSTEM32\HID.DLL', fileVersion: 6.3.9600.17415
    C:\Program Files\Unity\Editor\TextureConverter.dll:TextureConverter.dll (00007FFC83460000), size: 6627328 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files\Unity\Editor\TextureConverter.dll'
    C:\Program Files\Unity\Editor\umbraoptimizer64.dll:umbraoptimizer64.dll (00007FFC856C0000), size: 995328 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files\Unity\Editor\umbraoptimizer64.dll'
    C:\Program Files\Unity\Editor\libcef.dll:libcef.dll (00007FFC7EDE0000), size: 52178944 (result: 0), SymType: '-exported-', PDB: 'C:\Program Files\Unity\Editor\libcef.dll', fileVersion: 3.2062.1930.0
    C:\Program Files\Unity\Editor\slapi.dll:slapi.dll (00007FFC7E770000), size:
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,291
    Hi,
    I have tried your project but it did not crash for me, can you try reinstalling Unity?
     
  3. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
    Thanks for looking into it.
    I just now attached the dump file below related to the crash.
    The error.log says "Unity caused an access violation".
    I will try to re-install Unity again.
    Thanks.
     

    Attached Files:

  4. Alex-Lian

    Alex-Lian

    Guest

  5. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
  6. Alex-Lian

    Alex-Lian

    Guest

    Fair enough, but there's a workaround I think by disabling alphabetical sort for now.
     
  7. AlaaSerry

    AlaaSerry

    Joined:
    Mar 13, 2015
    Posts:
    11
    • Have same problem!
    • Workaround did not work for me!
    • Almost every time the EDITOR crashes. However, once in a while it works (Sorry, no pattern there!)
    Any idea when is the patch?
    Thanks
     
  8. David_Biggs

    David_Biggs

    Joined:
    Sep 13, 2012
    Posts:
    8
    +1 Same problem for me, workaround doesn't work. Would really like a patch. Heading back to 5.1.3 for now.
     
  9. Tomi-Tukiainen

    Tomi-Tukiainen

    Joined:
    Jun 8, 2013
    Posts:
    26
    +1, crashing with no known workaround, case #726748.
     
  10. Taishou

    Taishou

    Joined:
    Jun 24, 2014
    Posts:
    21
    I have the same problem in 5.2.1. After I exit the play mode the editor hangs. Last entry in console log is
    Load scene 'Temp/__EditModeScene' time
    Sometimes this also happens when I switch from one scene to another.
    This is annoying - please fix this ASAP