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

Game Crashes when loading a level

Discussion in 'iOS and tvOS' started by Crazy Robot, Jun 5, 2013.

  1. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Hello all,

    I'm trying to debug a crash I'm experiencing on iOS (works fine on Android). My game loads to the main menu just fine, then when I load a level I get the following from xCode:


    #12 0x01a290d0 in FMOD::System::createSound(char const*, unsigned int, FMOD_CREATESOUNDEXINFO*, FMOD::Sound**) ()

    #13 0x010b9888 in AudioManager::CreateFMODSound(void const*, FMOD_CREATESOUNDEXINFO, unsigned int, bool) at /Applications/buildAgent/work/7535de4ca26c26ac/Runtime/Audio/AudioManager.cpp:807

    #14 0x010b2530 in AudioClip::CreateSound() at /Applications/buildAgent/work/7535de4ca26c26ac/Runtime/Audio/AudioClip.cpp:970

    #15 0x010b1bd8 in AudioClip::LoadSound() at /Applications/buildAgent/work/7535de4ca26c26ac/Runtime/Audio/AudioClip.cpp:1009


    I'm having a hard time figuring this one out.

    Any help would be appreciated.

    Unity 4.1.3 Pro, iOS Pro.

    Thanks,
     
    Last edited: Jun 5, 2013
  2. Jtbentley_v2

    Jtbentley_v2

    Joined:
    Sep 5, 2012
    Posts:
    174
    How big is the file after compression? Are you loading it into ram or streaming from disc? Are you decompressing into ram? Has it got a dependancy to ensure it's being included in the build?
     
  3. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Hey Jtbentley,

    Thanks for the help,

    I'm not sure what sound file it is. All of my sounds are compressed and "Compressed in Memory", the largest one is 177.9 kb.


    Do you know of a way I can find out what sound the issue is?

    Thanks,
     
  4. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Don't you have a loop where you init the sounds and can print the sound name ? o_O...

    Or does this error occur before the first script of you scene is launched?
     
  5. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Thanks for the help everyone,

    It doesn't crash if I disable batching.

    Interesting...
     
  6. Jtbentley_v2

    Jtbentley_v2

    Joined:
    Sep 5, 2012
    Posts:
    174
    Well that's just.. bizarre.

    However, batching can be expensive on memory. It might be possible that it's crashing during batch, that just happens to be while it's loading audio (multiple threads)?

    That's, at best, a weak theory. Anyone else?
     
  7. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    What's interesting is that the scenes aren't all that big, I just figure it's a mesh that batching doesn't like. Why it would throw an FMOD exception is beyond me.