Search Unity

Game works in development build, but in production I get EXC_BAC_ACCESS

Discussion in 'iOS and tvOS' started by nicmar, Nov 8, 2014.

  1. nicmar

    nicmar

    Joined:
    Oct 25, 2014
    Posts:
    14
    I recently had some issues with getting EXC_BAC_ACCESS, which seemed to occur due to calling object/vars that didn't exist, but that Unity didn't detect as errors.

    Then I enabled "Development build" and "Script debugging", and I could see in Xcode what script caused the issue and could easily fix it.

    Now I added a loading screen according to this tutorial:
    http://chicounity3d.wordpress.com/2014/01/25/loading-screen-tutorial/

    After this my game works perfectly in "Development build", and the loader does the job. But when I disable it, to get a production build (?), the game crashes when the loader is supposed to switch to the first level, and I get I get EXC_BAC_ACCESS.

    The script uses this, where name is the name of my scene, simply "01_game":
    Code (CSharp):
    1. Application.LoadLevel(name);
    Anyone has a clue on how to fix this?
     
  2. nicmar

    nicmar

    Joined:
    Oct 25, 2014
    Posts:
    14
    Anyone? I'm willing to put a bounty or pay someone a small amount by PayPal to fix this. Thanks! :)
     
  3. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    What messages get written to the Xcode console?
     
  4. nicmar

    nicmar

    Joined:
    Oct 25, 2014
    Posts:
    14
    Hi Graham, thank you for your reply. For some reason it seems to work now, I have been working a bit with the game, changing code, and don't get this error anymore. Didn't test it before i bumped the thread, sorry for that. I'm glad it works though. :)