Jump to content

Mobile Safari Crashing During Preload


kenray
 Share

Recommended Posts

The app we're building displays "pages" that the user navigates to. The page content and functionality is extracted from a local-to-the-server JSON file, which is also used to determine what assets (graphics, audio, animations, etc.) will be loaded for each "page". The Preloader state is called at boot time which preloads all the pages of the app (and their assets) before it starts running the app. We wanted to preload everything so once the app runs, it will run smoothly and without delay.

 

The problem we're running into is that it looks like we're running out of memory after loading three MP3 files (one is 3.6MB, one is 2.8MB and the other is 1MB.

 

When I ran a memory test through Xcode *without* preloading the audio (but still loading everything else), my iPad started with 1.30GB of physical memory free and dropped to a minimum of 599MB during the preload period and quickly stabilized at about 900MB free.

 

When I enable the three audio files to preload, it gets down to about 54MB free, and gets four low memory warning flags before it finally crashes Mobile Safari.

 

The audio files are all 48Kbps CBM stereo - we can't figure out why the audio is causing this problem and even if there's an answer, we need to know what possible strategies to use to get around this.

 

We're using the latest (2.0.7) - Any ideas on what's going on here and/or what we can do?

Link to comment
Share on other sites

Thanks, Rich - m4a's helped (even though they take up more disk space so they take longer to upload to our server than mp3s), and it doesn't seem to crash now on more recent iPads (a retina iPad mini with 1GB RAM), but it still does with the original mini with 512MB RAM... I'm looking to see if there's any other places where I'm not loading/purging things properly and will write back if I have any issues I can't resolve.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...