Crashes after playing movie

Discussion in 'iOS Development' started by startrees, Jul 20, 2010.

  1. startrees

    startrees Member

    Joined:
    Nov 29, 2008
    Messages:
    223
    Likes Received:
    0
    Device:
    iPad 2 (White)
    I implemented a movie to my app but when the movie is finished the app just crashes... here is my code:
    i run it when someone press a certain button but why would it crash... I tried it in the viewDidLoad and it also crashed it please help thanks!
  2. Freerunnering

    Freerunnering Member

    Joined:
    Sep 1, 2009
    Messages:
    296
    Likes Received:
    0
    Device:
    4G iPod touch
    Code:
    movieFinishedCallbackname:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
    Your app crashes when the movie is finished?
    So that bit of code sends out a notification when the movie is finished?

    What does that do when it hears that the movie is finished?
  3. lauNchD

    lauNchD Well-Known Member

    Joined:
    Jan 27, 2008
    Messages:
    1,844
    Likes Received:
    261
    Device:
    iPhone 5 (Black)
    The NSNotificationCenter will try to call back to your object by sending it the message movieFinishedCallback. If you don't implement that method, an exception will be thrown, which makes your app crash.

    Do you have something like this implemented?
    [OBJC]- (void) movieFinishedCallback/*

    Please Register or Log in to view images

    NSNotification*)notification*/
    {
    // do something
    }[/OBJC]

    If you don't need to know when your movie finishes playing, then you can also just remove the line subscribing your object to the notification.
  4. Mark Wough

    Mark Wough Banned

    Joined:
    Jul 22, 2010
    Messages:
    5
    Likes Received:
    0
    If you are playing the Sims 2 Pets on Vista you need a graphics card that is the equivalent of ATI Radeon(TM) series 9600 or greater.
    Check your graphics. If you have integrated graphics, that is probably the source of the error. You neede a good dedicated card to play Pets on Vista.
    To the first answerer, the Sims 2 works fine on Vista. It's just that people don't check the requirements. You need a supported card and a decent amount of RAM for starters.

Share This Page