• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]


  • Subject: Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]
  • From: Steve Christensen <email@hidden>
  • Date: Sun, 13 Mar 2011 15:14:53 -0700

On Mar 13, 2011, at 11:05 AM, Matt Neuburg wrote:

> On Tue, 08 Mar 2011 17:01:33 -0800, Steve Christensen <email@hidden> said:
>> The setup has a MPMoviePlayerController instance that is playing a local audio file. There is also a UIWebView whose HTML contains an <audio> tag. When the play control is tapped, I see a MPMoviePlayerPlaybackDidFinishNotification notification with a reason of MPMovieFinishReasonPlaybackEnded, then gdb shows the assertion failure and exception and dumps the backtrace (below).
>
> What was the outcome on this? Thx - m.

Well, I'm still not sure of the exact "why" for the assertion, but I figured out what I was doing that it didn't like.

My MPMoviePlayerPlaybackDidFinishNotification handler is designed to queue up another audio file to play after the current one finishes. I NSLog'd the player initialization and all the notification handlers so I could watch the process more in realtime, and found that the next audio file was loaded and then very soon after got a MPMoviePlayerPlaybackDidFinishNotification. A bit after that is when the assertion failure and exception come along.

After playing with it for a bit, I found that the player's loadState property is set to (MPMovieLoadStatePlayable | MPMovieLoadStatePlaythroughOK) when playback finishes normally or MPMovieLoadStateUnknown when it's stopped because another player instance has grabbed control. I've added a test that prevents the queueing if the loadState is MPMovieLoadStateUnknown and that seems to work just fine.

I may have missed something in the docs that talks about this situation, but it's also probably true that I'm not using the player class in the most "standard" manner.

steve

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:] (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Animating window content border
  • Next by Date: SDK 10.6 with Target 10.5
  • Previous by thread: Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]
  • Next by thread: Re: Assertion failure in -[MPMoviePlayerControllerNew _moviePlayerDidBecomeActiveNotification:]
  • Index(es):
    • Date
    • Thread