Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

STOP FREEZING/HANGING UNITY!!!

Discussion in 'Editor & General Support' started by masterprompt, Sep 28, 2014.

Thread Status:
Not open for further replies.
  1. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    This is so frustrating.. Every 5-10 min or so (no precise time period) altering a prefab or recompiling scripts will cause unity to just hang. Even if I save scene and save project, nothing is truly saved, and must be redone :-( Error logs show no help:
     
  2. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    What version of Unity are you using? Have you submitted bug reports for this? I see you are using parralels, if you are using Unity within that have you dedicated more RAM to Windows?
     
  3. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Unity versions: 4.5.4.f1 and whatever was previous that (I updated the day before thinking that may solve it, but not).
    Parallels is only for using visual studio. I have 4gb ram dedicated to windows.

    Unity runs in the mac environment on 10.9.5 with 16gb of ram (well, 12gb after windows has it's fill).
    Worth noting, the issue just started a week ago. No significant events during the time it started happening, it just became more annoying (hang once every couple hours to now every 5 min based on things I do like saving, updating scripts, etc).
     
  4. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    Have you tried switching platforms to something other than web-player and seeing if it does this?

    Also, do you have the android sdk installed, previously there was an issue with hanging when it was running in the background.
     
  5. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,042
    Have you checked your code for infinite loops? That is how it acts when it gets caught in a loop, no error logs or crash, just hangs. Do other projects work ok, or an empty scene?
     
  6. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I suppose I could give this a try. Although my target is web player, having to switch platforms just to get the editor not to hang and random points seems odd for troubleshooting.

    I do have the Android sdk installed, but I haven't used it in over a year.
     
  7. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I thought the same thing however the hang happens during compile most of the time. It just happens sometimes on run (after a compile has finished). I've had it happen after altering a prefab (like i did in the video), then saving, then hitting run (of course the prefab is corrupted when I reopen after the freeze).
     
  8. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    This would help us whittle down the problem for a bug report.
     
  9. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Ok, will do! I'll do it tonight and respond with results in the morning
     
  10. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Only had limited time over the past 2 days to try this. So far so good however I haven't had the chance to do the same combos of steps to reproduce. I will have more time this weekend to more extensively test.
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204
    I have this issue on OSX all the time. I believe there is a memory leak that gets worse when the system decides to recompile everything in the background -- you can see the memory grow in the task manager, yet the unity profiler still thinks it has the same amount allocated.
    I've created numerous bug reports for it, and am communicating currently with someone in Unity QA on one of them.
    However, my expectation that it will be fixed is low. Never happened on Release 4.3, it's new for 4.5 (and 4.6!).
     
  12. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Sounds logical to what I am/was experiencing. It's super annoying and kills productivity having to redo so much work.
     
  13. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Yeah, changing platform didn't help. It's still doing it. Just removed a couple scripts off a prefab, hit save, hit play, and it froze before playing... Unity, please fix this. It's makes productivity plummet!
     
  14. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    Can you submit a bug report with repo steps and possibly a demo project and paste the case number in here.
     
  15. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    I have the same issue (since many Unity versions) if I unfocus Unity while it's recompiling: then after a while it will crash. I solved it by looking intensely at the Editor each time it recompiles the code.
     
  16. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I submitted a bug report a week ago:
    Case 636303

    I included full source.
     
  17. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Unfortunately it happens all the time. Not EVERY time, but so much that it makes unity almost unusable as I have to constantly force quit, restart unity, redo what didn't save (any prefab changes), rinse repeat. :-(
     
  18. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    What sucks is that I fully switched form Windows to Mac back when Unity didn't provide Windows support. I DO NOT want to have to switch back to Windows if Unity doesn't fix this issue.
     
  19. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Just updated a value on a tracer script (in inspector) of a prefab loaded in the scene. Hit apply on the prefab, hit save scene, hit save project, hit play and FREEZE!
    Force quit unity.
    Reopen Unity.
    Drill down in prefab, looks like it saved. No work lost, just time.
     
  20. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Just happened again. Removed a pickup script off 3 prefabs I had in the scene. Applied each prefab, deactivated the root object of each prefab, hit save scene, hit save project, hit play, freeze...
    Force quit unity.
    Reopen unity.
    Seems it saved, no work lost, just more time.
     
  21. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    Hey, QA have received and managed to repo this problem with the build you sent. We're working on finding the issue. Have you tried the new 4.6 beta build or older versions before 4.5.3?
     
    Last edited: Oct 7, 2014
  22. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204

    WOW!!! That would be the best news ever! This happens to me on every 4.5x version and the latest 4.6 also. Hope you all can fix it!
     
  23. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    It helps that we know how many people are having this issue, please submit a bug report with a project so we can repo.
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204
    I've submitted several reports, Ugnius was working on the last one.
     
  25. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I just installed 4.5.2. I wont have any time to work with it tonight however I will have all day tomorrow on it so I'll let you know
     
  26. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Just froze twice on 4.5.2 :-(
    Only thing I did was update a couple scripts. It went to recompile, then just sat there and spun, eventually had to kill the task.
     
  27. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I know you guys are busy, so please forgive me while I vent but FIX THE DAMN THING ALREADY!!!!! F***, this is so annoying. It just froze and costed me an hour of damn work (modified 5 prefabs pretty heavily, froze, kill and reopen, prefabs created are all corrupt. Funny part is I saved scene/project a TON after I modified them, it froze on recompile). This is CONSTANTLY HAPPENING!!!! The amount of time lost, just on this issue alone, I could have just picked a different solution and recoded the whole project in it.
     
  28. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Open unity, create game object, add script to it, drag over to prefab area, save scene, quit unity, freeze... Come on guys, at least give some sort of status update on what you found. Your sure johnny-on-the-spot with deleting my posts...
     
  29. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    970
    One thing, before replicating work that you lost, always make sure that the prefabs are *actually* corrupt. Crashes can cause the Unity Library to be corrupted without the actual asset being damaged.Try right click -> Reimport. If that's grayed out, try moving the prefabs and their meta files out of the project, running Unity and then putting them back in.
     
  30. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I didn't know I could use the import function on a prefab. Thanks for the info! I'll give that a try next time it happens.
     
  31. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    4 freezes in the last 45 min.
    According to this, the gentleman evaluating this case cannot reproduce it.... Who's able to reproduce it Josh?
     
  32. Jo-Mei-Gmbh

    Jo-Mei-Gmbh

    Joined:
    Aug 25, 2014
    Posts:
    1
    We have the exact same problem here as masterprompt , it keeps crashing for the whole team ... this start getting really annoying since its not fixed and nobody is able to reproduce it at the Unity QA
     
  33. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,204
    Yeah, crashes all the time since version 4.5 was released. I always get the same thing too "can't reproduce". I believe it is a memory leak in the editor somewhere. If I open my project, i can work for a few hours before crashing. But if I open my project - and do NOTHING - and leave the editor up over night, it will crash the first thing in the morning.

    Also crashes when I do an Android build. Open my project. Build, deploy... works. Press build a second time - Crash.
     
  34. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    Due to some miscommunication we haven't managed to repo this as we can't figure out what these "random" events are that's causing it. It's certainly not random, something is triggering it somewhere, I sometimes get the same freeze/crash.
     
  35. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Although I agree that it isn't 'random', it certainly appears as such as there was an instance last night where I just recovered from a crash/hang (restarted unity), added a comment (descriptive, not commenting out code) to a script, recompile, crash/hang. It was literally within 5 min of reopening from the previous crash/hang.

    What do you need from me to help? Do you need me to make more videos on things I'm doing to cause it to crash? I'm sure if I modify a few prefabs and cause it to crash/hang pretty regularly. Let me know what you need as I'm willing to invest time to get this fixed as it's already costed me a ton of dev time (money). I'm fully willing to offer myself up as a Guinea pig for the sake of moving forward.
     
  36. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,042
    I don't know if this of any help, but I have noticed that virtually all my crashes are related to using the project window and interacting with assets in the project through it.

    My typical workflow is like 90% external code or assets, working outside the IDE. I can work all day with no problems, making changes externally, switching back and running. Or modifying/testing in the scene view/inspector. Almost never a problem. And then even clicking on an asset (usually a prefab) in the project view and instant crash. And often selecting an image to adjust the settings in the inspector. Particularly dragging assets between the panels (and sometimes even the panels). I tend to get quite a bit of odd OnDock() repeated errors, though they don't usually crash. It's a little rougher when beginning a project, but for projects that are a little further along, I can minimize crashing by avoiding touching the project windows. (or at least saving before I do so).

    It may already be known, but it appears to me that problem lies at the point where the IDE is actually changing/modifying file assets. Usually when I do have a crash, I will have to delete the .meta file. (especially with images).
     
  37. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    [sarcasm]This crash/freeze doesn't get old[/sarcasm]
     
  38. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Month later and here we are. Same old UT... At this point I might as well just cut my losses completely.
     
    jc2 likes this.
  39. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
     
  40. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    970
    Next time Unity hangs, run MonoDevelop, connect the profiler, pause the process and check each thread's call stack, before MacOS kills it. That might help narrow down what it's stuck on, if it is in managed land. Honestly, I have never had Unity crash as much as you, across several projects, so I am wondering if there is something in your project it doesn't like that needs narrowing down, or some diabolical combination of hardware, drivers and the renderer.
     
  41. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    Hey @masterprompt, as developer I can understand your frustration with what is happening, we're trying hard to solve this but as others have said, this is the most extreme case of freezing anyone has come across and very hard to find out what is wrong. Have you tried the project on another computer?
     
  42. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    When Unity hangs, I run monodevelop and Run/Attach to process. I get 3 to choose from: null (mono), Unity Editor (Unity), and Unity USB: any iOS device. I tried the later 2 and the profiler just sits there trying to connect, never connects. I'll try doing it next time I start Unity Editor.
     
  43. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    Same bug confirmed on Windows. My build is over 3gb, and I have no clue what is causing the issue so I can't widdle down the file size for you. Should I send a bug report anyways? We really need to get this fixed, guys. I have a very important project on the line here!
     
  44. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    I could try loading the project up on one of my other Macs however they are all A. at home and not really portable B. slower and C. don't have Unity Pro installed (remember you kinda have your user's by the balls here on licensing). I'm not sure why I would pay 4k to apple for a top of the line macbook pro every 2 years, just to use one of my slow arse mac mini's.

    Also, if you can understand my frustration, then stop deleting my posts. Censor me sure, but deleting all the posts of my frustration just makes me more frustrated as I have no outlet to vent how much of a time waster this has become... >>work 5 min, hang, S*** - didn't get a chance to save, force quit, reopen, reproduce, no problem, save, hang, crap - really?!?<< Also, as a fellow developer, I would think there you would have some extra debugging flags or logging that one could enable to find where this hangup occurs.

    I know I'm not being very friendly here but from my perspective this is just neglect on UT's part. Abandoning a customer; so yeah, just a bit upset... You say your trying hard to solve this: I have hundreds of other applications on my mac, NONE OF WHICH HANG... From parallels running Windows 8 64bit, to xcode, to an instance of the play framework running, to you name it. It's all on here, it all works, and it's all fast as hell! But Unity, only works 10% of the time. Extreme case? I submitted source code with my bug report, am I doing anything extreme with Unity (if I am, I would hope you would tell me).

    Don't get me wrong, some days are good days, and no crash (I'd say about 1 day a week is very productive). Some days are very very very very bad days where I reopen unity after a hang, hit play, and it hangs again...
     
  45. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    Oh, also, I am NOT using the pro-version of Unity. So this is not a pro-only bug either. I share your frustration @masterprompt. Please fix this UT. I feel there have been enough complaints, on this thread alone, for you guys to have heightened the seriousness of this issue by now.

    Also, @masterprompt , here's a pretty good discussion on what I think is the same issue:
    http://forum.unity3d.com/threads/compilation-errors-again.278800/#post-1869345

    Apparently it may be the way unity is compiling your materials. I've yet to delete any mats from my game, but it seems this may be the case.. idk...
     
  46. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You would do that so you can determine whether the problem is machine-specific or not. That would help narrow it down. You can transfer Pro licenses pretty easily in Unity using the Manage License menu item.

    --Eric
     
  47. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    I can confirm that this bug isn't machine-specific. It will happen to me on both Windows machines that I own, and my workstation at work as well, which is also running Windows.

    I can't speak for masterprompt, but as it seems that him and I are getting the same exact issue, I can't see his error being machine-specific either.
     
  48. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You never know; it could be a different bug. It's not necessarily the same thing that causes it to hang. The only time I've seen it hang here (aside from accidentally writing infinite loops) is when quitting Unity sometimes, but that seems to have stopped with 4.6.

    --Eric
     
  49. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    Yeah, mine can't be an infinite loop. It hangs in the editor without even running the game, and I have no editor scripts in my scene.
     
  50. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'm not disputing it's an actual bug; just putting some ideas/info out there.

    --Eric
     
Thread Status:
Not open for further replies.