xCode for iPhone EXC_BAD_ACCESS error only occurs when stepping through the debugger? -


I am working on a project in the xcode for iPhone where I am getting an EXC_BAD_ACCESS error, but I only I get the error when I try to debug a step through a function, when I take my breakpoint from the function, but still run the project in debug mode, I do not find this error. The solution to this problem or to find out what caused the EXC_BAD_ACCESS error is there anyway

The error comes on line:. (Behavior in BEUCharacterAIBehavior * behavior_.behaviors) for

However, when moving forward through value behavior. Behaviors are allocated and retained. . NSZombiesEnabled has been set, but still get cryptic error message

code:

  - (BEUCharacterAIBehavior *) getHighestValueBehaviorFromBehavior: (BEUCharacterAIBehavior *) behavior_ {// behavior If the leaf is stopped stopping because there are no sub behavior if ([behavior_ isLeaf]) return behavior_; // temp variable for highest value behavior so far BEUCharacterAIBehavior * highest = zero; //NSLog(@"BEHAVIORS:%@".behavior_.behaviors); (Behavior in BEUCharacterAbihavior / behavior_.behaviours) {// If there is a highest value behavior then the highest value is a larger value than the new value of behavior, if (top) {if (highest.lastValue> behavior.value) continues ; } // If there is no current behavior, then the highest behavioral examination was being done now because we have (nothing more to investigate against the Supreme!); // Be sure that the current behavior is not the same behavior as each other if (current carrier! = Behavior) {// In the new practice parents can run multiple times in a row if (! Behavior.parent.canRunMultipleTimesInarow) { // Make sure current and new behavior parents are not the same if they continue for the next practice (current Behavior.parent! = Behavior.parent) {continue; }} Supreme = behavior; // If current behavior and new behaviors are the same, make sure they can run multiple times) and if (current.}} // NSLog (@ "The person getting the highest value from the party:% D", the highest. if (supreme) return null; return [self find Hanghॅstvevluvijnfrabravier supreme]; // supreme; [BEUCharacterAI getHighestValueBehaviorFromBehavior -  

}

error ads

in object_getClass 0 0x02aebdcb 1 0x00002ac0
In 0x00014bb9 in
:] BEUCharacterA Im at the 115
3 0x00014b6b - on BEUCharacterAI.m [BEUCharacterAI getHighestValueBehavior]: 103
4 in 0x00014904 - [BEUCharacterAI Update:] on BEUCharacterAI.m: 68
5 in 0x00008 9 75 - [BEUCharacter phase BEUCharacter.m:]: 22 9
6 in 0x00022aeb - Skimoccrctor. M: [Eskimo Checr phase]: 28
7 0x0000ed2b - [BEUObjectController phase BEUObjectController.m:]: 381
8 in 0x00003651 - [BEUGame step:] on BEUGame.m: 63
9 in 0x0007cc42 - [CCTimer fire] on CCScheduler.m: 87
10 in 0x0007d846 - [CCScheduler tick :] on CCScheduler.m: 212
11 in 0x000500b3 - [CCDirector mainLoop] on Sisisisiseedimm: 208
12 in 0x000532b3 - [CCDisplayLinkDirector preMainLoop:] on CCDirector.m: 1055
13 0x00796f06 CA :: Display :: DisplayLink :: Send
14 0x0079704b in C: Display :: EmulatorDisplay Link :: Callback
CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_OUT_TO_A_TIMER_CALLBACK_FUNCTION
__CFRunLoopDoTimer 16 0x02982734
__CFRunLoopRun in 17 0x028df689
CFRunLoopRunSpecific in 18 0x028dec00
19 0x028deb21 CFRunLoopRunInMode
20 0x03e96378 in GSEventRunModal in U.A.PplicationMain at main.m
23 0x00002b50 in main GSEventRun
22 0x0083bf89 21 0x03e9643d
: 13

Let me give this Xcode 4.2 Was with .1 and lldb. Switching to GDB solved the problem.


Comments