|
Hey Lockergnome, Right now I've got a really confusing bug in my iOS game. When the user has made a move this selector is called. The weird thing about it is that I perform this at every move but only once the map is completely finished it crashes. With NSLog I've already seen that it does reach the end of the method called but the point where it want's to return to the previous method is the point where it crashes. The main method which calls the selector on the main thread -(void)hasGotScore:(int)score newWords:(NSMutableArray*)newWords { NSLog(@"score! %i",score); scr = score;
And the end of the processScore
The output log
I have already figured out that the code is trying to access a nil object but there is none that it needs to access. Do any of you know what is going on? Oh and I am also asking this same question on other forums, if a solution is found I'll edit it in. Edit: I have found the solution, not really one that I understand but it works. I had just 4 lines of code that actually needed to be run on the main thread and by moving those into a seperate method and calling that method on the main thread while keeping the rest in the current thread did the fix. I still don't know what was going on but at least it got fixed. |
