Loading...

cocos2d-iphone-issues@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Issue 859 in cocos2d-iphone: Cocos Denshion crashes app when unloading effects cocos2d-iphone Thu May 06 14:01:19 2010

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 859 by SweKenchu: Cocos Denshion crashes app when unloading effects
http://code.google.com/p/cocos2d-iphone/issues/detail?id=859

What steps will reproduce the problem?
1.
Unload a lot of preloaded effects using -(void) unloadEffect:(NSString*)
filePath


Load a lot of wav's into memory using -(void) preloadEffect:(NSString*)
filePath

2. Do both these things for a while.
3. Eventually, you will get
Program received signal:  “EXC_BAD_ACCESS”.

Because soundId will not be valid in the unloadEffect method. It will
already have been released.

What is the expected output? What do you see instead?
App shouldn't crash.

What cocos2d version / SVN revision are you using ?
cocos2d-iphone-0.99.2

What iPhoneSDK are you using ?
2.2.1


Debug or Release ?
Debug

Does this happens on device ? or on the simulator ? or on both ?
Mostly device

Please provide any additional information below.
I suggest you switch places with:

        [loadedEffects removeObjectForKey:filePath];
        [soundEngine unloadBuffer:[soundId intValue]];

So the soundId isn't released until after.

--
You received this message because you are subscribed to the Google Groups 
"cocos2d-iphone-issues" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cocos2d-iphone-issues?hl=en.