[Resolved] app keeps crashing

Hi all,
This is my first app… I used kwiksher to generate the code for a storybook app and now when I generate the build it appears correctly on the iPad, but every few pages it crashes.
Sometimes it actually crashes the iPad and I have to restart.

I am going page by page using the terminal and here is the first error I can’t figure out… It occurs when I turn the page. On the simulator, the page turns successfully. On my device about half of the time it crashes the app.

leftToRight
ALmixer_FreeData: alDeleteBuffers failed. Invalid Operation

Thanks [import]uid: 106593 topic_id: 22866 reply_id: 322866[/import]

I cannot say exactly where your problem is BUT as by the message error you posted above, it looks like the problem concerns audio/sound file if you do use/have sound in your app.

What type of audio file are you using?

Rodrigo. [import]uid: 89165 topic_id: 22866 reply_id: 91398[/import]

As Rodrigo says it looks like potentially an audio issue - can you try commenting out all audio temporarily and running the app to see if the issue still occurs? This would be a good way to isolate the problem. [import]uid: 52491 topic_id: 22866 reply_id: 91409[/import]

Thank you both for the reply.
This storybook app has a lot of audio. All mp3’s. Usually a “score” and a "narration both.

I believe you are both correct. When you run the app and let the audio play through to the end, and then turn the page, it works fine. When you interrupt the audio with a page turn it crashes about 50% of the time.

I looked up this topic on the forum and found this thread:
http://developer.anscamobile.com/forum/2011/10/26/almixerfreedata-aldeletebuffers-failed-invalid-operation-again

Here is the code to cancel audio as I have it from Kwiksher:

function disposeAudios(event)
audio.stop(2); audio.dispose(kwk_readMeFile); kwk_readMeFile=nil
audio.stop(32); audio.dispose(kwk_readMeFile); kwk_readMeFile=nil
audio.stop(3); audio.dispose(music_aud388); music_aud388 =nil
end

I don’t have the skills to know if this needs more audio disposal, and if so, what and where to put it…
Thanks,
Laura [import]uid: 106593 topic_id: 22866 reply_id: 91534[/import]

The support at kwiksher has helped me with this problem
function disposeAudios(event)
audio.stop(2); audio.dispose(kwk_readMeFile); kwk_readMeFile=nil
audio.stop(32); audio.dispose(kwk_readMeFile); kwk_readMeFile=nil
audio.stop(3); audio.dispose(music_aud388); music_aud388 =nil
end
has the dispose function two times for the readMeFile.

I removed the top line of code and I am no longer getting the error. [import]uid: 106593 topic_id: 22866 reply_id: 91582[/import]

@Iwat4ever - Great News! :slight_smile: [import]uid: 89165 topic_id: 22866 reply_id: 91589[/import]

Always knowing the channel is rough. If audio cannot be disposed of without first hitting the channel with stop, why does the system even allow automatic picking of available channel?

Up until right after the last stable release, I was able to use:
audio.stop(sound) not audio.stop(channel), which made perfect sense to me. Then after moving into the daily builds, my app crashed right off the bat. I have been fighting with this issue ever since… [import]uid: 21331 topic_id: 22866 reply_id: 99366[/import]