Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
2 consequent [QTMovieView setMovie:] calls => crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2 consequent [QTMovieView setMovie:] calls => crash



Hello all.

I am new to this list, so sorry if my question has been already discussed. However, I failed to find an answer with a brief search.

In my project, I have a QTMovieView, and m_movieView is an outlet pointing to it. When I run the following code, my application crashes:

NSError* err = nil;
QTMovie* my_movie = [QTMovie movieWithFile: kPathToMyMovie error: &err];
[m_movieView setMovie: my_movie];
[m_movieView display];
[m_movieView setMovie: nil];
[m_movieView display];

This is the code from a test sample application, where the crash is 100% reproducible. (Mac OS X 10.4.10, QuickTime 7.1.6, iMac Intel Core 2 Duo). If anyone feels interested, I can send the whole project (very small indeed) in a private e-mail.

In real life (with my real project) the code is different of course, but the situation is mostly the same: I set a movie in the view, and if I immediately after that reset it to nil, the application crashes. If there is a delay between these 2 steps (or even if I pass this code step by step in the debugger), no crash happens.

My question is: what am I doing wrong? Why does my app crash here? How can I avoid such crashes?

Best regards,
Sergey Shapovalov.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.