views:

40

answers:

1

I have a very strange bug in a shipping iPad/iPhone app that I can't fix/track down.

My app plays video in a standard MPMoviePlayerController but with the interface hidden and my own buttons to play and stop.

That works fine but sometimes, after a few times of use, my app refuses to play any further video. This happens only on the iPad (in iOS 3.2.x), on the iPhone (in iOS 4.x) everything works fine all the time. Strangely enough, even after I quit my app, after I start it again it still refuses to play video. It doesn't save the video state, and it does reload the video. Only after I restart the iPad it starts working again.

If my iPad is in a "don't play video" state I can debug my app from Xcode and there isn't anything different other than the fact that the movie doesn't play but stays paused indefinitely.

The loadState property reports as MPMovieLoadStatePlayable, but the playbackState property stays MPMoviePlaybackStatePaused however many times I sent it a "play" command.

There is nothing I can do in my app (like choosing another video) to make the video work again.

The videos are 600 x 400 H.264 and are played in a view that is larger than full screen so I can show them full screen (without black bars) on the iPad without needing two different versions for iphone/ipad, because the devices have different aspect ratios.

There is plenty of RAM available (> 60 MB). Other apps that play video (iTunes/YouTube/streamToMe) play fine, but use the standard MoviePlayer interface/controls and don't of course don't play bigger than full screen.

This all makes me suspect this is an Apple bug. I haven't yet tested this in a beta version of iOS, and if so I couldn't talk about it either.

Anybody seen this behaviour? And has a possible solution? Thanks!

A: 

This is a quite common bug with MPMoviePlayerController on iPad OS 3.2.x

After a few runs of any app, the movies fail to play and if you move the scrubber you can see the frames but you can't still play the video for more than one frame at a time!

Besides you may notice a great memory consumption, due to the fact that some apps start receiving memory warnings more often than normal.

Finally you may prove this is a system problem (and not specifically an app problem) buy trying to run other apps that use the same framework, e.g. "ABC News". The issues cannot be seen with other apps that use UIWebView for instance (e.g. the ones based on You Tube videos).

The only solution is to re-boot the device. This works until next reboot.

Carlo

viggio24