MusicSequenceFileLoad Returns -1 on iOS10, iPad Pro Wifi Model Only (AudioToolbox/MusicPlayer)
| Originator: | downtothis | ||
| Number: | rdar://28425770 | Date Originated: | 22-Sep-2016 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 10.x |
| Classification: | AVFoundation (Audio / Video) | Reproducible: | Yes |
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, specifically iPad Pro Wifi model. Research / 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 (or third) that the VC is loaded where MusicSequenceFileLoad returns -1.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 iPad Pro Wifi version running iOS 10.0.1. I've tested on other devices and this crash does not happen on iPad Pro Cellular, iPhone 6+, or iPad Mini 4th gen. (I do not have any other test devices that can be used.) No crash report is created on the device when this issue is encountered since the method simply returns a -1. 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. Steps to Reproduce: 1. Unzip the attached project and open the Groove Freedom.xcodeproj. 2. Run the project on an iOS 10.0.1 iPad Pro Wifi model device. 3. Choose any chapter from the left-side of the split view controller, e.g. "Chapter 1". 4. Choose any cell from the next table view controller, e.g. "Quarter Note Hi Hats". Details are displayed on the right hand side in the detail view controller. 5. Tap the preview "play" button to play a preview of the MIDI file audio. These MIDI files are one measure long and repeat for 4 measures (approximately 10 seconds long). 6. Tap on a different table view cell, e.g. "8th Note Hi-hat Groove". 7. Tap the preview "play" button to play a preview of the MIDI file audio. 8. The app may crash at this point. If not, repeat steps 6 and 7. The app usually crashes on the 2nd or 3rd time. FYI, I was not able to build a separate test app to illustrate this behavior - so I took my existing project, removed as much of it as possible, and the issue is 100% reproducible within this project. Expected Results: I expect the same behavior as has been seen previously: the MIDI file loads successfully and is played. This can be seen in the iOS10 simulator as well as any iOS 8 or 9 simulator or devices. Actual Results: MusicSequenceFileLoad returns a -1 and is not able to continue processing. Version: 10.0.1 (14A403) Notes: I tried to use a mobileconfig file (that I was given previously to troubleshoot an iOS9 audio player issue) to gather additional logs, but unfortunately I was not able to install this profile on my iOS 10 device. Configuration: iPad Pro Wifi Model Attachments: 'MidiFileLoad Bug Project.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Duplicate of 28327056 (Open)
Sometime recently this was updated in Apple's Bug Reporter with the following: Duplicate of 28327056 (Open)