Search Unity

Mountain Lion GM Crash building Mac targets with Unity

Discussion in 'Editor & General Support' started by fatso, Jul 15, 2012.

  1. fatso

    fatso

    Joined:
    Jul 21, 2006
    Posts:
    51
    Hi all,

    I've been tracking down a bug in the mountain lion GM which can cause coreservicesd to crash badly (with various flow on effects which can persist after reboot) when building a Mac target with Unity 3.5.3. From the crash logs, it looks to me like the issue is around setting the application icon -- the actual crash is in CIconStorageEntry::SetCompressedData() deep in Core Services. It may depend on the actual icon data in question, but I've managed to reproduce it on a couple of systems. It's reported to Apple as Radar # 11875836.

    Just mentioning it here in case others were experimenting with Unity3d on Mountain Lion. It's well worth keeping those time machine backups running...
     
  2. Deleted User

    Deleted User

    Guest

    have you tried building without an icon set?..

    on my side i will wait until unity its safe to use in both mountain lion and ios6..

    something tells me both mountain lion and ios6 will be released in matter of days
     
  3. fatso

    fatso

    Joined:
    Jul 21, 2006
    Posts:
    51
    That's a good idea, which I haven't tried yet. I might give it a go tonight, but there's quite a long turnaround time to put the machine back to rights afterwards :)

    Building for iOS is not affected, BTW.
     
  4. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Hi Fatso,
    Any updates on this?
    I just hit this badly http://forum.unity3d.com/threads/147780-3.5.5f3-OSX-Mountain-Lion-issues almost 2 wasted days and three reinstalls of ML so far.

    I actually hit it by running a .app built on PC and copied to OSX, which is my build workflow for desktop, as I just do iOS builds under OSX Unity. It seems to cause the same coreservices crash which then seems to currupt the whole OS. Nasty.

    What version of OS and Unity combination is best atm? I'd like to keep ML but is any version of Unity stable on it that won't cause the whole thing to crap itself?

    ty!
     
    Last edited: Aug 17, 2012
  5. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    @sonicviz, unable to replicate your issue. I just tested it - built angrybots.app on Windows XP SP3, Unity 3.5.5f3, zipped the .app directory. Copied to a OS X 10.8 machine, unzipped, launched the app, it runs with no errors and no problems. I am guessing there is something wrong with your Mac. If you can replicate the problem- like on more than one Mac, then definitely file a bug report with Unity Bug Reporter.
     
  6. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Hi Mindlube,
    Thanks for testing. How did you copy it - via pc to mac or from mac via pc?

    I'm *pretty sure* my mac is ok as I had it hardware tested by two different places today, one being Apple, and it passed no problems both times.
    They also reinstalled the OS for the third time as well which is currently running fine, though I have not installed Unity as yet.

    I'm guessing it may be application dependent. My particular app, for example, is accessing microphone and possibly other things that Angry Bots is not doing on startup.

    ty.

    EDIT: Scratch that...I've decided to revert to Lion and my last stable config. This is too much hassle when I least need it.
     
    Last edited: Aug 17, 2012
  7. fatso

    fatso

    Joined:
    Jul 21, 2006
    Posts:
    51
    I filed a Radar bug with Apple back in July (#11875836) but this is still marked as "Open" with no response. I went to the extent of reproducing the crash, then looking at exactly what files changed state, and submitted this to Apple with the bug report. My pet theory at the time was that libpng was blowing up in core services, and leaving an internal operation queue in a bad state. But it might not be anything like this.

    Personally I've just been building iOS releases, so I haven't really dug in any further. I'd certainly make sure my Time Machine backup was up to date before I built for Mac. Maybe I'll give it a go at the end of today, then if it leaves the machine unusable, I can restore a backup overnight. It's quite possible that in the two updates to Mountain Lion since the GM this has been fixed.
     
  8. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I think I found the problem and submitted an update bug to Unity a few days ago.

    My report:
    1) What happened

    I've been developing an app for quite a while on PC, OSX, and iOS. I
    generate the PC/OSX dektop apps on the PC. Since recent updates of Unity
    when I copy the OSX build to my MacBookPro from Windows 7 I've been getting
    finder crashes, and in some cases it totally destroyed my OSX install
    necessitating complete reinstall and visits to genuis bar.

    I believe I may have found the issue with unity, after much pain. The issue
    seems have something to do with the way OSX generates .DS_Store files

    As per a previous bug report on this (which was ignored) I noticed the icon
    of my app appeared corrupted if I looked at it in finder using column
    display mode (this shows an enlarged icon with app detail information).

    On my windows Unity project build settings I noticed the icon file was 1024
    truecolour.

    As an experiment, just now and in desperation to try anything, I just
    changed this to 1024 compressed and transferred the file across, and finally
    OSX does not crash, and the icon in finder column display looks ok, just a
    little fuzzy at large size.

    So to conclude: somehow, the icon file of a Unity app generated for OSX on a
    windows machine will cause OSX finder to crash if the icon settings are
    truecolour. Perhaps this is to do with your new png compression routine?

    This is a serious issue. Please fix! TY.

    2) How can we reproduce it using the example you attached

    Try creating a Unity OSX project on windows with the attached icon,
    settings as GUI/1024/Truecolour. Copy to OSX Lion machine from OSX. It
    should crash finder when you try and look at the .app .

    I've been using http://software.ryangrier.com/dsstorecleaner/ to clean OSX
    of corrupt ds store after this happens, and reboot OSX. It seems to work.

    It took me a long time to figure this out and I finally got the solution
    from
    http://intermarketing.merkados.com/finder-problems-mac-os-x-lion-finder-keep
    s-restarting-solution

    If you change app Icon settings to 1024/compressed the issue seems to
    disappear. I'm hoping this has fixed the problem. You cannot believe the amount of
    frustration and xplatform hassle the last 6 weeks have been ever since this
    cropped up. It originally showed up when I upgraded to a recent release of Unity.
     
  9. fatso

    fatso

    Joined:
    Jul 21, 2006
    Posts:
    51
    OK, I've retested with MacOS 10.8.2 (and Unity 3.5.6f4) and the problem still occurs. I used the standard asset "JoystickThumb.psd" as the selected icon for the Player in the crash test project. Unlike you, I'm building for Mac, using Unity on Mac. But you're description of the problem makes it sound very similar.

    Although this bug make be triggered by Unity, it's a OSX bug. No file contents, however hostile, should be able to crash an OS service running with high privileges. The bug is Apple's, and almost certainly represents a nasty security hole.
     
  10. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I'm glad (though not really glad if you know what I mean) that someone confirmed it's not just me. I never tried it direct on Unity Mac but suspected it probably was the same due to the internals. Good to confirm though.

    I agree it's triggered by Unity, but a serious nasty apple OSX bug. I'm still shocked that something as simple as a corrupt icon can trash a modern OS so easily. Still, Unity can at least close their hole that triggers it.

    As to whether Apple will, I'm not so sure. Ever since I got into this mess and discovered the nightmare of Finder crashes .DS_Store hell and the echo room of standard fixes on the web that generally don't work (including genius bar!) I'm unimpressed. OSX is fine...until it isn't and then you're on your own it appears.
     
  11. fatso

    fatso

    Joined:
    Jul 21, 2006
    Posts:
    51
    Just an update: my defect with Apple has been marked as a duplicate of Radar #10400585 with status "Open". I'll comment here when the original defect is resolved.
     
  12. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051

    Do you have a link to Radar #10400585 ?
     
  13. fatso

    fatso

    Joined:
    Jul 21, 2006
    Posts:
    51
    Sorry, there's no way to link to Radar defects publicly (unless they happen to be in openradar, of course). All I can even see in the related items section of the defect I filed is the ID of the duplicate, and it's status.
     
  14. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    Thanks for sharing the bug reports all- I'm starting to think that 10.8 may not be the stablest OS X release ever. I just had a nasty issue with a Radeon 5870 gpu which would randomly freeze up the entire OS. Bleh.