Search Unity

Unity crashes computer after exiting Play mode

Discussion in 'Editor & General Support' started by Emilyanis, Mar 21, 2018.

  1. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    Hi!

    I recently began to experience a strange error, its happens only in large/complex projects. Sometimes when I exit play mode or pause it, my computer just crashes, like this - first of all Unity become completely frozen, then after 2-4 seconds cursor become frozen too, after more 10 seconds all sounds or music starts to lag. Task manager not working even if I try to open it. The only solution is reset button. Once it gives me BSOD with "nvldrm" or something error. I tried a lot of things from internet, with Unity, with videocard and non of them worked eventually. Its frustrating because chance of crash is like 1/3 - very often. I dont know where I need to start to trace this error. Now only idea I have its try to cause this bug on virtual machine.

    Thanks!
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You should be able to find the specific BSOD code from that last time you got that error in the Windows Event Viewer. The code will be specific to why you encountered that crash. It is also displayed during the BSOD, but since you didn't mention it I'm guessing you didn't write it down.

    I don't know what nvldrm means or if that is correct, but nv anything would have me thinking NVidia video driver related.
     
  3. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    Okay, I remember the date that BSOD happened and found it in Windows Event Viewer. Error code reffers to videocard too. Also error was "nvlddmkm.sys" and I thought as you that day about NVidia and tried to do something with videocard and drivers but its doesnt helped me. Now, I am gonna try to go deeper, will see how it goes.
     
  4. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    You might have a power supply which doesn't deliver enough power to the GPU, or perhaps to the system in general. Look for a hardware monitoring tool which shows voltages (HWMonitor, HWinfo, Speedfan and probably many others).
     
  5. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    Didn't have any problems under heavy modern games or they not count?
     
  6. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    They might not be using your GPU the same way. I've seen it happen. Heavy games might not be as heavy as you think relative to what 3D software does either ;)

    But either way, if something is making your computer crash it IS the computer which is the problem, somehow. The memory protection of a modern system should generally stop any individual app from taking down everything.
     
  7. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    Got it! I am already completely wiped out videocard drivers and installed new one, disabled some unnecessary services which cause error in Windows Event Viewer. Gonna test it out soon with hardware monitoring.
     
  8. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Yeah, test everything, if only to eliminate issues :)

    There might be some tools to clean out remnant drivers, but I suspect the one with the obvious name is a bit iffy.
     
    Emilyanis likes this.
  9. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    After some tests with hardware monitor and some additional stress all seems fine now. Voltage is ok, temperature too. I hope now everything will work. Thanks folks!;)
     
    orb likes this.
  10. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    Unfortunately, it is happened again and even with almost empty project:( In the Windows Event Viewer only "Kernel-power" errors about PC reset. I noticed, it is happening when I am using Unity with Visual Studio and do a lot of fast small changes to code and back to editor, test, then back to code, small changes, back to editor and on some point after exiting Play Mode computer freezes. I dont know what to do:(

    Edit
    Last few lines from editor log:
    25 <--- This is debug.log from script
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    UnityEngine.MonoBehaviour:print(Object)
    Player:CalculateRotationPoint() (at Assets\Scripts\Player.cs:60)
    Player:Move(Int32) (at Assets\Scripts\Player.cs:46)
    Player:Update() (at Assets\Scripts\Player.cs:29)

    (Filename: Assets/Scripts/Player.cs Line: 60)

    Load scene 'Temp/__Backupscenes/0.backup' time: 0.197881 ms
    Unloading 20 Unused Serialized files (Serialized files now loaded: 0)
    System memory in use before: 84.5 MB.
    System memory in use after: 84.9 MB.

    Unloading 27 unused Assets to reduce memory usage. Loaded Objects now: 5965.
    Total: 8.156592 ms (FindLiveObjects: 1.500601 ms CreateObjectMapping: 0.056799 ms MarkObjects: 5.532306 ms DeleteObjects: 1.065838 ms)

    <RI> Initialized touch support.

    <RI> Initialized touch support.

    <RI> Initialized touch support.

    <RI> Initialized touch support.

    Refresh: detecting if any assets need to be imported or removed ...
    Hashing assets ... 0.000 seconds
    file open: 0.000 seconds (2 files)
    file read: 0.000 seconds (0.003 MB)
    hash: 0.000 seconds
    ----- Compute hash(es) for 1 asset(s).

    Refresh: elapses 0.080232 seconds
    Updating Assets/Scripts/Player.cs - GUID: f86cedf776429bc4d90efe6dd1b759c1...
    done. [Time: 75.023269 ms]
    Refreshing native plugins compatible for Editor in 2.91 ms, found 3 plugins.
    Preloading 1 native plugins for Editor in 0.06 ms.

    ----- Total AssetImport time: 0.200312s, AssetImport time: 0.120561s, Asset hashing: 0.000450s [3.5 KB, 7.630344 mb/s]

    - Starting compile Library/ScriptAssemblies/Assembly-CSharp.dll

    As I understand, problem with the compiling Assembly-CSharp.dll.
     
    Last edited: Mar 24, 2018
  11. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    If you're getting error 41 it's unfortunately one of the least useful errors Windows can give you. It simply means the system froze or rebooted without the OS initiating it.

    Seems similar to when I last had a faulty power supply, but if you're entirely sure the voltage is OK (12v where you're supposed to have 12v, 5v where 5v is promised and so on), I dunno for sure what the issue is. Could be a loose cable, perhaps.

    Have you run both Pi 95 and Furmark to really strain the system?
     
  12. Emilyanis

    Emilyanis

    Joined:
    Feb 22, 2014
    Posts:
    48
    Oh, I actually monitored CPU and GPU voltage not a power supply, and they was OK. I haven't mentioned that I upgraded my PC, but the power supply remained the same. But even with the new hardware it suffices with a margin. Anyway, gonna look into power supply voltage.

    I have not, but gonna run them.