Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17997] iOS: playing local file in AudioPlayer results in crash

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-11-28T06:45:33.000+0000
Affected Version/sRelease 3.3.0, Release 3.4.0
Fix Version/sRelease 3.5.0, Release 4.0.0
ComponentsiOS
Labelsaudioplayer, ios, module_media, mp3, qe-3.4.1, qe-manualtest
ReporterEric Wieber
AssigneeChee Kiat Ng
Created2014-11-10T22:02:22.000+0000
Updated2014-11-28T06:45:33.000+0000

Description

Calling start() or play() on an AudioPlayer that has the url set to a local file results in a crash:
[DEBUG] :  Application booted in 146.823049 ms
[DEBUG] :  -[__NSCFDictionary close]: unrecognized selector sent to instance 0x14ebef40
[ERROR] :  The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
[ERROR] :  Reason:
[ERROR] :  -[__NSCFDictionary close]: unrecognized selector sent to instance 0x14ebef40
[ERROR] :  Stack trace:
[ERROR] :  
[ERROR] :  0   CoreFoundation                      0x26068c1f <redacted> + 126
[ERROR] :  1   libobjc.A.dylib                     0x33870c8b objc_exception_throw + 38
[ERROR] :  2   CoreFoundation                      0x2606e039 <redacted> + 0
[ERROR] :  3   CoreFoundation                      0x2606bf57 <redacted> + 714
[ERROR] :  4   CoreFoundation                      0x25f9ddf8 _CF_forwarding_prep_0 + 24
[ERROR] :  5   MediaModule                         0x0022316b MediaModule + 1692011
[ERROR] :  6   Foundation                          0x26d77b5b <redacted> + 1118
[ERROR] :  7   libsystem_pthread.dylib             0x33f33e93 <redacted> + 138
[ERROR] :  8   libsystem_pthread.dylib             0x33f33e07 _pthread_start + 118
[ERROR] :  9   libsystem_pthread.dylib             0x33f31b90 thread_start + 8
[ERROR] :  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary close]: unrecognized selector sent to instance 0x14ebef40'
[ERROR] :  *** First throw call stack:
[ERROR] :  (0x26068c1f 0x33870c8b 0x2606e039 0x2606bf57 0x25f9ddf8 0x22316b 0x26d77b5b 0x33f33e93 0x33f33e07 0x33f31b90)
*Steps to reproduce issue*: 1. Create a project with the attached files 2. Launch the app on an iOS device and click 'play' 3. Notice that the app crashes, occasionally with the above error *Expected results*: The local file is played properly or no crash is witnessed if the file/method is unsupported. *Notes*: snippet for reference:
var audioPlayer = Ti.Media.createAudioPlayer({
	url : 'toddle.mp3'
});
var but = Ti.UI.createButton({
	title : 'Play',
	top : 20,
});
but.addEventListener('click', function(e) {
	audioPlayer.start();
	alert(" Playing !!");
});

Attachments

FileDateSize
audioPlayerTest.zip2014-11-10T22:02:22.000+0000691891

Comments

  1. Chee Kiat Ng 2014-11-24

    Added support for local audio file playback. PR Here: https://github.com/appcelerator/titanium_mobile/pull/6378
  2. Vishal Duggal 2014-11-24

    Backport to 3_5_X https://github.com/appcelerator/titanium_mobile/pull/6389
  3. Khushbu Agrawal 2014-11-26

    The local file is played properly without any crash. Tested on the below Environment: 1. Mac OSX Yosemite 10.10 2. Appcelerator Studio, build: 3.4.1.201410281743 3. Titanium SDK, build: 3.5.0.v20141125154115 4. Titanium CLI, build: 3.4.1 5. Alloy: 1.5.1 6. Xcode 6.1 7. iOS SDK 8.1 8. iPhone 5s with iOS 8.1

JSON Source