[TIMOB-3055] iOS app crashes when video is finished if playbackState listener is attached
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.7.0, Sprint 2011-11 |
Components | iOS |
Labels | crash, ios, klist, movieplayer, playback |
Reporter | Pedro Enrique |
Assignee | Ralf Pfeiffer |
Created | 2011-04-15T03:35:40.000+0000 |
Updated | 2011-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)
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...
Here a temporary fix that i use:
// In TiMediaVideoPlayerProxy.m -(NSNumber*)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?
Stephen, this has become a high priority item for one of our customers. Assigning to you for immediate evaluation and resolution.
(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...
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.
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