Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity editor Play preview freezes (Mavericks, Unity 4.3.4)

Discussion in 'Editor & General Support' started by Bradamante, Feb 9, 2014.

  1. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Well, v4.3.4 fixed the sluggish behavior of the Unity IDE, but it seems it introduces a new freeze when entering Play mode. The game freezes either hitting the Play button or a few seconds into the game. This behavior was not present in Unity 4.3.x.

    Does this happen to any of you?

    When I hit force-quit to kill Unity, the system.log says:

    Code (csharp):
    1. 09.02.14 17:16:41,579 Console[4824]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
    2. 09.02.14 17:17:21,000 kernel[0]: SMC::smcReadKeyAction ERROR F0Ac kSMCBadArgumentError(0x89) fKeyHashTable=0x0xffffff8012530200
    3. 09.02.14 17:17:22,000 kernel[0]: SMC::smcReadKeyAction ERROR F0Ac kSMCBadArgumentError(0x89) fKeyHashTable=0x0xffffff8012530200
    4. 09.02.14 17:17:22,368 spindump[4826]: Unity [4509] didn't gather any samples due to audio running
    5. 09.02.14 17:17:22,418 com.apple.launchd.peruser.501[171]: (com.unity3d.UnityEditor4.x.43680[4509]) Exited: Terminated: 15
    6.  
    That makes developing with Unity pretty much impossible for me right now, a first in the 18 months that I'm using Unity.

    Unity (Basic) 4.3.4
    CustoMac (i5-3570K, GeForce 650 Ti, Mac OS X.9.0)
     
  2. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Upgraded to Mac OS X.9.1 - no change. Editor still freezes when I hit Play or shortly afterwards. Not always though.

    This also happens with builds of my current project that were built with Unity 4.3.4. In my game, I can savely use the main menu, but as soon as I go into the actual game (first level) the game freezes during the load.
    Interestingly, this does not always happen, sometimes it just works. There might be a tendency that it happens more often at the "Fantastic" quality setting than on lower ones, but even that I am not sure of.

    CustoMac, X.9.1
    The same build, created by v4.3.4, does never freeze on a MacBookPro 2007 with OS X.8.5.

    Older builds of my project, created with v.4.3.0, never froze on any of these two machines.
     
  3. Griautis

    Griautis

    AI & Physics STE Unity Technologies

    Joined:
    Jan 26, 2013
    Posts:
    63
    Hey,

    Could you please send a bug report attaching your project? Don't forget to reply to this message with the case number, so I can process it as soon as possible.

    Best wishes,
    Ugnius
    QA Team
     
  4. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Hi,

    can't really attach my project, project folder is 2.4 GB. A build is 700 MB. I'm also reluctant to send my project to anybody, since it isn't even public yet. And I bet if I go and try to re-create the behavior on a new project to send you the problem is gone.

    The bugs I submitted are: #590314, #590320 and #590390. I am very willing to test builds. If you got one of those tools for me, that dump some debugging or graphics driver infos, I am willing to do that.

    To get working again, I downgraded to Unity 4.3.0 + an older project backup. I still get Editor freezes occasionally, but the builds work.

    This is a new build, built with Unity 4.3.0 on my Mavericks CustoMac, no freeze:

    Code (csharp):
    1. 10.02.14 21:45:03,322 Your Fancy App[5716]: Could not find image named 'ScreenSelector'.
    2. 10.02.14 21:45:03,328 Your Fancy App[5716]: *** WARNING: Method selectRow:byExtendingSelection: in class ScreenSelectorTableView is deprecated. It will be removed in a future release and should no longer be used.
    3. 10.02.14 21:45:34,191 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 41875
    4. 10.02.14 21:45:34,192 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 41875
    5. 10.02.14 21:45:34,192 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 41875
    6. 10.02.14 21:45:34,192 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 41875
    7. 10.02.14 21:45:34,192 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 41875
    8. 10.02.14 21:45:35,076 WindowServer[121]: CGXSetWindowListSystemAlpha: Invalid window 2351 (index 0/1)
    9. 10.02.14 21:45:35,077 Dock[183]: CGSOrderWindowListWithOperation
    10. 10.02.14 21:45:35,077 Dock[183]: CGSOrderWindowList
    11. 10.02.14 21:45:41,812 Console[5723]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
    This is a slightly older build, built with Unity 4.3.4 on my Mavericks CustoMac. The crash comes during the level load, with the CPU fan spinning up:

    Code (csharp):
    1. 10.02.14 21:46:05,202 Your Fancy App[5733]: Could not find image named 'ScreenSelector'.
    2. 10.02.14 21:46:05,212 Your Fancy App[5733]: *** WARNING: Method selectRow:byExtendingSelection: in class ScreenSelectorTableView is deprecated. It will be removed in a future release and should no longer be used.
    3. 10.02.14 21:46:31,954 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    4. 10.02.14 21:46:31,954 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    5. 10.02.14 21:46:31,954 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    6. 10.02.14 21:46:31,954 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    7. 10.02.14 21:46:31,954 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    8. 10.02.14 21:46:32,029 WindowServer[121]: CGXSetWindowListSystemAlpha: Invalid window 2406 (index 0/1)
    9. 10.02.14 21:46:32,029 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    10. 10.02.14 21:46:32,029 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    11. 10.02.14 21:46:32,029 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    12. 10.02.14 21:46:32,029 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    13. 10.02.14 21:46:32,030 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    14. 10.02.14 21:46:32,030 WindowServer[121]: CGXGetConnectionProperty: Invalid connection 107099
    15. 10.02.14 21:46:32,133 com.apple.launchd.peruser.501[171]: (unity.Your Fancy Company.Your Fancy App.128864[5733]) Exited: Terminated: 15
    16.  

    According to Activity Monitor, the app crashes at 4.6 GB memory usage (which is pretty much everything on my 8 GB machine). Normal memory usage is 1 GB (both v4.3.4 and v4.3.0 builds).

    Now, I don't know if you are with Mac OS X's Activity Monitor? But there you can see CPU or memory usage over time. When the app does not respond anymore, the list entry goes from black to red. In my crash case, the memory usage goes up from 1 GB to 4.x GB in about 4-5 seconds. During that transition, the entry is black. After those 4-5 seconds, the app entry turns red and the CPU spins up. Let this go on for a few minutes and you can see memory usage going down and then up again. Virtual Memory is reported at approx. 10 GB and starts growing when the physical memory is used up (to 20-30 GB until I kill the app).

    This is a 4.3.4 build crash in windowed instead of full screen mode:

    Code (csharp):
    1. Feb 10 22:09:52 Tilos-Mac-Pro.local WindowServer[121]: CGXGetConnectionProperty: Invalid connection 101675
    2. Feb 10 22:09:53 --- last message repeated 4 times ---
    3. Feb 10 22:09:53 Tilos-Mac-Pro.local WindowServer[121]: CGXSetWindowListSystemAlpha: Invalid window 2671 (index 0/1)
    4. Feb 10 22:09:53 Tilos-Mac-Pro.local Dock[183]: CGSOrderWindowListWithOperation
    5. Feb 10 22:09:53 Tilos-Mac-Pro.local Dock[183]: CGSOrderWindowList
    6. Feb 10 22:09:58 Tilos-Mac-Pro.local Escape Velocity 4[5774]: Could not find image named 'ScreenSelector'.
    7. Feb 10 22:09:58 Tilos-Mac-Pro.local Escape Velocity 4[5774]: *** WARNING: Method selectRow:byExtendingSelection: in class ScreenSelectorTableView is deprecated. It will be removed in a future release and should no longer be used.
    8. Feb 10 22:10:34 Tilos-Mac-Pro.local Console[5777]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
    I mean, it could either be 1) my specific project, 2) my CustoMac or 3) Mavericks (i.e. Unity).

    I don't get the freezes on my MBP2007 (Mountain Lion with 4.3.0 Editor, 4.3.0 Build, 4.3.4 Build), so let's say it's not the project. I'd also rule out the CustoMac, even though it's easy to blame that. A lot of people out there are using CustoMacs with Mavericks, albeit not many of them might be Unity developers. Also note that everything else I do works on the CustoMac under Mavericks. I'm using Mavericks standard graphics card drivers.
     
    Last edited: Feb 11, 2014
  5. TomD3

    TomD3

    Joined:
    Nov 30, 2013
    Posts:
    5
  6. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Is this limited to debugging? I have never used debugging in Unity ever.

    EDIT:

    I have done some more tests ... It seems that the problem of my project stand-alone build, built with 4.3.4, freezing during play and eating the RAM happens on Mountain Lion and official Apple hardware too. Just like under Mavericks and the CustoMac it does not always freeze, but sooner or later it does. The machine has 4 GB of RAM, so after the freeze, the app snatches about 3 GB (default is 970 MB) and then is marked as freeze in Activity Monitor.

    It does not happen with a build built by 4.3.0.

    MacBook Pro (2007), C2D 2.2 GHz, GF 8600M GT, 4 GB RAM, Mac OS X.8.5.

    Here's what's happening in the system.log:

    Code (csharp):
    1. Feb 12 15:18:38 My-MacBook-Pro.local My Fancy App[350]: Could not find image named 'ScreenSelector'.
    2. Feb 12 15:18:38 My-MacBook-Pro.local My Fancy App[350]: *** WARNING: Method selectRow:byExtendingSelection: in class ScreenSelectorTableView is deprecated. It will be removed in a future release and should no longer be used.
    3. Feb 12 15:18:47 My-MacBook-Pro.local coreaudiod[150]: Disabled automatic stack shots because audio IO is active
    4. Feb 12 15:20:36 My-MacBook-Pro com.apple.launchd.peruser.501[127] (com.apple.pbs[334]): Exited: Killed: 9
    5. Feb 12 15:20:36 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 334 [pbs]
    6. Feb 12 15:20:47 My-MacBook-Pro com.apple.launchd[1] (com.apple.cfprefsd.xpc.daemon[333]): Exited: Killed: 9
    7. Feb 12 15:20:47 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 333 [cfprefsd]
    8. Feb 12 15:20:47 My-MacBook-Pro com.apple.launchd.peruser.89[328] (com.apple.cfprefsd.xpc.agent[332]): Exited: Killed: 9
    9. Feb 12 15:20:48 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 332 [cfprefsd]
    10. Feb 12 15:20:48 My-MacBook-Pro com.apple.launchd.peruser.89[328] (com.apple.distnoted.xpc.agent[331]): Exited: Killed: 9
    11. Feb 12 15:20:48 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 331 [distnoted]
    12. Feb 12 15:20:48 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 325 [cfprefsd]
    13. Feb 12 15:20:48 My-MacBook-Pro com.apple.launchd.peruser.501[127] (com.apple.cfprefsd.xpc.agent[325]): Exited: Killed: 9
    14. Feb 12 15:20:48 My-MacBook-Pro com.apple.launchd[1] (com.apple.sleepservicesd[322]): Exited: Killed: 9
    15. Feb 12 15:20:48 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 322 [SleepServicesD]
    16. Feb 12 15:20:50 My-MacBook-Pro kernel[0]: (default pager): [KERNEL]: ps_select_segment - send HI_WAT_ALERT
    17. Feb 12 15:20:50 My-MacBook-Pro kernel[0]: macx_swapon SUCCESS
    18. Feb 12 15:20:58 My-MacBook-Pro com.apple.launchd[1] (com.apple.sleepservicesd[354]): Exited: Killed: 9
    19. Feb 12 15:20:58 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 354 [SleepServicesD]
    20. Feb 12 15:20:59 My-MacBook-Pro kernel[0]: (default pager): [KERNEL]: ps_select_segment - send HI_WAT_ALERT
    21. Feb 12 15:20:59 My-MacBook-Pro kernel[0]: macx_swapon SUCCESS
    22. Feb 12 15:21:09 My-MacBook-Pro com.apple.launchd[1] (com.apple.sleepservicesd[355]): Exited: Killed: 9
    23. Feb 12 15:21:09 My-MacBook-Pro kernel[0]: memorystatus_thread: idle exiting pid 355 [SleepServicesD]
    24. Feb 12 15:21:10 My-MacBook-Pro.local spindump[357]: My Fancy App [350] didn't gather any samples due to audio running
    25. Feb 12 15:21:10 My-MacBook-Pro.local coreaudiod[150]: Enabled automatic stack shots because audio IO is inactive
    26. Feb 12 15:21:11 My-MacBook-Pro com.apple.launchd.peruser.501[127] ([0x0-0x37037].unity.My Fancy Company.My Fancy App[350]): Exited: Terminated: 15
    27. Feb 12 15:21:11 My-MacBook-Pro.local distnoted[365]: # distnote server agent  absolute time: 1341.032524479   civil time: Wed Feb 12 15:21:11 2014   pid: 365 uid: 89  root: no
    28.  
     
    Last edited: Feb 12, 2014
  7. avatara359

    avatara359

    Joined:
    May 12, 2010
    Posts:
    41
    Not sure if this will help. I found a similar freeze problem upon hitting play in the OSX unity editor. I eventually realized it was caused by having the Profiler Open and recording. Turning off recording in the Profiler fixed the problem. The same occours when auto attaching from an iOS device.

    There is something happening during initialization in my project that is causing this but I can't tell what. This happens right before my facebook login screen appears, but that isn't necessarily the cause, a lot of stuff is going on. The profiler can safely record after initialization, just need to give it a few seconds.

    Edit:
    Using the same project on a new second device makes the GameCenter login popup and work correctly. Still can't figure out how to force the login to appear on the first device.
     
    Last edited: Feb 28, 2014
  8. ava_will

    ava_will

    Joined:
    May 8, 2014
    Posts:
    2
    Are other people still experiencing this? It just started happening with our project. I found that when I hit "Play", or "Stop", the Unity process would hit 45,000+ open ports in Activity Monitor. I then noticed that cfprefsd had a similar number open at the same time. When trying to debug I found that it was often stuck in PlayerPrefs.Save(), which I removed to no avail. But killing the cfprefsd process immediately makes Unity respond again: suggesting there is some app Preferences cache issue going on. I'm running 4.6 beta 20 on Yosemite GC 2.
     
  9. ava_will

    ava_will

    Joined:
    May 8, 2014
    Posts:
    2
    Found a fix for the issue I was having:

    Checking the ~/Library/Preferences/ folder showed a bunch of malformed preferences files for our game, eg.

    unity.<company name>.<game name>.plist.z3fGv3n

    Deleting all of these, and also the regular unity.<company name>.<game name>.plist has appeared to fix the problem.
     
  10. Jimosky

    Jimosky

    Joined:
    May 7, 2015
    Posts:
    1
    I am having the same problem. New user here. The editor play and standalone play both freeze. It opens, but none of the navigation controls work. I have personal edition 5 running on a late 2013 Mac Pro running 10.10.3 with 16gb ram and an
    AMD FirePro D500 3072 MB. Deleting prefs from ~/Library/Preferences/ folder did not help. Any suggestions? If I can't play the thing, I'm pretty much SOL.