Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3055] iOS app crashes when video is finished if playbackState listener is attached

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T02:00:47.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsiOS
Labelscrash, ios, klist, movieplayer, playback
ReporterPedro Enrique
AssigneeRalf Pfeiffer
Created2011-04-15T03:35:40.000+0000
Updated2011-04-17T02:00:47.000+0000

Description

Please use the code provided on HD ticket:
http://developer.appcelerator.com/helpdesk/view/70041#c335911">http://developer.appcelerator.com/helpdesk/view/70041#c335911

If the following lines are removed, not a problem, but with them on it, the app will crash after the movie is over

activeMovie.addEventListener('playbackState',function(e){
    Ti.API.info('Event PlaybackState Fired: '+e.playbackState);
    Ti.API.info('activeMovie.endPlaybackTime: '+activeMovie.endPlaybackTime);
    Ti.API.info('activeMovie.playableDuration: '+activeMovie.playableDuration);
});

Tested on iPhone Simulator 4.2
Ti SDK 1.6 (Feb 3 2011 22:28 r0f017b3a)

Comments

  1. Rick Blalock 2011-04-15

    One of our customers is having this issue as well.

    Here's the stack trace - http://pastie.org/1674175">http://pastie.org/1674175

    Here's the same issue reported on the Q/A forum - http://developer.appcelerator.com/question/97821/app-crashes-on-playbackstate-of-videoplayer"> http://developer.appcelerator.com/question/97821/app-crashes-on-pla...

  2. Kael 2011-04-15

    Here a temporary fix that i use:

    // In TiMediaVideoPlayerProxy.m -(NSNumber*)playbackState {

       ONLY_IN_3_2_OR_GREATER(playbackState)
       
       return NUMINT([[self player] playbackState]);
       

    }

    Now, please, can you fix this bug https://appcelerator.lighthouseapp.com/projects/32238/tickets/971-iphone-close-video-player-and-get-black-screen#ticket-971-12"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/971-i... .

    Please, It is a very serious bug. Each Titanium mobile applications using video (including KS) have this bug! Please..

    Should I open a new ticket?

  3. Reggie Seagraves 2011-04-15

    Stephen, this has become a high priority item for one of our customers. Assigning to you for immediate evaluation and resolution.

  4. Jeff Haynie 2011-04-15

    (from [11e3429788e154201dca79475f4466fce59d8a0d]) [#3055 state:fixed-in-qa] Actually return a value when movie==nil for playbackState. https://github.com/appcelerator/titanium_mobile/commit/11e3429788e154201dca79475f4466fce59d8a0d"> https://github.com/appcelerator/titanium_mobile/commit/11e3429788e1...

  5. Stephen Tramer 2011-04-15

    TESTING

    KS->Phone->Play Movie->Local has been updated to include a 'playbackState' listener. If it fires when the movie is complete, and doesn't cause a crash, this bug is fixed.

  6. Natalie Huynh 2011-04-15

    Tested with Titanium SDK version: 1.7.0 (03/18/11 12:00 19be393) on
    iPad2 4.3
    Emulator 4.0
    Nexus S 2.3.3

JSON Source