2011-08-01 5 views
0

webView에서 내 앱에서 URL을 3 ~ 4 회 연속 열면 다음과 같은 오류가 발생합니다.iPhone에서 WebView로 충돌이 발생했습니다.

Exception Type: EXC_BAD_ACCESS (SIGBUS) 
Exception Codes: EXC_ARM_DA_ALIGN at 0x0062006f 
Crashed Thread: 0 

Thread 0 Crashed: 
0 libSystem.B.dylib    0x0000576c OSAtomicCompareAndSwap32 + 0 
1 libobjc.A.dylib     0x000066ce changeInfo(class_t*, unsigned int,  unsigned int) + 22 
2 libobjc.A.dylib     0x00008412 realizeClass(class_t*) + 38 
3 libobjc.A.dylib     0x0000862c prepareForMethodLookup + 44 
4 libobjc.A.dylib     0x0000538a lookUpMethod + 34 
5 libobjc.A.dylib     0x00002b82 _class_lookupMethodAndLoadCache + 6 
6 libobjc.A.dylib     0x000028b8 objc_msgSend_uncached + 20 
7 UIKit       0x001d68c2 -[UIWebView webView:didFinishLoadForFrame:] + 214 
8 UIKit       0x001d5e0c -[UIWebViewWebViewDelegate webView:didFinishLoadForFrame:] + 16 
9 CoreFoundation     0x0009f06c __invoking___ + 60 
10 CoreFoundation     0x00032706 -[NSInvocation invoke] + 102 
11 WebCore       0x00044d42 SendMessage(NSInvocation*) + 10 
12 WebCore       0x0005846e HandleDelegateSource(void*) + 62 
13 CoreFoundation     0x00071a86 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6 
14 CoreFoundation     0x00073768 __CFRunLoopDoSources0 + 376 
15 CoreFoundation     0x00074504 __CFRunLoopRun + 224 
16 CoreFoundation     0x0001d8e4 CFRunLoopRunSpecific + 224 
17 CoreFoundation     0x0001d7ec CFRunLoopRunInMode + 52 
18 GraphicsServices    0x000036e8 GSEventRunModal + 108 
19 GraphicsServices    0x00003794 GSEventRun + 56 
20 UIKit       0x000062a0 -[UIApplication _run] + 396 
21 UIKit       0x00004e10 UIApplicationMain + 664 

무엇이 잘못되었을 수 있습니까?

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 
{ 
     NSLog(@"Button Clicked!"); 

return YES; 
} 

- (void)webViewDidStartLoad:(UIWebView *)webView 
{ 
orkutURLString = @""; 

[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:TRUE]; 
} 

- (void)webViewDidFinishLoad:(UIWebView *)webView 
{ 
NSURL *currentURL = orkutWebView.request.mainDocumentURL; 

NSLog(@"Relative URL: %@",[currentURL relativePath]); 

NSArray *urllistItems = [[currentURL relativePath] componentsSeparatedByString:@"/"]; 

if([urllistItems count]>1) 
{ 
    orkutURLString = [urllistItems objectAtIndex:1]; 
    orkutURLString = [orkutURLString lowercaseString]; 

    if([orkutURLString isEqualToString:@"share"]) 
    { 
     orkutWebView = nil; 
     [orkutWebView removeFromSuperview]; 
     [orkutView removeFromSuperview]; 
     NSString *message1 = NSLocalizedStringFromTableInBundle(@"Your status update was sent", @"Localizable", [NewfoxRadioAppDelegate GetLocalizebundle], @""); 
     UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Newfox Radio" message:message1 delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
     [alertView show]; 
     [alertView release]; 
    } 
} 

[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:FALSE]; 
} 

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error 
{ 
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:FALSE]; 
} 
+0

웹 뷰 대리자 메서드가 사용 되었습니까? –

+0

웹보기에서 표시기를 사용하고 있습니까? – SJS

+0

@HonestSuccess : 아니오 UIWebView와 함께 표시기를 사용하지 않습니다. –

답변

0

해결책을 얻었습니다. NSZombie를 가져 와서 객체를 릴리스 한 다음 액세스하려고했습니다. NSZombie를 찾기 위해 Instruments를 사용하여 원하는 결과를 얻었습니다.

관련 문제