2012-08-02 34 views
1

我的iPhone是新的,我在這個環節上創造了一個SearchViewController,如: UISearchBar 但是,當我按下搜索欄中給了我以下錯誤: EXC_BAD_ACCESS(代碼= 2,地址=在main.m文件0×27) :EXC_BAD_ACCESS(代碼= 2,地址= 0×27)中的UISearchBar

int main(int argc, char *argv[]) 
{ 
@autoreleasepool { 
    //in this line it gives me the error 
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([MFAppDelegate class])); 

} 
} 

在這個問題上的任何幫助?

+0

你可以在控制檯和相關代碼中發佈錯誤消息嗎? main.m文件並沒有真正的幫助。 – aforaudrey 2012-08-02 22:58:02

+0

它給了我以下信息:發送到釋放實例0x90a39a0的消息是什麼意思? – user1553381 2012-08-03 02:04:42

回答

0

要找到解除分配成員的類,可以啓用ZombieMode,以及回溯,這將幫助您瞭解存在哪些內存管理錯誤。

+0

我啓用了Zombie對象,它給了我以下信息:發送到釋放實例的消息0x90a39a0 這是什麼意思? – user1553381 2012-08-03 02:03:16

+0

@ user1553381試着按照下面的方式去做:http://coderslike.us/2009/05/05/finding-freeddeallocated-instances-of-objects/ – 2012-08-03 10:58:49

+0

非常感謝 – user1553381 2012-08-03 15:17:51

相關問題