Hi Derek,

Here's a small "me too" — in my app I am using the same function. On the same 
MIDI file, most of the time the function succeeds, but sometimes it returns -1.
The app does not crash, I guess I am lucky.
I have not found a way to reliably reproduce this. It happens maybe 1 out of 8 
times.
Still on iOS 9.3.5 here though, and Xcode 7.3.1.
Cannot say anything about previous iOS versions, I have included the function 
only recently.

I have pondered the thought to load the file up to 3 times; one of these 
attempts should succeed. Dirty approach, I know.
AVAudioSequencer seems to have no problems with it.

Have you tried to reduce the MIDI file until the crash disappears? Maybe there 
is some exotic data in it.
If your code loads other MIDI files successfully, maybe just that one file is 
corrupted.

Another idea is to create a test project that just loads that one file, to rule 
out side-effects.

Best,
Sven

> 
> I've encountered a crash when invoking the AudioToolbox / MusicPlayer API
> method "MusicSequenceFileLoad()" to load the contents of a MIDI file (from
> the given URL) into a music sequence on an iOS10 device and would greatly
> appreciate some assistance from the community.
> 
> Observations I've been able to make thus far:
> 
> * The first time the VC is displayed which uses this MIDI file all
> processing runs without any issues. It's only the second time that the VC
> is loaded where the app crashes. (Which makes me believe that this may be
> related to memory management.) The issue can be recreated consistently.
> 
> * This code has been working without issue in production on iOS7, 8, and 9
> for 2+ years and also runs without issue on the iOS 10 Simulator but
> crashes silently on a iOS 10 device (iPad Pro). Device is running iOS
> 10.0.1.
> 
> * No crash report is created on the device when this issue is encountered.
> No exception information or call stack is available when debugging within
> Xcode.
> 
> * Checking the OSStatus result code from calling this function simply
> returns a value of -1 and does not indicate the reason for the failure.
> 
> * Profiling for memory management issues (allocations, leaks, zombies), has
> not shown any information related to the crash.
> 
> * Turning on the Zombie Objects option did not reveal any Zombie Objects.
> 
> * Analyzing the application did not reveal any areas where memory was not
> being released.
> 
> I'm at a bit of a loss given the lack of information when the crash occurs.
> If anyone has any suggestions on other ways in which I could debug this
> issue it would be greatly appreciated. I feel like it could be related to
> memory management however from what I can see I am handling memory
> appropriately (using ARC for the application and releasing C-API objects as
> needed) and profiling has not revealed any issues that I can see.
> 
> Thanks in advance for your assistance!
> 
> Best,
> 
> Derek


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (Coreaudio-api@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to