Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Mono Upgrade Frequent crashes

Discussion in 'Experimental Scripting Previews' started by Baste, Aug 21, 2017.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    I'm running the 4.6 runtime, and I'm seeing pretty frequent crashes when I enter play mode. It doesn't happen the first time I enter playmode, but it's pretty consistent after 5-10 times. It might be that it relates to how long I've had the editor open, I don't know though.

    I upgraded from 2017.1.0f1 to 2017.1.0p4, and it seems to be happening more frequently.

    The bug report was returned as a duplicate of this one. Does any of you working on this have any idea about what it is, or if there's any way I can mitigate it?

    I can send crash dumps or whatever, if it helps.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    I don't have any details about how to mitigate it yet, but this one is on the top of our list to investigate, so hopefully we'll have more details in a day or two.
     
    AdmiralThrawn and Baste like this.
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Any updates?
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Baste likes this.
  5. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Is "soon" going to be p6? If that's not the case, is there any way for me to compile the Mono version myself and replace the one used by Unity?

    Whatever I'm working on right now seems to trigger this a lot, and restarting the editor every 15-20 minutes due to crashes breaks my flow somewhat.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    I don't think there will be a 2017.1.0p6, actually. It looks like we will have a 2017.1.1p1 though, which should have a number of crash fixes. Unfortunately, there is not an easy to build Mono your self in the way we use it. We have a pretty highly customized version of Mono.

    We're waiting on a round of fixes to land in a patch release branch. I should know more later today about specifically which release they will land in. I'll update this thread with that information.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Sorry for the delay in my response. We had some trouble getting these changes through the release pipeline. They should be available in the 2017.1.1p2 patch release.
     
    ilmario likes this.
  8. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Just to confirm - this was fixed in today's patch, right?

    The commit references "case 926881", and there's a fix for 926881 in the patch notes, but the patch note text is: "Scripting Upgrade: Fixed a crash when inspecting values in managed debugger". I'm guessing those are the same issue, but I wanted to make sure before forcing a project upgrade for the entire office.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Yes, that is the same issue. I would recommend trying it (and most patch releases) at a smaller sope locally to ensure they correct the bug before pushing it out, if possible though. This crash happened often, but it was still intermittent. We may not have caught all of its causes.
     
  10. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Hi!

    We've been on 2017.1.1p2 for a while, and the crash frequency haven't seemed to change much. I just updated to 2017.2, and it's still crashing quite a bit.

    I posted a bug report (960586) containing the crash dump and log, in case that might help.
     
  11. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    @Baste do you happen to have GitHub plugin in your Unity projects?
     
  12. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Nope! The project is VC'd through git, but we do that in an external application.
     
  13. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    Are you using Task's in your project?
     
  14. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    As in Task? Nope, none.
     
  15. CriDos

    CriDos

    Joined:
    Apr 19, 2017
    Posts:
    12
    Hello!
    We have a similar problem in the project...
    I practically collected a minimal project with the reproduction of frequent crashes, but it still has a third-party asset...
    Soon, if I manage to get rid of it, I'll try to send a bug report.
    This is a very complex mistake and it is difficult to find a regularity for sustainable reproduction.
    I even had to write a special test script that constantly start and stop the Play mode to speed up the search for the patterns of crash.
    Here's how it looks Unity 2017.2.0f3, Win 7x64, Net 4.6:
    devenv_2017-11-12_22-17-58.png WerFault_2017-11-12_21-52-21.png
     
    Last edited: Nov 13, 2017
  16. CriDos

    CriDos

    Joined:
    Apr 19, 2017
    Posts:
    12
    Has managed to issue the minimum test project: https://github.com/CriDos/UnityTestBug
    Confirmed in Unity 2017.2.0f3 and 2017.3.0b9.
    Later I will try to issue a bug report, now it's too late...
     
  17. CriDos

    CriDos

    Joined:
    Apr 19, 2017
    Posts:
    12
    Sent editor bug report: (Case 968421) Frequent crashes when playing mode starts after passing to .NET 4.6
    The memory dump will be later..

    Sorry, I accidentally duplicated the bug report (Case 968422) :(
     
    Last edited: Nov 13, 2017
  18. CriDos

    CriDos

    Joined:
    Apr 19, 2017
    Posts:
    12
    Baste likes this.
  19. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    I also have frequent crashes when using 4.6. The QA team said they could confirm it was caused by 4.6, but they eventually gave up and told me to try latest beta. I've gone through QA on this with several versions now of unity now and each time they tell me to try latest beta after giving up, and they if they don't hear from me again they'll assume it's all good haha.

    Well, I switched back to the old run-time in the end. I was unable to determine the cause of the crashes, and QA team are probably pretending there's no problem again lol.

    Good luck though, really hoping 4.6 becomes stable...
     
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    Can you send me (here or privately) the bug report numbers for these issues? Sometimes our QA is a little too aggressive in resolving issues like this. I'd like to take a look at the crash reports to see if we can find the cause. Thanks!
     
  21. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    No problem. It's case number 970413.
    I'll try again with 2017.3 when released, but for now I'm fine working with the old run time.
    Cheers.
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    It looks like we have corrected this crash, via another bug report. The fix won't make it into the first release of 2017.3, but it should be in a patch release soon after that.
     
  23. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    QA got back to me, and apparently the crashes I'm experiencing is from this bug.

    Any clue how far away "Fixed in future release" is?
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    For the 2017.2 series, we're hoping to land the fixes in 2017.2.1p2, which is scheduled for release on December 20. We won't make the 2017.3 initial release, but hopefully these fixes will be in 2017.3.0p1, although I'm not sure when that will be out yet, as it depends on when 2017.3 is ready.

    As always, I'm guessing here. There are a number of factors in play that could delay things, but I'm pretty confident in these dates.
     
  25. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Thanks for the info!
     
  26. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    I can confirm this should be fixed in 2017.2.1p1
     
  27. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    I am having semi-random crashes as well but I am not sure where to report them since they are related to the debugger.

    The combination of:
    - debugger attached
    - changing files in VS and switching to Unity (so it recompiles)
    - previously having done debugging (single-stepping etc)

    Often results in Unity crashing for me.
    Either at the part where it recompiles, or when I enter or exit play mode.

    The only way I have never gotten a crash so far is:
    - when in vs detach the debugger
    - only ever attach when unity has fully recompiled, and is not in play mode


    The crashes never show the unity bug reporter tool. Its always the "program is not responding" thing.
    How do I report that?
    And to whom?
    Do you guys handle this stuff or should I rather inform the VSTU team (and if so, how?)

    I'm using 2017.3.0f2 + latest VS version.
     
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @dadude123

    This is something that you should report to us at Unity. It is probably an issue in the Mono runtime, not in VSTU.

    You can use Task Manager to create a dump file of the Unity.exe process when it is hung. Then use the "Report a bug" option in the Unity editor later, and attach that dump file. I think that is the best option for reporting issues like this. The dump file should contain the full call stack information for all of the threads, which will help us track down the cause of the hang.
     
    dadude123 and PM_Kaz like this.
  29. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Any clues on when this fix will land in 2017.3? It's not in the patch notes for either the full .3 release or for p1.
     
  30. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    It looks like the fix for case 967206 is scheduled for 2017.3.0p2, which should be published on January 10.
     
    Baste likes this.
  31. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Gotta say I'm a bit disappointed with the progress on this. Editor crash bugs are quite serious - I'm losing a lot of time to having to restart Unity again and again. Having a turn around of month between having a fix ready, and getting the fix into the engine is understandable for something minor, but I'd hoped to see something more rapid for crashes.


    The amount of crashes also seems to have increased from 2017.2 to 2017.3. There's probably something else going on, but I can't report anything because I'm waiting for the fix to the known crash bug.

    Do you have any internal 2017.3 version with the fix in that you could share? Then I could figure out if the crashes are actually fixed, or if there's other issues, so you don't have to wait until the 10th to get reports for that.
     
    ChessMax likes this.
  32. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    Everything freezes around the official release and limited fixes were put into the first patch release. We don't send out custom versions but I may be able to build an updated mono library for you to try. What platform are you working on?
     
    Baste likes this.
  33. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Windows 10 64 bit.
     
  34. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    CriDos likes this.
  35. CriDos

    CriDos

    Joined:
    Apr 19, 2017
    Posts:
    12
    joncham, I have no crashes with the new Mono library!
    For several days I worked with her in Unity 2017.3.0p1 Windows 7x64...
     
    joncham likes this.
  36. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    I've got no crashes for two days, so it seems like the mono version fixes things. Thanks!
     
    joncham and JoshPeterson like this.
  37. hepphep

    hepphep

    Joined:
    Feb 1, 2013
    Posts:
    24
    Also tried the new dll and have had no crashes for almost three days. Before that it was about 20 crashes per day. So, seems to work like a charm.
     
    joncham and JoshPeterson like this.