Search Unity

iOS5 GM Build problems?

Discussion in 'iOS and tvOS' started by Mark-Sweeney, Oct 7, 2011.

  1. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    UPDATE:

    It turns out new Xcode 4.2 (iOS SDK 5.0) does not respect GCC_THUMB_SUPPORT user setting anymore. This leads to the situation when all Xcode projects are compiled with thumb(1/2) enabled. Which is quite dangerous thing, because not all non-thumb code mixes well with thumb code (Unity runtime and especially AOT code aren't thumb-enabled) and application might start crashing randomly. This could be fixed by explicitly adding -mno-thumb flag to the compiler command line. It helped to fix issues on all cases I tested. Hope it helps you too.

    There are short instructions:

    1. In Xcode 4.2 click on your project root element.
    2. In next tab select Unity-iPhone target.
    3. Then select Build settings tab.
    4. Type cflags into search box.
    5. Unfold "Other C Flags" element, double click on the right side of "Debug" item. Then in pop-up window click on "[+]" button. Type in -mno-thumb there. Click Done.
    6. Double click on the right side of "Release" item. Then in pop-up window click on "[+]" button. Type in -mno-thumb there. Click Done.
    7. Build your project in Xcode and check if it now runs fine.

    P.S. let me know if this workaround helped fix your issues.
    Thanks!
     
  2. Koriotto

    Koriotto

    Joined:
    Jan 20, 2011
    Posts:
    3
    I tried everything. Disabling "script debuggin", disabling Development Build. If I ignore these 2 warnings, my build don't start on device.
    But now I going to try the UPDATE steps.
     
  3. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Did it work?
     
  4. Arkdurath

    Arkdurath

    Joined:
    Jan 10, 2010
    Posts:
    64
    With -mno-thumb flag i still geting this message:

    Code (csharp):
    1.  
    2. Oct 25 15:33:48 unknown UIKitApplication:com.damatha.jalisco[0xb29b][2718] <Notice>: A script behaviour has a different serialization layout when loading. (Read 72 bytes but expected 76 bytes)
    3. Oct 25 15:33:48 unknown UIKitApplication:com.damatha.jalisco[0xb29b][2718] <Notice>: Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    4.  
    Hopes it helps
     
  5. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    It is not supposed to cure that warning it is supposed to fix crashes :)
     
  6. Yass

    Yass

    Joined:
    Jun 27, 2011
    Posts:
    6
    -mno-thumb fixed my AOT crashes with Xcode 4.2 iOS 5.

    Now Is there a way to add the -mno-thumb cflag to the iOS player settings inside Unity so that the generated xcode project is fixed ?

    Thanks
     
  7. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Glad to know that it helped you. If you are "appending" Xcode project then this change should survive it. We hope to release official fix for it soon.
     
  8. Koriotto

    Koriotto

    Joined:
    Jan 20, 2011
    Posts:
    3
    Yes, now my build start on device. The warnings still appearing but the game works and that is enough for me.
    Thanks a lot.
    :)
     
  9. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Nope, still receiving SIGABRT. Looks like Im reverting to previous Xcode until fixed... :(
     
  10. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit your Xcode project as bug report ASAP. Thanks!
     
  11. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Done.

    Case 425234
     
  12. AntLewis

    AntLewis

    Joined:
    Feb 2, 2010
    Posts:
    254
    Tried all this, but my game is still crashing on the Unity splash screen with the error: Thread1: Program received signal 'SIGABRT'
     
  13. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit your project for investigation. Thanks!
     
  14. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    New case resent with Xcode App folder:

    Case 425287
     
  15. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Hmm, just got notified of Unity update that is supposed to fix this....???
     
  16. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    Nope, new update did nothing, still getting this :



    :(
     
  17. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    actually this is just a compiler warning that you can safely ignore. We will investigate your bug closer
     
  18. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I tried it with Xcode 4.2 on iPhone4S (iOS 5.0), iPhone4 (iOS 4.3.x) and iPod4 (iOS 5.0) and it worked just fine. Please make sure that you have selected "Unity-iPhone" build target in Xcode 4.2 (NOT the "Unity-iPhone-Simulator"). Otherwise no idea why it's not running on your device.
     
  19. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    Hello Mantasp.

    I found this thread because I am also seeing those warnings in the AppController.mm and was looking for a way to resolve them.

    BUT, I also have another issue:-

    There is a very long delay on the loading splash screen when initially running on iPad, but not on the iPhone? The delay is not present when running on the iPad alone, just when it's first run from xcode.

    The log in xcode, is as follows:

    Code (csharp):
    1.  
    2. GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Fri Sep 16 06:56:50 UTC 2011)
    3. Copyright 2004 Free Software Foundation, Inc.
    4. GDB is free software, covered by the GNU General Public License, and you are
    5. welcome to change it and/or distribute copies of it under certain conditions.
    6. Type "show copying" to see the conditions.
    7. There is absolutely no warranty for GDB.  Type "show warranty" for details.
    8. This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
    9. warning: Couldn't get real path for inserted library /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0.1 (9A405)/Symbols/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib
    10.  
    11. warning: Couldn't get real path for inserted library /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0.1 (9A405)/Symbols/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib
    12.  
    13. target remote-mobile /tmp/.XcodeGDBRemote-28149-41
    14. Switching to remote-macosx protocol
    15. mem 0x1000 0x3fffffff cache
    16. mem 0x40000000 0xffffffff none
    17. mem 0x00000000 0x0fff none
    18. [Switching to process 7171 thread 0x1c03]
    19. [Switching to process 7171 thread 0x1c03]
    20. sharedlibrary apply-load-rules all
    21.  
    *******************************************************************************
    ******************** LONG DELAY HERE, THEN: ********************
    *******************************************************************************


    Code (csharp):
    1.  
    2. warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0.1 (9A405)/Symbols/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib (file not found).
    3. warning: No copy of GPUTools.framework/libglInterpose.dylib found locally, reading from memory on remote device.  This may slow down the debug session.
    4. warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.0.1 (9A405)/Symbols/Developer/Library/PrivateFrameworks/GPUTools.framework/../GPUToolsCore.framework/GPUToolsCore (file not found).
    5. warning: No copy of GPUToolsCore.framework/GPUToolsCore found locally, reading from memory on remote device.  This may slow down the debug session.
    6. 2011-11-19 21:20:51.074 BoyfriendRPG[624:707] -> registered mono modules 0x11ef074
    7. -> applicationDidFinishLaunching()
    8.  
    any idea what is going on here??

    Thanks...
     
    Last edited: Nov 19, 2011
  20. Smooth Curves

    Smooth Curves

    Joined:
    Aug 13, 2011
    Posts:
    6
    FYI: Am seeing this also, randomly, combined with a SIGABRT on launch. ipad Ver 1, ios 5.0.1 (latest as of and xcode 4.2.1 build 4D502) on a Mac Mini (OSX 10.7.2)
     
  21. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    I got same issue warnings when I build from Unity3.4.2f2 to Xcode. Unity 3.5.0b6 seems fixed this problem already.

    Anyway if you still want get away the warning, here is the solution:
    1. Warning of Enumeration value 'kScreenOrientationUnknown'

    switch( orient ){
    // no need to change other original code

    // Solution: Just Add this following code
    // shouldn't got there, just shutting up compiler
    default: return UIInterfaceOrientationPortrait;
    }

    2. Warning of the incompatible pointer:
    if( _glesContextCreated )
    {
    DestroySurface(_surface);
    // Solution: delete this code --> CreateSurface([self view], _surface);
    }

    Hope it helps :)
     
  22. Catacomber

    Catacomber

    Joined:
    Sep 22, 2009
    Posts:
    682
    Thanks, Lucky Mouse. : ) I was getting these two warnings as well and while the build still ran on my device, as an XCoder, I don't feel comfortable with warning messages. Your fixes worked perfectly. Thanks again! : )
     
  23. Barrett Fox

    Barrett Fox

    Joined:
    Jul 21, 2008
    Posts:
    14
    Hey Lucky Mouse,
    I've been running into those two identical errors. Adding your line "default: return UIInterfaceOrientationPortrait;" fixed the "Enumeration value 'kScreenOrientationUnknown" error. But for the second error ("incompatible pointer"), deleting that line of code caused the app to freeze on startup.

    Seemed to work for Catacomber and I was followed those instructions pretty carefully. Am I missing something else?
     
  24. Catacomber

    Catacomber

    Joined:
    Sep 22, 2009
    Posts:
    682
    This worked for me:


    To fix Incompatible pointer:

    - (void)didRotateFromInterfaceOrientation: (UIInterfaceOrientation)fromInterfaceOrientation
    {
    UnitySetScreenOrientation(_curOrientation);
    ScreenOrientation prevOrientation = ConvertToUnityScreenOrientation(fromInterfaceOrientation, 0);

    if( OrientationWillChangeSurfaceExtents(prevOrientation, _curOrientation) || _allowOrientationDetection )
    {
    if( _glesContextCreated )
    {
    DestroySurface(_surface);

    }
    }

    UnitySetAllowOrientationDetection(false);
    }

    //you just take out the line CreateSurface([self view], _surface);
     
  25. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Why is this necessary? I want serialized fields that exist only in the Editor. What's the solution? The error message is useless in tracking down the problem, also. If that's because of obfuscation, then there needs to be a build setting to avoid it. Or, ideally, Unity's console should tell us where the problem is.
     
    Last edited: Feb 11, 2012
  26. CybrKnight2

    CybrKnight2

    Joined:
    Feb 15, 2012
    Posts:
    58
    Finally got it working, thanks for the solution LuckyMouse :)
     
  27. CarlL

    CarlL

    Joined:
    Nov 11, 2008
    Posts:
    83
    I have 200+ Mach-O errors when I try to build. This kinda sucks. I like Unity, don't want to dive into xCode right now. It's all Greek to me.
     
  28. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Upgrade to Unity 3.5 + hit build&run?
     
  29. ronronmx

    ronronmx

    Joined:
    Aug 16, 2010
    Posts:
    201
    Same here...just installed Unity 3.5, hit build&run, and my xcode project has 201 "Apple Mach-O Link" errors. I don't know what to do. XCode downloaded and installed latest 5.0 SDK, so it's there for sure.

    Any ideas?
     
  30. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    Does this problem still persist in Unity 3.5?
     
  31. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    This fix was included into Unity 3.5
     
  32. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    I cannot deploy anymore to iOS devices. It's crashing on VerifyiPhoneSplashScreen.cpp
    I have Lion 10.7.3, XCode 4.3.1, iOS 5.1 (on iPad1) and iOS4 (on iPod2g) and Unity 3.5.0f5.
    I even created a new project with just a GUI Text and keeps giving me the same error
     
    Last edited: Mar 14, 2012
  33. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Have you checked this thread?
    @Yilei_Yang: @Unity3D iOS basic license users, do NOT update to XCode 4.3.1 http://t.co/vTKxqTzF
     
  34. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    We are working on the fix. We advice to downgrade your Xcode to 4.3 as workaround. More details can be found on dedicated forum post: http://forum.unity3d.com/threads/126905-Xcode-4.3.1-iOS-SDK-5.1-Known-Issues-(postpone-upgrade)
     
  35. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    10x for the reply... downgrading
     
  36. grogleas

    grogleas

    Joined:
    Mar 26, 2012
    Posts:
    2
    I have the same configuration and same problems. Unfortunately the downgrade is not available? When I trying the download link on appdev site (already logged) I got the Access Denied. Any clue? When you expecting to fix the problem with Xcode 4.3.1?
     
  37. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
  38. grogleas

    grogleas

    Joined:
    Mar 26, 2012
    Posts:
    2
    Thank you!
     
  39. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Hi,
    we have beta quality build for closed group testing. This build includes Xcode 4.3.x/iOS 5.1/iPad3 fixes and improved support. Please PM me if you want to get this beta build ahead of time.
     
  40. simjeanny88

    simjeanny88

    Joined:
    May 17, 2012
    Posts:
    19
    Hi! I have problem in Xcode warning.

    enumeration values 'Screenorientation unknown','autorotation',and 'KScreenorientationCount' not handled in switch.

    I d't know what is that problem?
     

    Attached Files: