On Jun 6, 2005, at 1:21 PM, Bob Ippolito wrote: > > On Jun 6, 2005, at 11:40 AM, Jared Barden wrote: > > > >> I'm developing a Cocoa-Python application that uses a NSMovieView to >> play audio files. However, every time I do self.myView.setMovie_ >> (theMovie), the NSMovieView will appear in my window, and the program >> will crash almost instantaneously with a signal 10 (sigbus) error. >> >> > > Put together a minimal example demonstrating the behavior and I'll > look at it. Chances are, there's something else wrong. >
My guess was right, something else is wrong. You're initializing an NSMovieView with a Carbon.Qt movie. That's very dangerous, when the Carbon.Qt movie gets deallocated, it destroys it, and the NSMovieView will be very unhappy about that. The general rule is to avoid Carbon.* or anything that depends on it unless you absolutely positively have to, and you know what you're doing. Basically, Don't do that. Don't use EasyDialogs either. To allow the user to select a file, use NSOpenPanel. To initialize a movie, use NSMovie's initWithURL:byReference:. With those two changes, the app should be less code (well, maybe about the same, depending on how you write it), will behave more natively, and it won't crash. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig