Iphone MPMoviePlayerController问题

Iphone MPMoviePlayerController问题,iphone,objective-c,crash,mpmovieplayercontroller,Iphone,Objective C,Crash,Mpmovieplayercontroller,这就是我尝试使用MPMoviePlayerController所做的: NSString *url = [[NSBundle mainBundle] pathForResource:@"IntroVideo" ofType:@"mp4"]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];

这就是我尝试使用MPMoviePlayerController所做的:

NSString *url = [[NSBundle mainBundle] pathForResource:@"IntroVideo" ofType:@"mp4"];
        MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];

        [[NSNotificationCenter defaultCenter] addObserver:self 
                                                 selector:@selector(moviePlayBackDidFinish:) 
                                                     name:MPMoviePlayerPlaybackDidFinishNotification 
                                                   object:nil];

        moviePlayer.scalingMode=MPMovieScalingModeAspectFill;
        [[moviePlayer view] setBounds:CGRectMake(0, 0, 400, 400)];
        [[moviePlayer view] setCenter:CGPointMake([UIScreen mainScreen].bounds.size.width/2 , [UIScreen mainScreen].bounds.size.height/2 + 10)];
        [[moviePlayer view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)];       
        [self addSubview:moviePlayer.view];
        moviePlayer.controlStyle = MPMovieControlStyleNone;
    [moviePlayer play];
MPMoviePlayerController
在我调用
MPMoviePlayerController
实例上的play后,该控制器将崩溃。下面是崩溃日志

请引导我解决这个问题

-[__NSDictionary0 retain]: message sent to deallocated instance 0x5c1a0e0

#0  0x0137a057 in ___forwarding___ ()
#1  0x01379f22 in __forwarding_prep_0___ ()
#2  0x0135287f in -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] ()
#3  0x01369946 in -[NSDictionary initWithObjectsAndKeys:] ()
#4  0x003877ff in -[MPAVController _itemWillChangeNotification:] ()
#5  0x00dcc6c1 in _nsnote_callback ()
#6  0x013e0f99 in __CFXNotificationPost_old ()
#7  0x0136033a in _CFXNotificationPostNotification ()
#8  0x00dc2266 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#9  0x01de35b2 in -[NSObject(NSObject_AVShared) postNotificationWithDescription:] ()
#10 0x01de7b07 in -[AVController currentItemWillChangeToItem:oldItemCurrentTime:] ()
#11 0x01dea09e in -[AVController avPlaybackQueueCurrentItemChangedNotification:] ()
#12 0x01de83b8 in -[AVController setQueueFeeder:withIndex:] ()
#13 0x003846c5 in -[MPAVController reloadFeederWithStartQueueIndex:] ()
#14 0x0036d318 in -[MPMoviePlayerControllerNew _prepareToPlayWithStartIndex:] ()
#15 0x0036a88f in -[MPMoviePlayerControllerNew prepareToPlay] ()
#16 0x0036a7c5 in -[MPMoviePlayerControllerNew play] ()
#17 0x00dcc6c1 in _nsnote_callback ()
#18 0x013e0f99 in __CFXNotificationPost_old ()
#19 0x0136033a in _CFXNotificationPostNotification ()
#20 0x00dc2266 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#21 0x00dce5a9 in -[NSNotificationCenter postNotificationName:object:] ()
#22 0x003febcf in -[MPMovie _determineMediaType] ()
#23 0x00de17f6 in __NSFireDelayedPerform ()
#24 0x013e9fe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#25 0x013eb594 in __CFRunLoopDoTimer ()
#26 0x01347cc9 in __CFRunLoopRun ()
#27 0x01347240 in CFRunLoopRunSpecific ()
#28 0x01347161 in CFRunLoopRunInMode ()
#29 0x01e4d268 in GSEventRunModal ()
#30 0x01e4d32d in GSEventRun ()
#31 0x0068242e in UIApplicationMain ()
#32 0x000023df in main (argc=1, argv=0xbfffed44) at main.m:14
我将用我的水晶球回答这个问题

缺少的部分是

*** -[NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil value
*** Uncaught exception: <NSInvalidArgumentException> *** -[NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil value
那以后呢

[NSURL fileURLWithPath:moviePath]
记录并检查文件是否确实存在:

NSLog(@"%@", [url absoluteString]);

你能提供一些代码吗?没有它,我们只能在这里尝试我们最好的猜测。请编辑您的问题,没有代码,我们无法帮助您。
NSLog(@"%@", [url absoluteString]);