0

Possible Duplicate:
How do I set up NSZombieEnabled in Xcode 4?

I am debugging an application and it throws an exec-bad-access error when performing a certain navigation function but only when i run it on a device.

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0xf0000008
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib                 0x3421bf78 objc_msgSend + 16
1   UIKit                           0x31d9a28c -[UIWebView    webView:decidePolicyForNavigationAction:request:frame:decisionListener:] + 68
2   CoreFoundation                  0x321ce7dc __invoking___ + 60
3   CoreFoundation                  0x321297aa -[NSInvocation invoke] + 154
4   CoreFoundation                  0x321293c8 -[NSInvocation invokeWithTarget:] + 44
5   WebKit                          0x365f6e06 -[_WebSafeForwarder forwardInvocation:] + 246
6   CoreFoundation                  0x321cda7c ___forwarding___ + 660
7   CoreFoundation                  0x32128648 _CF_forwarding_prep_0 + 40
8   CoreFoundation                  0x321ce7dc __invoking___ + 60
9   CoreFoundation                  0x321297aa -[NSInvocation invoke] + 154
10  WebCore                         0x358fa1ee _ZL11SendMessageP12NSInvocation + 18
11  WebCore                         0x3590d6ea _ZL20HandleDelegateSourcePv + 74
12  CoreFoundation                  0x3219facc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
13  CoreFoundation                  0x3219f298 __CFRunLoopDoSources0 + 208
14  CoreFoundation                  0x3219e03e __CFRunLoopRun + 646
15  CoreFoundation                  0x3212149e CFRunLoopRunSpecific + 294
16  CoreFoundation                  0x32121366 CFRunLoopRunInMode + 98
17  GraphicsServices                0x31278432 GSEventRunModal + 130
18  UIKit                           0x31c20cce UIApplicationMain + 1074
19  Parliament                      0x0007396a main (main.m:14)
20  Parliament                      0x00073928 start + 32

This is the error log. Would anyone know why this is or how i could debug errors such as this since running thruogh an instrument doesnt hep

Community
  • 1
  • 1
CodeGeek123
  • 4,341
  • 8
  • 50
  • 79
  • What do you do with your app when it crashes? –  Sep 04 '12 at 17:25
  • Are you using different build settings when running on device? – Pedro Mancheno Sep 04 '12 at 17:30
  • My first guess would be that you have a web-related delegate that was improperly retained and went "poof". – Hot Licks Sep 04 '12 at 17:33
  • Have you run the profiler yet? Also, these general tips may help: http://stackoverflow.com/questions/327082/exc-bad-access-signal-received – Brian Sep 04 '12 at 18:55
  • Well basically im going into a webview and then without navigating back i press a button on the tab bar which shows me a row of things of which when i click it goes into a webview. now when i press one of the tab bar buttons it works for like 2 seconds and crashes – CodeGeek123 Sep 05 '12 at 06:26

1 Answers1

1

You possibly have released an object and subsequently try to access that object in your webView:decidePolicyForNavigationAction delegate method.

Enable "Zombie" detection in your debug build settings: How do I set up NSZombieEnabled in Xcode 4?

This will help you identify if an object is not being properly retained.

Community
  • 1
  • 1
CSmith
  • 13,318
  • 3
  • 39
  • 42