Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5747] Kitchensink: Non-reproducible crash with Phone > Sound > Local with File URL

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-05-01T20:41:36.000+0000
Affected Version/sRelease 1.7.3
Fix Version/sn/a
ComponentsiOS
Labelskitchensink
ReporterEric Merriman
AssigneeIngo Muschenetz
Created2011-10-13T10:11:15.000+0000
Updated2017-05-02T20:54:04.000+0000

Description

Description: While testing Kitchensink, Phone > Sound > Local with File URL, I experienced a crash. Please see attached symbolicated log. I attempted to reproduce on the device as well as with another iPhone 4 running 4.3.5 with 1.7.2-built KS. I could not reproduce. Here is the console output to supplement the attached log. Oct 13 10:17:49 unknown KitchenSink[383] : *** Assertion failure in -[TiMediaAudioSession stopAudioSession], /Users/eric/Documents/fromGit/titanium_mobile/demos/KitchenSink/build/iphone/Classes/TiMediaAudioSession.m:305 Oct 13 10:17:49 unknown KitchenSink[383] : *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'stopAudioSession called too many times' *** First throw call stack: (0x30bbb8bf 0x37d601e5 0x30bbb7b9 0x37c263b3 0xff8c3 0xa3635 0x3191804f 0x30b1a22b 0x37c61757 0x30b8fb03 0x30b8f2cf 0x30b8e075 0x30b114dd 0x30b113a5 0x3373ffed 0x32b83743 0x4c33 0x3d24) Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : [ERROR] The application has crashed with an unhandled exception. Stack trace: Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 0 CoreFoundation 0x30bbb8bf __exceptionPreprocess + 162 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 1 libobjc.A.dylib 0x37d601e5 objc_exception_throw + 32 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 2 CoreFoundation 0x30bbb7b9 +[NSException raise:format:] + 0 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 3 Foundation 0x37c263b3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 90 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 4 KitchenSink 0x000ff8c3 KitchenSink + 1042627 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 5 KitchenSink 0x000a3635 KitchenSink + 665141 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 6 AVFoundation 0x3191804f -[AVAudioPlayer(AVAudioPlayerPriv) finishedPlaying] + 190 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 7 CoreFoundation 0x30b1a22b -[NSObject performSelector:withObject:] + 42 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 8 Foundation 0x37c61757 __NSThreadPerformPerform + 350 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 9 CoreFoundation 0x30b8fb03 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 10 CoreFoundation 0x30b8f2cf __CFRunLoopDoSources0 + 214 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 11 CoreFoundation 0x30b8e075 __CFRunLoopRun + 652 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 12 CoreFoundation 0x30b114dd CFRunLoopRunSpecific + 300 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 13 CoreFoundation 0x30b113a5 CFRunLoopRunInMode + 104 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 14 GraphicsServices 0x3373ffed GSEventRunModal + 156 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 15 UIKit 0x32b83743 UIApplicationMain + 1090 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 16 KitchenSink 0x00004c33 KitchenSink + 15411 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : 17 KitchenSink 0x00003d24 KitchenSink + 11556 Oct 13 10:17:49 unknown UIKitApplication:com.appcelerator.pushtest[0x7029][383] : terminate called throwing an exception Oct 13 10:17:50 unknown ReportCrash[409] : Formulating crash report for process KitchenSink[383] Oct 13 10:17:50 unknown com.apple.launchd[1] : (UIKitApplication:com.appcelerator.pushtest[0x7029]) Job appears to have crashed: Abort trap: 6 Oct 13 10:17:50 unknown SpringBoard[17] : Application 'KitchenSink' exited abnormally with signal 6: Abort trap: 6 Oct 13 10:17:50 unknown com.apple.locationd[28] : NOTICE,Location icon should now not be visible Oct 13 10:17:50 unknown ReportCrash[409] : Saved crashreport to /var/mobile/Library/Logs/CrashReporter/KitchenSink_2011-10-13-101749_openDoc.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0 Steps to Reproduce: Note: These steps are the steps I followed. I could not repro with these steps. 1) Install KS built with SDK 1.7.3.v20111013094213 2) Begin on the Phone tab and run through each test 3) In the sound list, the crash occurred on Phone > Sound > Local with File URL Result: Console output and crash log created Expected Result: No crash, tests continue

Attachments

FileDateSize
KitchenSink_2011-10-13-101749_openDoc.crash2011-10-13T10:11:15.000+000035487

Comments

  1. Natalie Huynh 2011-10-13

    Do not crash, but the application is no longer usable: 1. KS > Phone > Sound > Local 2. Press stop continuously and view the logs Eventually will get: Oct 13 11:47:43 unknown KitchenSink[659] : *** Assertion failure in -[TiMediaAudioSession stopAudioSession], /Volumes/Data/Titanium/titanium_mobile/demos/KitchenSink/build/iphone/Classes/TiMediaAudioSession.m:305 Oct 13 11:47:43 unknown UIKitApplication:com.appcelerator.titanium[0xb1c4][659] : [WARN] Exception in event callback. { Oct 13 11:47:43 unknown UIKitApplication:com.appcelerator.titanium[0xb1c4][659] : line = 6; Oct 13 11:47:43 unknown UIKitApplication:com.appcelerator.titanium[0xb1c4][659] : message = "stopAudioSession called too many times"; Oct 13 11:47:43 unknown UIKitApplication:com.appcelerator.titanium[0xb1c4][659] : sourceId = 89040720; Oct 13 11:47:43 unknown UIKitApplication:com.appcelerator.titanium[0xb1c4][659] : sourceURL = "file://localhost/var/mobile/Applications/E8351EE2-A145-4DC1-96C8-A9D75F7637CB/KitchenSink.app/examples/sound_local.js"; Oct 13 11:47:43 unknown UIKitApplication:com.appcelerator.titanium[0xb1c4][659] : } Oct 13 11:47:44 unknown KitchenSink[659] : *** -[NSLock lock]: deadlock ( '(null)') Oct 13 11:47:44 unknown KitchenSink[659] : *** Break on _NSLockError() to debug. Oct 13 11:48:51 unknown kernel[0] : en0: BSSID changed to c0:62:6b:67:1f:e2 iPod 4 (5.0) SDK 1.7.3.v20111013094213
  2. Blain Hamon 2011-10-13

    The code in question is due to an NSAssert in TiMediaAudioSession.m:303. The good news is that this will NOT affect release as this is #ifdefed to assert only during debug. Having said that, this sounds like a possible confluence of a sound stopping and being garbage collected at the same time. The full solution is to ensure more linearity (IE, synchronous blocks) in the code. But for now, we can demote the NSAssert to a very stern warning.
  3. Reggie Seagraves 2011-10-13

    I have already reworked some of the sound engine for 1.8 and it's probable that this doesn't occur on master.
  4. Lee Morris 2017-05-01

    Resolving ticket as invalid as this version of Kitchen Sink is no longer supported.

JSON Source