AudioStreamer icon indicating copy to clipboard operation
AudioStreamer copied to clipboard

stop method causes EXC_BAD_ACCESS on some rare cases

Open mayoneez opened this issue 14 years ago • 4 comments

When I play a short part (less than a second) of a lot of songs in a row and always stop the currently playing song with the stop method, sometimes the method will crash the program.

The crash happens in this call (inside the while loop):

    [NSThread sleepForTimeInterval:0.1];

I haven't managed to reproduce this systematically but I get the same crash about every other time I ran the program. On some cases the debugger will be caught in a loop and app will not crash but hangs up. Activating a breakpoint on that particular line doesn't produce a break.

Anyone else having the same problem?

mayoneez avatar Sep 13 '10 11:09 mayoneez

More info: Seems to happen only on the simulator. Haven't been able to reproduce it on the device.

mayoneez avatar Sep 13 '10 11:09 mayoneez

I debugged a bit more and got this message in the console:

"AudioQueue changed state in unexpected way."

After about 5 clicks after that (i.e. starting 5 new songs) the app crashed.

mayoneez avatar Sep 14 '10 06:09 mayoneez

After more debugging, it turns out that the handlePropertyChangeForQueue gets called when the object is in state AS_AUDIO_QUEUE_CREATION_FAILED:

"AudioQueue changed state in unexpected way. state = 8"

After a couple of plays after that, app crashes and before crash I saw this in the console:

"(967,0xb0185000) malloc: *** error for object 0xe705aa0: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug"

mayoneez avatar Sep 14 '10 06:09 mayoneez

hello, please did you manage to resolve this issue , im facing the same problem. Thnaks

ghost avatar Feb 03 '13 15:02 ghost