Translate

顯示具有 Crash 標籤的文章。 顯示所有文章
顯示具有 Crash 標籤的文章。 顯示所有文章

2013年6月13日 星期四

Xcode 4.6.2常莫名crash

国外有人有解决办法了:
since yesterday's OSX update, every other run on the simulator is crashing on start. It appears to work fine when compiling and running on hardware.

I thought it could be useful for your to warn other developers to hold off from performing the update if they want to work on the simulator."

I've experienced the same issue, but found that switching from LLDB to GDB (on the advice of Tony Arnold from Apple's Dev Forums) seems to fix the problem for the moment.

Update your scheme by selecting Product > Scheme > Edit Scheme, and choose the GDB debugger for your debug scheme.

简单的说,就是把Scheme里的LLDB换成GDB,就解决这个问题了!

2013年3月13日 星期三

NSMutableDictionary setValue forKey crash

在某次我需要利用相同NSMutableDictionary來做key值的改變
並替換掉原本的NSMutableDictionary卻發現會crash
本來的寫法是
//list_data是陣列裡面包的是NSMutableDictionary
NSMutableDictionary *tag_dic = [list_data objectAtIndex:row];

[tag_dic setValue:[NSString stringWithFormat:@"%d",index_sound + 1] forKey:@"sound_order"];

就這樣crash掉了 囧 too bad!
後來上網找 發現只要這樣寫就可以了
NSMutableDictionary *tag_dic = [[list_data objectAtIndex:row] mutableCopy];

 [tag_dic setValue:[NSString stringWithFormat:@"%d",index_sound + 1] forKey:@"sound_order"]; 真是太神奇了傑克!

2013年3月7日 星期四

DMCircularScrollView Crash

在新公司用需要用到一各比較特別的UI
上網查了查發現這個很適合專案要的感覺
沒想到用了四五個小時卻一直當掉
找不出原因
只好把整個網址上網google沒想到


真的是太蝦了拉  
原來要ARC的專案
可是我的專案沒有支援ARC
上網找了一下發現在
[iOS筆記]部份檔案使用/不使用ARC
借我引用一下重點
在專案的TARGETS->Bulid Phases->Compile Sources
選擇不要的.m在Compile Flags設定-fobjc-arc
搞定可以運行了


引用一下
1. 你的專案使用 ARC, 但希望部份檔案不使用,則使用 -fno-objc-arc。
2. 如果你的專案不使用 ARC, 但部份檔案使用,則用 -fobjc-arc。