Re: crash in using soundNamed:
Re: crash in using soundNamed:
- Subject: Re: crash in using soundNamed:
- From: Mitchell Livingston <email@hidden>
- Date: Wed, 24 Oct 2007 11:51:53 -0700
That's what I thought, but is there any way to check if the sound is valid without it crashing?
-Mitch
On Wednesday, October 24, 2007, at 01:48PM, "Michael Babin" <email@hidden> wrote:
>
>On Oct 24, 2007, at 12:07 PM, Mitchell Livingston wrote:
>
>> Some users are reporting crashes when using this with custom sounds
>> in one of the directories.
>>
>> I'm a bit confused on how this could crash in soundNamed. A crash
>> log is:
>>
>> Thread 0 Crashed:
>> 0 com.apple.AppKit 0x93436ae4 -[NSSound _postInitialization] + 749
>> 1 com.apple.AppKit 0x9369d868 -[NSSound
>> initWithContentsOfURL:byReference:] + 256
>> 2 com.apple.AppKit 0x9369e7a3 +[NSSound _searchForSoundNamed:] + 626
>> 3 com.apple.AppKit 0x9369e8a5 +[NSSound soundNamed:] + 203
>> 4 org.m0k.transmission 0x00010829 -[PrefsController sounds] + 339
>[snip]
>
>A quick read of the documentation for +[NSSound soundNamed:] show
>that it returns an NSSound object with name, creating it if the sound
>is not already "known" and can be found. The docs detail the method
>it uses to search for the sound. That and the backtrace you included
>would indicate that the sound you're attempting to access is not
>known, with the crash occurring when loading the sound data from the
>file. Perhaps there is something about the data in the sound file
>that NSSound doesn't like?
>
>- Mike
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden