Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity 2017.2.0f3 Crashing on Exit Play Mode

Discussion in 'Editor & General Support' started by blueteak, Oct 14, 2017.

  1. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
    I am having an issue with the Unity Editor on a very large VR Project, which is crashing after exiting play mode (not 100% of the time, but probably ~80% of the time and it seems to be related to how long I play for).

    I had the issue in Unity 2017.1.1p3 and 2017.1.1p4 but was hoping it would be solved with 2017.2.

    The Editor log has nothing in it after the crash, and the crash is "Unity Editor is not responding" until I click close.

    Here's the Windows Event Log:
    Code (CSharp):
    1. Faulting application name: Unity.exe, version: 2017.2.0.56737, time stamp: 0x59dbd08e
    2. Faulting module name: ntdll.dll, version: 10.0.15063.608, time stamp: 0x8274fd8b
    3. Exception code: 0xc0000374
    4. Fault offset: 0x00000000000f775f
    5. Faulting process id: 0x15f8
    6. Faulting application start time: 0x01d344756f38d826
    7. Faulting application path: C:\Program Files\Unity2017.2.0f3\Editor\Unity.exe
    8. Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
    9. Report Id: 5bbb279d-7172-4137-976d-e4bf7611df3d
    10. Faulting package full name:
    But I'm not sure how useful it will be.

    I've checked https://issuetracker.unity3d.com/is...ndestroy-when-exiting-play-mode-crashes-unity and looked through all my OnDestroy code but anything that does an Instantiate has an #if !UNITY_EDITOR block around it.

    The project folder is 20gb, so I don't think I can easily submit a bug report. Is there anything else I can do to help debug the issue?
     
    P_Jong and aj1176 like this.
  2. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,155
    Here is how I approach those kind of issues.

    1) I make a copy of the project and then start to remove stuff from it to the point where it doesn't crash anymore. Once it stops crashing, I know what I recently removed and integrate that thing again. If it crashes again, I found what is causing the issue and can either fix it or create a smaller project to submit a bug-report.

    2) Following 1) to create a smaller project that can be used to reproduce the issue sometimes doesn't work and the crash only occurs in combination with "everything else". In this case, you can submit a bug report without your project attached and ask Unity QA to provide a secure location where you can upload your project 20gb size, because the Unity Bug Reporter Tool cannot handle projects larger than 2gb afaik. They usually reply with a password protected owncloud link. If you have a slow internet connection, another option would be to send them your project on an USB stick via snailmail.

    These approaches are time consuming, but sometimes you don't have a choice right?!

    I highly recommend to submit a bug-report though, the editor should never crash. From my experience, it's very unlikely that Unity is able to fix those kind of (random) crash bugs if they do not have a project to reproduce the issue and test their fix against.

    Hope it helps!
     
    karl_jones likes this.
  4. aj1176

    aj1176

    Joined:
    Jan 26, 2017
    Posts:
    3
    Hi
    am having an issue with the Unity Editor on a very large VR Project, which is crashing after exiting play mode (not 100% of the time, but probably ~80% of the time and it seems to be related to how long I play for).
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,191
    Do you have any log files or crash dumps?
    Please file a bug report and provide an example project if possible.
     
  6. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    125
    Code (CSharp):
    1.     void OnDisable()
    2.     {
    3. #if !UNITY_EDITOR
    4.         CancelInvoke();
    5.         StopAllCoroutines();
    6. #endif
    7.     }
    Defining out this code for editor seemed to solve the problem...
     
    Peter77 likes this.
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,155
    I would still try to submit a bug-report. The editor should never crash and if you have a case where a crash is reproducible, a bug-report helps Unity to stabilize their software, which in turn every customer benefits from.
     
    karl_jones likes this.
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,191
    Please do still file a bug report. As Peter77 says the editor should not crash.
     
    Peter77 likes this.
  9. imaginater

    imaginater

    Joined:
    Sep 18, 2017
    Posts:
    4
    Hello @karl_jones

    Recently I have upgraded my unity 5.6.1p1 project to 2017.2.0 for MR support. But after resolving all of the code and compiling issues, now the editor is crashing as soon as I hit the play button. Usually you get the bug reporter windows if unity is crashed unexpectedly! but in this case I am not getting that window.

    Here I have attached the editor log file, please check and revert ASAP.

    Thanks
     

    Attached Files:

  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,191
    Do you have a crash dump file? The log has nothing that stands out.
     
  11. imaginater

    imaginater

    Joined:
    Sep 18, 2017
    Posts:
    4
    I don't see any crash.dmp file under the following file location:
    > C:\Users\**\AppData\Local\Unity\Editor
    > C:\Users\**\AppData\Local\Packages
    > C:\Users\**\AppData\Local\Temp

    Let me know if I should check in some other location...
     
  12. imaginater

    imaginater

    Joined:
    Sep 18, 2017
    Posts:
    4
    @karl_jones @Peter77

    I see that on release page of holotoolkit (https://github.com/Microsoft/MixedRealityToolkit-Unity/releases) it mentions that for hololens you should use unity2017.1.2 with specified win SDK. I tried doing that but in that case I get spammed with
    RenderTexture.GenerateMips failed: ...

    and on issue tracker it says that this error has been resolved in Unity2017.2 but I am kinda stuck here with holotoolkit and unity. Can you guys assist me out here??
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,191
    What issue says it is resolved? Can you share the link? Have you tried the latest 2017.1 patch?
     
  14. imaginater

    imaginater

    Joined:
    Sep 18, 2017
    Posts:
    4
  15. theotrian

    theotrian

    Joined:
    Oct 27, 2013
    Posts:
    4
    Had the same issue. In our case seems like it was caused by the Timeline when it tries to stop or play Audiosources that are disabled in the scene. Make sure all Audiosource gameobjects that are referenced in the Timeline are enabled when you press play. Hope this helps.
     
  16. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    85
    Using latest patch version, instant crash after exit play mode. Not doing anything weird as such.

    Fault bucket , type 0
    Event Name: APPCRASH
    Response: Not available
    Cab Id: 0

    Problem signature:
    P1: Unity.exe
    P2: 2017.2.1.62909
    P3: 5a2fabdf
    P4: StackHash_2247
    P5: 6.1.7601.18933
    P6: 55a6a196
    P7: c0000374
    P8: 00000000000bffc2

    WER Fault:

    Version=1
    EventType=APPCRASH
    EventTime=131587010436575251
    ReportType=2
    Consent=1
    ReportIdentifier=939793d3-e9a3-11e7-99ee-8019345a7acf
    IntegratorReportIdentifier=939793d2-e9a3-11e7-99ee-8019345a7acf
    Response.type=4
    Sig[0].Name=Application Name
    Sig[0].Value=Unity.exe
    Sig[1].Name=Application Version
    Sig[1].Value=2017.2.1.62909
    Sig[2].Name=Application Timestamp
    Sig[2].Value=5a2fabdf
    Sig[3].Name=Fault Module Name
    Sig[3].Value=StackHash_2247
    Sig[4].Name=Fault Module Version
    Sig[4].Value=6.1.7601.18933
    Sig[5].Name=Fault Module Timestamp
    Sig[5].Value=55a6a196
    Sig[6].Name=Exception Code
    Sig[6].Value=c0000374
    Sig[7].Name=Exception Offset
    Sig[7].Value=00000000000bffc2
    DynamicSig[1].Name=OS Version
    DynamicSig[1].Value=6.1.7601.2.1.0.256.48
    DynamicSig[2].Name=Locale ID
    DynamicSig[2].Value=2057
    DynamicSig[22].Name=Additional Information 1
    DynamicSig[22].Value=2247
    DynamicSig[23].Name=Additional Information 2
    DynamicSig[23].Value=2247eade7ad845b9886a4399ac9eef65
    DynamicSig[24].Name=Additional Information 3
    DynamicSig[24].Value=3d3a
    DynamicSig[25].Name=Additional Information 4
    DynamicSig[25].Value=3d3a89be347cf33d47cfa5f3f1dfb2f9
    UI[2]=C:\Program Files\Unity20172\Editor\Unity.exe
    UI[3]=Unity Editor has stopped working
     
  17. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,155
    I'm pretty sure Unity staff is going to ask you to submit a bug-report. If you want to speed things up, you can already submit a bug-report following the advice given in this document.

    Does Unity's bug-reporter automatically appear if the editor crashes? In this case, most of the data is added to the report automatically. If the bug-reporter doesn't show up automatically, you want to check if you can locate the most recent crash.dmp file yourself and attach it to the bug-report. See this post to find out where the crash.dmp is saved.

    Using the bug-reporter is an important step, it makes sure the report is in Unity Technologies bug-tracking pipeline and has to be processed at some point. Using the forum is often used to add attention to an existing issue, but does not replace submitting a bug-report.

    It's from advantage to attach a project to the bug-report that UT can use to reproduce the issue and test their fix against, this is especially important for crash-bugs. Adding a video that shows how to reproduce the issue and the issue itself has proved useful for me as well. It's hard to argue if Unity is really crashing if you attach a video.

    The easier an issue can be reproduced by QA, the more likely it is to get forwarded to a developer, who might or might not work on a bug-fix for that at some point.

    After you submitted the bug-report, you receive a confirmation email with a Case number. UT often asks us to post the Case number in the forum thread, which allows them to find that bug-report if they look at your post.

    Following these steps will increase the chance that UT is looking at the issue tremendously.
     
    P_Jong and karl_jones like this.
  18. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    85
    Still getting this occasioanlly, when exiting Play Mode...

    Faulting application name: Unity.exe, version: 2017.4.30.64067, time stamp: 0x5d19dacc
    Faulting module name: ntdll.dll, version: 10.0.17134.799, time stamp: 0x7f828745
    Exception code: 0xc0000374
    Fault offset: 0x00000000000f479b
    Faulting process ID: 0x1598
    Faulting application start time: 0x01d54904749fc197
    Faulting application path: C:\Program Files\Unity\Editor\Unity.exe
    Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
    Report ID: 880cfcc7-8444-4eac-ad20-eaec35707022
    Faulting package full name:
    Faulting package-relative application ID:
     
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,191
    Please file a bug report.
     
    Peter77 likes this.
  20. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    85
    I think this was causing it:

    void Start () {
    Destroy(gameObject, DestroyTime);
    }
     
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    4,191
    Please file a bug report, that should not cause a crash.
     
  22. philc_uk

    philc_uk

    Joined:
    Jun 17, 2015
    Posts:
    85
    yeah i did that several times, they closed it as they couldn't reproduce it. - Annoying as I think it was causing a total exit nearly every time on the latest LTS version.
     
  23. Joel_Shaji

    Joel_Shaji

    Joined:
    Jul 3, 2020
    Posts:
    1
    How do I create an editor scripit for this? I am new to unity and facing the same problem, I have already submitted a bug report but would like to try this out
     
unityunity