Note that there are some explanatory texts on larger screens.

plurals
  1. POUIAlertView Dialog results EXC_BAD_ACCESS
    primarykey
    data
    text
    <p>I am trying to have an UIAlertView with two options like "YES" and "NO" in my XML parsing class. After I click one of the option I just get an EXC_BAD_ACCESS error. Here is my code:</p> <p>.m file:</p> <pre><code> -(void)doneParsing { UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"My Alert" message:@"Do you want to continue?" delegate:self cancelButtonTitle:nil otherButtonTitles:@"No", @"Yes", nil]; [myAlert show]; } -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { NSLog(@"user pressed Button Indexed 0"); // Any action can be performed here } else { NSLog(@"user pressed Button Indexed 1"); // Any action can be performed here } } </code></pre> <p>.h file</p> <pre><code>@interface ArsivNoCheck : UIViewController &lt;UIAlertViewDelegate&gt; </code></pre> <p>stack trace:</p> <pre><code>Stack trace : ( 0 TPAO Arastirma 0x0006de86 -[ArsivNoCheck doneParsing] + 486 1 libobjc.A.dylib 0x014ae6b0 -[NSObject performSelector:withObject:] + 70 2 Foundation 0x00eda765 __NSThreadPerformPerform + 327 3 CoreFoundation 0x01f3bf3f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 4 CoreFoundation 0x01f3b96f __CFRunLoopDoSources0 + 239 5 CoreFoundation 0x01f5e734 __CFRunLoopRun + 964 6 CoreFoundation 0x01f5df44 CFRunLoopRunSpecific + 276 7 CoreFoundation 0x01f5de1b CFRunLoopRunInMode + 123 8 GraphicsServices 0x021f07e3 GSEventRunModal + 88 9 GraphicsServices 0x021f0668 GSEventRun + 104 10 UIKit 0x003deffc UIApplicationMain + 1211 11 TPAO Arastirma 0x0000244d main + 141 12 TPAO Arastirma 0x00002375 start + 53 ) </code></pre> <p>bt result</p> <pre><code>* thread #1: tid = 0x1f03, 0x014ac09b libobjc.A.dylib`objc_msgSend + 15, stop reason = EXC_BAD_ACCESS (code=1, address=0xe13e9e76) frame #0: 0x014ac09b libobjc.A.dylib`objc_msgSend + 15 frame #1: 0x007d20bc UIKit`-[UIAlertView(Private) _buttonClicked:] + 294 frame #2: 0x014ae705 libobjc.A.dylib`-[NSObject performSelector:withObject:withObject:] + 77 frame #3: 0x003e22c0 UIKit`-[UIApplication sendAction:to:from:forEvent:] + 96 frame #4: 0x003e2258 UIKit`-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61 frame #5: 0x004a3021 UIKit`-[UIControl sendAction:to:forEvent:] + 66 frame #6: 0x004a357f UIKit`-[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578 frame #7: 0x004a26e8 UIKit`-[UIControl touchesEnded:withEvent:] + 546 frame #8: 0x00411cef UIKit`-[UIWindow _sendTouchesForEvent:] + 846 frame #9: 0x00411f02 UIKit`-[UIWindow sendEvent:] + 273 frame #10: 0x003efd4a UIKit`-[UIApplication sendEvent:] + 436 frame #11: 0x003e1698 UIKit`_UIApplicationHandleEvent + 9874 frame #12: 0x021f1df9 GraphicsServices`_PurpleEventCallback + 339 frame #13: 0x021f1ad0 GraphicsServices`PurpleEventCallback + 46 frame #14: 0x01f2dbf5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 frame #15: 0x01f2d962 CoreFoundation`__CFRunLoopDoSource1 + 146 frame #16: 0x01f5ebb6 CoreFoundation`__CFRunLoopRun + 2118 frame #17: 0x01f5df44 CoreFoundation`CFRunLoopRunSpecific + 276 frame #18: 0x01f5de1b CoreFoundation`CFRunLoopRunInMode + 123 frame #19: 0x021f07e3 GraphicsServices`GSEventRunModal + 88 frame #20: 0x021f0668 GraphicsServices`GSEventRun + 104 frame #21: 0x003deffc UIKit`UIApplicationMain + 1211 frame #22: 0x0000204d TPAO Arastirma`main(argc=1, argv=0xbffff394) + 141 at main.m:16 frame #23: 0x00001f75 TPAO Arastirma`start + 53 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload