Search Unity

iOS fail in epic fashion

Discussion in 'iOS and tvOS' started by tgraupmann, Oct 16, 2011.

  1. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Preface: I am an iOS noob developer.

    This was my first attempt to export to the iPad 2.


    Result: Crash, Memory Violation

    I'm still reading FAQs and getting up to speed. But I must say, I was able to export this project to Android with zero effort. I'm surprised that iOS did not work better out of the box.

    I could use any tips.

    This is a simple scene. A mesh, mesh renderer with a material. Maybe a mesh collider. The material has a custom shader sure.

    I suppose my first test should be try the diffuse shader and see if that works.
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yes lets blame iOS!

    Things to try:

    - see if in build settings, you have slow and safe on (for testing)
    - is it an appended project or new? ensure simulator isn't ticked in xcode

    I didn't observe anything wrong that you did.

    What version os and what version xcode and what version unity and...! what version of the sdk are you using? Thats a lot of whats.
     
    Last edited: Oct 16, 2011
  3. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Using mobile/diffuse for all the materials didn't make any difference.

    It just stops on the following:

    Code (csharp):
    1. void DestroySurfaceGLES(EAGLSurfaceDesc* surface)
    2. {
    3.     GLES_CHK( glDeleteRenderbuffersOES(1, &surface->renderbuffer) );
    4.     surface->renderbuffer = 0;
    5.  
    6.     GLES_CHK( glDeleteFramebuffersOES(1, &surface->framebuffer) );
    7.     surface->framebuffer = 0;
    8.  
    9.     DestroySurfaceMultisampleBuffersGLES(surface);
    10. }
    Thread 1: Program received signal: "EXC_BAD_ACCESS".
     
  4. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Looks like this is just an issue of using iOS5 when support it's still in development.

    Unity 3.4.1 PRO.
    iOS PRO
    Android PRO
    iOS 5
    iPad 2
     
  5. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    I did already have the default slow and safe setting on.

    I did notice the target iOS version was set to 3.

    I've set it to 4.3 latest.

    Trying that...

    ugh same result.

    Lion:

    XCode 4.2.

    • Posted Date: October 12, 2011
    • Build: 4D199
    • Included iOS SDK: iOS 5
    • Included Mac SDK: Mac OS X 10.7
     
    Last edited: Oct 16, 2011
  6. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    The solution appears to be to downgrade the iPad to 4.3.

    Downgrade the SDK.

    Downgrade XCode.

    Or... what wait for Unity to catch up.

    How long does it usually take Unity to catch up? Or do they have to do a new release?
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    not long, this is a vitally important issue. Could you please submit this bug then get the repro number, and post it in this forum? a mod will pick it up.

    Submit bug report inside unity, with details, and a link to this topic, there is a menu item...

    Lets get this thing nipped in the bud, it sounds like there shouldn't ever be a problem but there is.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    So it looks like the bug is: iOS 5 + 3.4.1 = crash on ipad2.
     
  9. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    (Case 423314)


    Simple to repro since it happens instantly. The best kind.
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Good luck with this, it's pretty much a big deal for me (any ios issue is!)
     
  11. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    this is weird , i tried out building on ipad2 with a simple scene using cube and mobile diffuse on it and i did not get any issue.
    the app launch as expected

    ipad 2 iOS 5
    Xcode 4.2
    unity 3.4.1

    in build setting target is set to
    IOS latest, micro mscorlib, fast but no exception
    and i do a validate on Xcode, for the project, as when it come from unity it will learn about that.

    I just compiled without do any modification on the appController.mm, so just straight from build using replace.

    I will of course get a prob if i let autorotation in the build setting ( but a work around has been posted for this )
     
    Last edited: Oct 16, 2011
  12. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    I had autorotation on. When I set it to portrait it runs without crashing. Thanks a ton man!
     
  13. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Whooo the move shaders work on the iPad. Niice! Lighting is dark. I'll have to modify an unlit shader to brighten things up.

    Thanks giyomu!
     
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Are you saying autorotation crashes ios5 ? thats crazy. Got a link?
     
  15. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094