2011-03-08 29 views
0
UIWebView *fullWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0,45,320,435)]; 

fullWebView.backgroundColor = [UIColor lightGrayColor]; 

fullWebView.delegate =self; 

[fullWebView loadRequest:[NSURLRequest requestWithURL:[NSURL       URLWithString: http://maps.google.com/maps?f=dsaddr=37.331689,-122.030731daddr=37.324188,-122.036144]]; 

[self addSubview:fullWebView]; 

[fullWebView release], fullWebView = nil; 

這是我的代碼,一旦我加載此代碼,我將在我的web視圖中獲取谷歌方向頁面; 但是一旦我點擊走路方向,我的應用就會崩潰。我在谷歌方向有錯誤

和我有這個錯誤。

(

    3816,0xb0081000) malloc: *** error for object 0x18c5000: pointer being freed was not allocated 
    *** set a breakpoint in malloc_error_break to debug 
    (gdb) continue 
    [Switching to process 3816] 
    Program received signal: 「EXC_BAD_ACCESS」. 
    [Switching to process 3816] 

我在設置斷點malloc_error_break,但我無法跟蹤有關應用程序崩潰什麼。

基本上我需要駕駛方向,行走方向和巴士方向爲可能的應用程序,所以我試過這個鏈接在我的網站視圖。

任何一個可以幫助我在網上以清除這個錯誤或獲得谷歌地圖的方向

回答

0

崩潰表明您試圖訪問一個對象,它是freed.if就可以了,找不到與malloc_error_break然後使用NSZombie你的項目看到這個link

它給你的對象,然後你需要手動找到該對象。