NSSound-related crash on quit
NSSound-related crash on quit
- Subject: NSSound-related crash on quit
- From: Fred Hope <email@hidden>
- Date: Wed, 29 Dec 2004 14:14:16 -0800
Hi all,
I'm writing a little text-adventure game in Cocoa. Everything's going
fine, except for the playing of sounds. I included the files in my
app's Resources folder, and use this code to create and play the sound:
NSSound *mySound = [[NSSound alloc] initWithContentsOfFile:[[NSBundle
mainBundle] pathForSoundResource:@"MySound.aiff"] byReference:YES];
[mySound play];
It finds the sound and plays correctly. However, my app then crashes
upon quit. I've tried all sorts of different combinations of things
such as where mySound is declared, where mySound is alloc'ed and
initialized, and whether [mySound release] or [mySound autorelease] is
called (and where it is called). I've also tried using mySound =
[NSSound soundNamed:@"MySound.aiff"] instead of the above code, but no
matter what I do, the app still crashes.
I made a thread asking for help in some forums that I visit, and
several open-source devs tried to help me, but we couldn't figure out
the problem. Check out that thread (
http://forums.cocoaforge.com/viewtopic.php?t=350 ) for more info,
including the first bit of the app's crashlog.
If anyone can help, I would greatly appreciate it.
note: I'm not subscribed to the cocoa-dev mailing list, so please cc
fredhope2000 (at) cox.net if you have any information for me.
Thanks,
Fred Hope
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden