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

iOS5 GM Build problems?

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

  1. Mark-Sweeney

    Mark-Sweeney

    Joined:
    Feb 21, 2010
    Posts:
    172
    I haven't made any changes to an app that worked fine in iOS 4.3.5. But with iOS5 GM on my iPad 1, Xcode 4.2 SDK 4.2, I can't get XCode to build. I get 3 warnings and 31 Apple Mach-O Linker errors.

    Using Macbook with Snow Leopard.

    Am I doing to have to restore my iPad to 4.3.5 and downgrade until Unity is ready to deal with iOS5?
     
  2. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  3. Mark-Sweeney

    Mark-Sweeney

    Joined:
    Feb 21, 2010
    Posts:
    172
    I think we need a forum or thread devoted to iOS 5 problems.

    One developer here has been told that apps must work in iOS5. So building for 4.3.5 is no longer an option, and the only way to test iOS5 is upgrade everything and figure out how to get a working build in Xcode.

    I get two warnings:

    Code (csharp):
    1. iPhone/Classes/AppController.mm:882:18:{882:18-882:29}: warning: incompatible pointer types passing 'UIView *' to parameter of type 'EAGLView *' [-Wincompatible-pointer-types,3]
    2.  
    3. iPhone/Classes/AppController.mm:461:10: warning: enumeration values 'kScreenOrientationUnknown', 'autorotation', and 'kScreenOrientationCount' not handled in switch [-Wswitch-enum,3]

    The Build succeeds, Unity Splash screen shows, and that's as far as it goes. I get a Thread 1: Program received signal: "EXC_BAD_ACCESS."

    A warning pops up in Thread 1: If I click on it, I get <text variable, no debug info> p_4494 It's

    This is in Libraries > mscorlib.dll.s



    I've made only 1 change to this program, and that's in a level that's nowhere near loaded at this point.
     
  4. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Hmm.. On our side we can successfully build and deploy Penelope and many other projects using Xcode 4.2 (iOS SDK 5.0). It might be your project specific problem or just Xcode / device glitch.
    Could you please try:
    1. Hard reboot device (hold home + sleep buttons for 10 sec.)
    2. Close Xcode.
    3. Rebuild project from Unity replacing existing project instead of appending it.
    4. Open project in Xcode and run.
    If this still happens please submit a bug report with your project attached to it.
     
  5. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    This is what I am getting as well.
    I have a Game about to be released developed with Xcode iOS 4.3, already approved by appstore last week (but unreleased as yet).

    I just finished the upgrade of iPad to iOS5, upgraded MacBookPro, upgraded Xcode to iOS5.

    Game now crashes running a normal unity build onto the iPad from xcode, with a number of
    "Thread 1: Program received signal "Exec BAD_ACCESS" "

    BUT if I build it as a Unity development build and hook up the profiler...it starts ok and runs on the iPAD.
    Why does it work in development build mode but not normal build mode?
    This is REALLY frustrating!

    This is the same project , unchanged, used to submit for successful approval under iOS 4.3

    Any ideas on what I should be looking for?

    See also http://forum.unity3d.com/threads/107987-iOS5-crashing-approved-game?p=714625#post714625

    ty.
     
    Last edited: Oct 14, 2011
  6. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Please submit your Xcode project as bug report and post the bug number.
    Thanks!
     
  7. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I did, reply from Unity below. No answer to my question though: why does development build work yet normal build fail.
    I use autorotate, but disabling it does not stop the crash. I cannot send you my project as it is running between 500mb - 2gb (lot of branch testing ideas in there to clean up before I'd even consider sending to someone)

    Doesn't Unity have a trace log feature that can capture crashes to debug? Be easier to send that no?

    And I realise the tricky nature of keeping up with Apple, but I really think Unity needs to be communicating iOS5 compatibility issues in a much more public manner, on the blog as per the previous iOS 4.3 issues. This seems to be a inconsistant showstopper, some people it works yet others it is a showstopper, but lack of communication as to status of potential fixes is critical. ty!


    -----Original Message-----
    FW: (Case 42299 My game was approved by Appstore last week, developed with

    From: Unity QA [mailto:bugs@unity3d.com]
    Sent: Friday, October 14, 2011 12:29 AM
    To: xx@yy.com
    Subject: Re: (Case 42299 My game was approved by Appstore last week, developed with

    Hey,

    We have some fixes for iOS 5 but I don't know when it will be released. Most common crash is related to AutoRotation. Are you using this feature? If yes, try disabling it for now and see if it's still crashes.

    If app still crashes it would be really nice if you could send us a project for investigation.

    Regards,
    Andrius Kuznecovas
    QA Engineer
     
    Last edited: Oct 14, 2011
  8. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
  9. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
  10. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    should i re-read it once again? 8-P ;-)
     
  11. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Forgive me, I'm only a lowley indie developer who can't get a simple answer to a question I keep asking.
    Let me repeat it for the 6th time (via Unity forums, Unity Bug report, twitter and now here again - yes, I'm desperate to fix it so I can move on).

    Why does my game crash in normal build mode with Exec_Bad_Access but runs in Developer Build mode?
    How in god's name am I supposed to a) debug it to find the crash (which seems more than likely Unity related to me) and b) Resubmit back to Appstore with Development Build displayed prominantly on it?

    ty.
     
  12. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    come on 8)
    EDIT: damn, missed the part that you submitted bug. what is the case number? Though we are deep into 3.5 so might be problematic to find one real cause
     
  13. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    *snip from above*
    -----Original Message-----
    FW: (Case 42299 My game was approved by Appstore last week, developed with
     
  14. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    it is *422998*
    Also you didn't attach any repro. How we are supposed to help you?
     
  15. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    *Snip from above*
    I cannot send you my project as it is running between 500mb - 2gb (lot of branch testing ideas in there to clean up before I'd even consider sending to someone). Project export does not work 100% on only assets related to project scenes I've noticed before, so I'm not actually looking forward to having to spend time to create a slimmed down project. I'd rather work on what might be the problem.

    I build the project normally, it crashes with same errors as outlined in top of this thread.
    I build with Development Build it works fine.

    I keep asking what is the difference between the two, how in can it fail in normal build yet work in development build?
    No one wants to seem to answer that.

    Please give me some clues as to what to look for, or is this bascially an iOS5 / Unity incompatibility that I'll just have to wait an unspecified amount of time to get fixed. (I just spent 6+ weeks solving multiple bugs with another Mac app and LION update so I'm not in a good mood for another round with iOS5 - excuse me.)

    ty
     
  16. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    well, because it is not as easy as say: we disable some features. Seriously - as mantas said - we need just your xcode project (full, sure). The directory where did you build your game. Only that
     
  17. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Well, it looks to me like your disabling the features that make it work, or vice versa.

    If it's only the xcode project then that's only 169mb, but will you need both versions (normal and development builds) or just the fail (normal build). How do I give you the build?
     
  18. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    well, lets start with developer build. Actually the only difference should be in linked unity library - but to play safe [maybe we screw smth on build].
    You can report one more bug and attach zip file. drop me case number
     
  19. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Ok. Should I build it with Symlink Unity Libraries checked or unchecked?
    It fails with this checked, but built normally. It only runs successfully when Development Build also checked.
     
  20. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    hold on. if it fails to build with symlink checked, then you have corrupted unity install?
     
  21. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    hold on, let me rephrase that.

    It builds successfully to xcode projects ALL the time.
    If I do a normal build (ie: no extra player settings like symlink or development build checked) when I run the Xcode project to test on the iPad it freezes on the splash screen with eventual errors as outlined above (multiple Exec_Bad_access)
    If I do a normal build with symlink Unity Libraiies checked I get the same behavior.
    If I check Development Build the xcode project will run successfully on the iPad with no errors. I can also run the installed game successfully disconnected from Xcode.

    Does that compute?
     
  22. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    oh, you got me worried for a sec
    symlink is just to avoid copying library into project folder and symlink the one from unity installation. So check it and send over (just specify that you have it checked so noone would be scared about cannot link error ;-))
     
  23. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Could you clarify why you want the development build (which works) instead of the normal build (which fails)?
     
  24. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,623
    ouch, my bad, sorry - sure, send the failing one 8)
     
  25. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    The difference is quite small - development build just additionally includes profiling and debugging backends. But if you have basic license then development build also turns on soft null pointer checking (on Pro licenses it is enabled when Script debugging option is on).
    By default mono uses hardware exceptions to catch nullreferences and its usually faster than software checks before each method call / data access, unfortunately Xcode debugger doesn't play well with them, so they work only when application is launched without Xcode.
    Your case might be the one when script accesses uninitialized variable. Try running development build and inspect Xcode debugger console for .NET stacktraces. All this is briefly described in iOS troubleshooting manual : http://unity3d.com/support/documentation/Manual/TroubleShooting.html#iPhoneTroubleShooting .
    The only detail, which doesn't match is iOS 5.0 - all this stuff works the same for all iOS versions starting 3.1.3.
     
  26. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    OK, that's good, there are some differences then. I'm using Unity Basic.
    It's the same project that was working before on iOS 4.3 (and approved by appstore) so I'm not sure why iOS5 is suddenly vomiting.
    Let me try that and see what I can nail down before sending you an xcode build.

    ty!
     
  27. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I don't see any "Unhandled Exceptions" but I have a whole string of the following which seems out of the ordinary:
    -> force accelerometer registration
    A script behaviour has a different serialization layout when loading. (Read 64 bytes but expected 68 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/Serialize/SerializedFile.cpp Line: 812)

    Repeated about 15 times

    That's the only thing that looks like a possible error.
     
  28. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    And it is quite serious one. It might be causing your crashes. Try to fix it by carefully inspecting your scripts if they don't have public/serializable fields surrounded by #ifdefs and removing such code guards.
     
  29. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    *trawling the code base*

    Why now? I have not changed the code base bewteen Xcode updates. Why is it suddenly throwing it's guts up now?

    EDIT: As near as I can tell I have no "Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?" at all
     
    Last edited: Oct 14, 2011
  30. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Then please submit the failing Xcode project (you can use "use symlinks" build option for smaller size), also please attach zip of all your game scripts. Thanks!
     
  31. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    kk. I'll do an export just to try and cut it down to the actual scripts I'm using , including the third party libs.
    Just currently checking with one thrid party lib provider which *may* be the potenial source of the problem.
     
  32. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    Used to work. Updated to 5.0 and get this error:

    /Users/fredmarkus/Dropbox/ww2d02/ww2d/Classes/AppController.mm:460:10: warning: enumeration values 'kScreenOrientationUnknown', 'autorotation', and 'kScreenOrientationCount' not handled in switch [-Wswitch-enum,3]


    I managed to solve this once but can't remember how :(
     
  33. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    It's a warning, not an error. You don't need to fix it.
     
  34. bbrode

    bbrode

    Joined:
    Oct 5, 2011
    Posts:
    34
    I've been complaining about this for a while - I had to downgrade to Xcode 4.1 in order to get my Unity project to work again :( :( :(

    SUCKS
     
  35. bbrode

    bbrode

    Joined:
    Oct 5, 2011
    Posts:
    34
    sonic - are you using prime31 plugins by any chance?
     
  36. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  37. s0ren

    s0ren

    Joined:
    Oct 9, 2011
    Posts:
    24
    My game (to be submitted today) works perfectly. Here is what i have tried:

    Unity 3.4.1 + SDK 5.0 + xcode 4.2 = Game works perfectly on iOS 5.0 and iOS 4.3

    Unity player settings: armv7 only, fast but no exceptions, .NET subset, target iOS 3.2
    Uses prime31 GameCenter plugin

    I had to do ZERO adjustments to make my game work. It just worked out of the box.
     
  38. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    I have some of Prime's plugin's but not using in this game that has the problem.
    I am using a number of other ones that have full source, trying to eliminate one of them as the possible source of problem before I submit to Unity again.
     
  39. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Interesting Soren, ty for the settings. I just tried those with mine and development mode off and it now runs.
    My prior settings were:
    Unity 3.4.1 + SDK 5.0 + xcode 4.2 => iPAD2 w/ iOS5
    Unity player settings: iPAD only, armv7 only, Slow and Safe, .NET 2.0, target iOS 4.0
    It would fail under normal build but work under development build, but had previously been approved a week ago by appstore (not released as yet, coordinating win/mac versions and fixing a Lion bug)

    Change to your settings of Unity player settings: armv7 only, fast but no exceptions, .NET subset, target iOS 3.2
    and it now works under normal build.

    The console log still has the same messages as show above.

    @Mantasp What do you think is going on here?

    @S0ren Thanks again for the tip!

    EDIT: Just played through 2 modes , seems solid so I resubmitted to Appstore as version update.
     
    Last edited: Oct 16, 2011
  40. bbrode

    bbrode

    Joined:
    Oct 5, 2011
    Posts:
    34
    Sorry I didn't know how to submit a bug until recently, but I tossed one in last night for you, with my project attached: case 423356

    Thanks!
     
  41. bbrode

    bbrode

    Joined:
    Oct 5, 2011
    Posts:
    34
    Nevermind I guess I did submit a bug before. Oh well now you have two. The old one was 422943.
     
  42. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Good news is my appstore resubmission got approved in ~24 hours, quick turnaround for new versions it seems!


    @Mantasp I'm still curious as to why it fails on different build settings?

    My prior settings were:
    Unity 3.4.1 + SDK 5.0 + xcode 4.2 => iPAD2 w/ iOS5
    Unity player settings: iPAD only, armv7 only, Slow and Safe, .NET 2.0, target iOS 4.0
    It would fail under normal build but work under development build, but had previously been approved a week ago by appstore (not released as yet, coordinating win/mac versions and fixing a Lion bug)

    Change to your settings of Unity player settings: armv7 only, fast but no exceptions, .NET subset, target iOS 3.2
    and it works under normal build.

    The console log still has the same warnings as the failed build.
     
  43. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    .NET Subset might be the answer. It has some tweaks, which improve .NET library code compatibility with AOT. Though can't tell for sure without having chance to look at your project.
     
  44. bbrode

    bbrode

    Joined:
    Oct 5, 2011
    Posts:
    34
    mantasp - i sent my project with both of my bug reports...
     
  45. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Ok, I found 422943, will take a look at it.
     
  46. Arkdurath

    Arkdurath

    Joined:
    Jan 10, 2010
    Posts:
    64
    Hi all

    I recently updated to XCode 4.2 with Unity 3.4.1f5 and had a problem of app stuck, diferent of sonicviz problem, but, the interesing thing is that i changed to .Net 2.0 ---> subset .Net 2.0 and all goes well for the non-debug build.

    Also, i have this message from the console:

    Code (csharp):
    1.  
    2. A script behaviour has a different serialization layout when loading. (Read 72 bytes but expected 76 bytes)
    3. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    4.  
    5. (Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/Serialize/SerializedFile.cpp Line: 812)
    6.  
    And no, i didn't add any UNITY_EDITOR ifdef from the last update because i didn't change the code.
     
  47. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I have short news to share: we identified that "script debugging" option is causing crashes when project gets compiled with iOS SDK 5.0. At the moment please consider to turning "script debugging" off (basic license users probably need turn off "development build") as workaround.
     
  48. bbrode

    bbrode

    Joined:
    Oct 5, 2011
    Posts:
    34
    This actually did work for a while, then it still wasn't working. I reinstalled 4.2 and tried changing .NET from 2.0 to 2.0 subset and that worked!!!!!

    So that seems to have been my issue (to be clear, 2.0 worked perfectly under Xcode 4.1)
     
  49. Koriotto

    Koriotto

    Joined:
    Jan 20, 2011
    Posts:
    3
    I have the same problem and I could not find any solution, my builds always have 2 issues with AppController.mm. I have an iPad 1 with iOS 5 and Xcode 4.2.
     
  50. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Could you tell me more about "same problem" ? Does disabling "script debugging" help you?
    P.S. you can ignore these 2 warnings in AppController.mm.