Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26299] iOS: Ti.Media.AudioPlayer test-suite crashes in some situations

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-08-24T17:21:08.000+0000
Affected Version/sRelease 7.4.0, Release 7.3.0
Fix Version/sRelease 7.5.0
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeVijay Singh
Created2018-08-14T11:17:49.000+0000
Updated2018-10-05T13:08:46.000+0000

Description

It seems like our Ti.Media.AudioPlayer test-suite crashes in some situations. The crash report is attached and looks like being an issue with the KVO-observer we use to handle the AVPlayer API. I remember we had some issue with closing the audio-player and still listening to the KVO, so this may be similar.

Attachments

FileDateSize
mocha_2018-08-13-161358_morimoto-macos.crash2018-08-16T09:27:42.000+0000162490
mocha_2018-08-13-163538_ginsu-macos06.crash2018-08-14T11:18:15.000+0000162491

Comments

  1. Vijay Singh 2018-08-16

    While running the test case some times I am finding following crash -
       [ERROR] The application has crashed with an uncaught exception 'NSInternalInconsistencyException'.
       [ERROR] Reason:
       [ERROR] stopAudioSession called too many times
       [ERROR] Stack trace:
       [ERROR] 0   CoreFoundation                      0x0000000106f0673b __exceptionPreprocess + 331
       [ERROR] 1   libobjc.A.dylib                     0x0000000105d47735 objc_exception_throw + 48
       [ERROR] 2   CoreFoundation                      0x0000000106f064c2 +[NSException raise:format:arguments:] + 98
       [ERROR] 3   Foundation                          0x00000001029cf1bf -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
       [ERROR] 4   mocha                               0x000000010026c773 -[TiMediaAudioSession stopAudioSession] + 339
       [ERROR] 5   mocha                               0x00000001001aef73 -[TiMediaAudioPlayerProxy stop:] + 515
       [ERROR] 6   mocha                               0x00000001001ac3b4 -[TiMediaAudioPlayerProxy _destroy] + 84
       [ERROR] 7   mocha                               0x000000010019b5d9 -[TiProxy dealloc] + 105
       [ERROR] 8   libobjc.A.dylib                     0x0000000105d59dcc _ZN11objc_object17sidetable_releaseEb + 202
       [ERROR] 9   mocha                               0x00000001000d79fa -[KrollObject dealloc] + 138
       [ERROR] 10  libobjc.A.dylib                     0x0000000105d59dcc _ZN11objc_object17sidetable_releaseEb + 202
       [ERROR] 11  mocha                               0x00000001000d5d52 KrollFinalizer + 450
       [ERROR] 12  JavaScriptCore                      0x000000010080bc3e _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE7destroyEPNS_6JSCellE + 110
       [ERROR] 13  JavaScriptCore                      0x0000000100f871cf _ZN3JSC11MarkedBlock6Handle16specializedSweepILb1ELNS1_9EmptyModeE1ELNS1_9SweepModeE0ELNS1_20SweepDestructionModeE1ELNS1_12ScribbleModeE0ELNS1_18NewlyAllocatedModeE1ELNS1_9MarksModeE1ENS_31JSDestructibleObjectDestroyFuncEEEvPNS_8FreeListES3_S4_S5_S6_S7_S8_RKT6_ + 175
       
    which shows the problem is with Ti.Media.AudioPlayer not with Ti.Media.VideoPlayer.
  2. Hans Knöchel 2018-08-16

    Thanks [~vijaysingh], I updated the ticket to reflect that! TIMOB-26302 may also be related then. I was curious anyway, why the video-player changes would begin to crash again months after running successfully. *EDIT*: I think we may have two different kind of crashes: - One for stopping the audio player (see above) - One for not properly cleaned up observers (see crash-logs moved over from TIMOB-26302) *EDIT 2*: It looks like we are using stopAudioSession too many times.
  3. Vijay Singh 2018-08-17

    PR - https://github.com/appcelerator/titanium_mobile/pull/10260
  4. Samir Mohammed 2018-10-05

    *Closing ticket* Ti.Media.AudioPlayer test-suite no longer showing any crashes.

JSON Source