UIWebView EXC_BAD_ACCESS crash

Discussion in 'iOS Programming' started by HARDWARRIOR, Aug 12, 2009.

  1. HARDWARRIOR macrumors member

    Joined:
    Nov 17, 2008
    #1
    Hi
    I'm experiencing crash of app that uses UIWebView. Usually it's when page is not fully loaded and UIWebView is sent stopLoading selector. Or when UIWebView fully loaded page.
    I've got EXC_BAD_ACCESS
    Stack looks like this:

    Code:
    #0	0x95bb7688 in objc_msgSend
    #1	0x30a671db in -[UIWebView webView:decidePolicyForNavigationAction:request:frame:decisionListener:]
    #2	0x3024a10d in __invoking___
    #3	0x30249ff8 in -[NSInvocation invoke]
    #4	0x358ab160 in HandleDelegateSource
    #5	0x302452c1 in CFRunLoopRunSpecific
    #6	0x30244628 in CFRunLoopRunInMode
    #7	0x32044c31 in GSEventRunModal
    #8	0x32044cf6 in GSEventRun
    #9	0x309021ee in UIApplicationMain
    #10	0x0000239c in main at main.m:13
    
    for me most strange thing here is "webView:decidePolicyForNavigationAction:request:frame:decisionListener:" selector sent to UIWebView, because there is no such selector in UIWebView documentation! Only for Cocoa (not cocoa touch) WebView.
    I suspect that there is something wrong with UIWebView or it's delegate. But I can't set breakpoint to watch them. Please advice how I can get more info in such situation.
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Hard to say. Is it possible that the delegate is being released before the webview is released?
     
  3. jeremyapp macrumors newbie

    Joined:
    Apr 30, 2008
    #3
    You're most likely referencing an object that's already been released.

    Try enabling NSZombie - it'll tell you what object you're trying to send a message to.


    Add NSZombieEnabled and set it to YES in the Arguments tab of your executable.
     

Share This Page