playtomic/gameapi-ios — Issue #3: EXC_BAD_ACCESS in PlaytomicLogRequest
Author: andeplane
Created: 2012-02-18 17:45:39+00:00
State: open

I just started using Playtomic with my cocos2d game. In the init of my main scene, I do as described

[[Playtomic alloc] initWithGameId:gameid andGUID:@"guid" andAPIKey: @"apikey"];
[[Playtomic Log] view];

On my play-button action, I call [[Playtomic Log] play];

After I do this, I get EXC_BAD_ACCESS every time, and I found the problem to be if the first LogRequest fails, it is put into the queue and executed after the second request completes.

So in the PlaytomicLogRequest.m-> requestFinished: method, you create another request

PlaytomicLogRequest* request = [[[PlaytomicLogRequest alloc] initWithTrackUrl:trackUrl] autorelease];

This request should not be autoreleased since it will release itself on finish.