iphone EXC_BAD_ACCESS(SIGBUS)在设备上

时间:2013-03-01 12:08:28

标签: iphone xcode exc-bad-access jailbreak

好吧,我采用了最初制作的iOS stumbler应用here  后来here 并添加了一大堆功能,如用户定义的间隔等实时扫描等。 好吧,除了实际扫描到一定程度之外,一切都运行良好。 由于该工具的性质,它只能在越狱手机上运行,​​因此也无法真正在模拟器上运行(好吧,我用它来测试GUI和其他东西但不是实际的扫描。) 我的问题是,扫描仪运行通常3-4分钟后,我得到EXC_BAD_ACCESS(code=2, address=0x....) 我已经阅读了有关使用僵尸等各种线程,我已经在设置下启用它但无济于事。 我目前的设置是: xcode 4.6在iphone 4 5.1.1和4s 6.1.1以及4s 5.1.1上的另一位朋友上运行,结果相同。

除了我自己调用的日志之外没有控制台输出,这表示在扫描循环结束后会导致崩溃。 这是扫描循环:

-(void)collectData{
if([[RefresherSingleton sharedRefresher].refresh isEqualToString:@"NO"]){
    return;
}
LogInfo(@"Current ESSID:%@",ESSID);
network=[self getNetwork:ESSID];
NSNumber *RSSI=[network objectForKey:@"RSSI"];
NSNumber *noise=[network objectForKey:@"NOISE"];
NSString *time=[dateFormatter stringFromDate:[NSDate date]];
if(!RSSI)
    RSSI=[NSNumber numberWithInt:666];
if(!noise)
    noise=[NSNumber numberWithInt:666];
if(!time)
    time=@"";
NSDictionary *data = [[NSDictionary alloc] initWithObjectsAndKeys:time,@"Time",RSSI, @"RSSI", noise, @"Noise",BSSID,@"BSSID",channel,@"Channel", nil];
[[DataCollection sharedDataCollection].dataCollection addObject:data];
LogInfo(@"%@",data);
//pass the data directly to processData
[self processData];

int delay=[[NSUserDefaults standardUserDefaults] stringForKey:@"interval_preference"].integerValue;
LogInfo(@"Delay set to %d",delay);
if(delay>1)
    [self performSelector:@selector(collectData) withObject:nil afterDelay:delay-1];
else
    [self performSelector:@selector(collectData) withObject:nil afterDelay:0];
LogInfo(@"About to loop");
[[NSRunLoop currentRunLoop] run];
LogInfo(@"Should have looped");

}

我在代码等上使用ARC .. 循环运行很长时间然后崩溃。 关于如何缩小范围的任何建议? 这也是iphone崩溃日志:

Incident Identifier: D76B253D-4151-4B59-8C67-3D31D8189CD2  
CrashReporter Key:   0703081b8fe87291ddb896a2ba4e4dfc51a354d4  
Hardware Model:      iPhone3,1  
Process:         WifiTool [4957]  
Path:            /Applications/WifiTool.app/WifiTool  
Identifier:      WifiTool  
Version:         ??? (???)  
Code Type:       ARM (Native)  
Parent Process:  launchd [1]  

Date/Time:       2013-03-01 19:09:45.494 +0900  
OS Version:      iPhone OS 5.1.1 (9B206)  
Report Version:  104  

Exception Type:  EXC_BAD_ACCESS (SIGBUS)  
Exception Codes: KERN_PROTECTION_FAILURE at 0x002bc464  
Crashed Thread:  3  

Thread 0 name:  Dispatch queue: com.apple.main-thread  
Thread 0:  
0   libsystem_kernel.dylib          0x31a00004 mach_msg_trap + 20  
1   libsystem_kernel.dylib          0x31a001fa mach_msg + 50  
2   CoreFoundation                  0x3782d3ec __CFRunLoopServiceMachPort + 120  
3   CoreFoundation                  0x3782c0ea __CFRunLoopRun + 818  
4   CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294  
5   CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98  
6   GraphicsServices                0x33f6e432 GSEventRunModal + 130  
7   UIKit                           0x3155bcce UIApplicationMain + 1074  
8   WifiTool                        0x000d4862 0xd3000 + 6242  
9   WifiTool                        0x000d47e8 0xd3000 + 6120  

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager  
Thread 1:  
0   libsystem_kernel.dylib          0x31a003a8 kevent + 24  
1   libdispatch.dylib               0x30985ea4 _dispatch_mgr_invoke + 708  
2   libdispatch.dylib               0x30985bc2 _dispatch_mgr_thread + 30  

Thread 2 name:  WebThread  
Thread 2:  
0   libsystem_kernel.dylib          0x31a00004 mach_msg_trap + 20  
1   libsystem_kernel.dylib          0x31a001fa mach_msg + 50  
2   CoreFoundation                  0x3782d3ec __CFRunLoopServiceMachPort + 120  
3   CoreFoundation                  0x3782c124 __CFRunLoopRun + 876  
4   CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294  
5   CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98  
6   WebCore                         0x33158c9c _ZL12RunWebThreadPv + 396  
7   libsystem_c.dylib               0x340ce72e _pthread_start + 314  
8   libsystem_c.dylib               0x340ce5e8 thread_start + 0  

Thread 3 Crashed:  
0   CoreGraphics                        0x352bf554 argb32_mark + 80  
1   libRIP.A.dylib                  0x37b3e22a ripl_BltGlyph + 3358  
2   libRIP.A.dylib                  0x37b33ab2 ripc_DrawGlyphs + 1862  
3   CoreGraphics                    0x352bb342 CGContextDelegateDrawGlyphs + 38  
4   CoreGraphics                    0x352bb12a draw_glyphs + 390  
5   CoreGraphics                    0x352badfa CGContextShowGlyphsWithAdvances + 374  
6   WebCore                         0x330b46a0   _ZN7WebCoreL22showGlyphsWithAdvancesERKNS_10FloatPointEPKNS_14SimpleFontDataEP9CGContextPKtPK6CGSizem + 1912
7   WebCore                         0x330b3e04 WebCore::Font::drawGlyphs(WebCore::GraphicsContext*, WebCore::SimpleFontData const*, WebCore::GlyphBuffer const&, int, int, WebCore::FloatPoint const&, bool) const + 1072
8   WebCore                         0x330b369a WebCore::Font::drawSimpleText(WebCore::GraphicsContext*, WebCore::TextRun const&, WebCore::FloatPoint const&, int, int) const + 342
9   WebCore                         0x330b3518 WebCore::Font::drawText(WebCore::GraphicsContext*, WebCore::TextRun const&, WebCore::FloatPoint const&, int, int) const + 128
10  WebKit                          0x35ddb294 _ZL11drawAtPointPKtiRKN7WebCore10FloatPointERKNS1_4FontEPNS1_15GraphicsContextEbPNS1_10BidiStatusEi + 204
11  WebKit                          0x35ddb5e0 -[NSString(WebStringDrawing) __web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:measureOnly:renderedStringOut:drawUnderline:] + 776
12  WebKit                          0x35d54d90 -[NSString(WebStringDrawing) __web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:measureOnly:renderedStringOut:] + 84
13  WebKit                          0x35d54d2c -[NSString(WebStringDrawing) __web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:measureOnly:] + 76
14  WebKit                          0x35d54cd0 -[NSString(WebStringDrawing) _web_drawAtPoint:forWidth:withFont:ellipsis:letterSpacing:includeEmoji:] + 72
15  UIKit                           0x3153dace -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:letterSpacing:includeEmoji:] + 154
16  UIKit                           0x3153d454 -[UILabel _drawTextInRect:baselineCalculationOnly:] + 1848
17  UIKit                           0x3153c3de -[UILabel drawTextInRect:] + 374
18  UIKit                           0x3153c25e -[UILabel drawRect:] + 66
19  UIKit                           0x3153c15e -[UIView(CALayerDelegate) drawLayer:inContext:] + 270
20  QuartzCore                      0x379834de -[CALayer drawInContext:] + 110
21  QuartzCore                      0x37982b38 CABackingStoreUpdate_ + 1776
22  QuartzCore                      0x3798232e CA::Layer::display_() + 950
23  QuartzCore                      0x37981f5a CA::Layer::display() + 122
24  QuartzCore                      0x37981e9c CA::Layer::display_if_needed(CA::Transaction*) + 168
25  QuartzCore                      0x37981844 CA::Context::commit_transaction(CA::Transaction*) + 228
26  QuartzCore                      0x37981578 CA::Transaction::commit() + 308
27  QuartzCore                      0x379794b2 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
28  CoreFoundation                  0x3782db14 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12
29  CoreFoundation                  0x3782bd50 __CFRunLoopDoObservers + 252
30  CoreFoundation                  0x3782c0aa __CFRunLoopRun + 754
31  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
32  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
33  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
34  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
35  WifiTool                        0x000d65a2 0xd3000 + 13730
36  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
37  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
38  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
39  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
40  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
41  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
42  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
43  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
44  WifiTool                        0x000d65a2 0xd3000 + 13730
45  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
46  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
47  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
48  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
49  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
50  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
51  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
52  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
53  WifiTool                        0x000d65a2 0xd3000 + 13730
54  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
55  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
56  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
57  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
58  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
59  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
60  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
61  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
62  WifiTool                        0x000d65a2 0xd3000 + 13730
63  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
64  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
65  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
66  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
67  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
68  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
69  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
70  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
71  WifiTool                        0x000d65a2 0xd3000 + 13730
72  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
73  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
74  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
75  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
76  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
77  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
78  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
79  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
80  WifiTool                        0x000d65a2 0xd3000 + 13730
81  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
82  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
83  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
84  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
85  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
86  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
87  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
88  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
89  WifiTool                        0x000d65a2 0xd3000 + 13730
90  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
91  CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
92  CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
93  CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
94  CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
95  CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
96  Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
97  Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
98  WifiTool                        0x000d65a2 0xd3000 + 13730
99  Foundation                      0x380ca92c __NSFireDelayedPerform + 408
100 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
101 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
102 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
103 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
104 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
105 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
106 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
107 WifiTool                        0x000d65a2 0xd3000 + 13730
108 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
109 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
110 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
111 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
112 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
113 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
114 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
115 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
116 WifiTool                        0x000d65a2 0xd3000 + 13730
117 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
118 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
119 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
120 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
121 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
122 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
123 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
124 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
125 WifiTool                        0x000d65a2 0xd3000 + 13730
126 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
127 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
128 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
129 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
130 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
131 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
132 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
133 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
134 WifiTool                        0x000d65a2 0xd3000 + 13730
135 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
136 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
137 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
138 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
139 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
140 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
141 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
142 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
143 WifiTool                        0x000d65a2 0xd3000 + 13730
144 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
145 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
146 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
147 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
148 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
149 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
150 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
151 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
152 WifiTool                        0x000d65a2 0xd3000 + 13730
153 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
154 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
155 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
156 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
157 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
158 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
159 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
160 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
161 WifiTool                        0x000d65a2 0xd3000 + 13730
162 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
163 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
164 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
165 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
166 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
167 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
168 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
169 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
170 WifiTool                        0x000d65a2 0xd3000 + 13730
171 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
172 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
173 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
174 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
175 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
176 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
177 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
178 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
179 WifiTool                        0x000d65a2 0xd3000 + 13730
180 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
181 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
182 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
183 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
184 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
185 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
186 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
187 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
188 WifiTool                        0x000d65a2 0xd3000 + 13730
189 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
190 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
191 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
192 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
193 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
194 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
195 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
196 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
197 WifiTool                        0x000d65a2 0xd3000 + 13730
198 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
199 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
200 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
201 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
202 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
203 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
204 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
205 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
206 WifiTool                        0x000d65a2 0xd3000 + 13730
207 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
208 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
209 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
210 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
211 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
212 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
213 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
214 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
215 WifiTool                        0x000d65a2 0xd3000 + 13730
216 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
217 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
218 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
219 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
220 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
221 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
222 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
223 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
224 WifiTool                        0x000d65a2 0xd3000 + 13730
225 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
226 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
227 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
228 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
229 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
230 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
231 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
232 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
233 WifiTool                        0x000d65a2 0xd3000 + 13730
234 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
235 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
236 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
237 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
238 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
239 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
240 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
241 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
242 WifiTool                        0x000d65a2 0xd3000 + 13730
243 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
244 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
245 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
246 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
247 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
248 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
249 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
250 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
251 WifiTool                        0x000d65a2 0xd3000 + 13730
252 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
253 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
254 CoreFoundation                  0x3782d692 __CFRunLoopDoTimer + 358
255 CoreFoundation                  0x3782c268 __CFRunLoopRun + 1200
256 CoreFoundation                  0x377af49e CFRunLoopRunSpecific + 294
257 CoreFoundation                  0x377af366 CFRunLoopRunInMode + 98
258 Foundation                      0x38033b6e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
259 Foundation                      0x3804d51c -[NSRunLoop(NSRunLoop) run] + 72
260 WifiTool                        0x000d65a2 0xd3000 + 13730
261 Foundation                      0x380ca92c __NSFireDelayedPerform + 408
262 CoreFoundation                  0x3782da2c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8


Thread 3 crashed with ARM Thread State:
    r0: 0x3f474030    r1: 0x0000000b      r2: 0x00010402      r3: 0x00000000
    r4: 0x00000001    r5: 0x1d024448      r6: 0x1d024448      r7: 0x002bd4fc
    r8: 0x1d02449c    r9: 0x0000001c     r10: 0x1c5e6030     r11: 0x1c5e6074
    ip: 0x00345020    sp: 0x002bc428      lr: 0x00000000      pc: 0x352bf554
  cpsr: 0x40000030

Binary Images:
   0xd3000 -   0x106fff +WifiTool armv7  <5c6af73f9cba3746a645c602ba08b3b3> /Applications/WifiTool.app/WifiTool

我不得不从日志中删除相当多的内容,因为它太长了但是我会在需要时链接它

2 个答案:

答案 0 :(得分:0)

看起来它可能是堆栈溢出;你发生了无限(间接)递归。 [[NSRunLoop currentRunLoop] run];正在调用您的方法,该方法会调用[[NSRunLoop currentRunLoop] run];等。请尝试从您的方法中删除对[[NSRunLoop currentRunLoop] run];的调用。 (只需在方法结束时返回,无论如何它都会返回到runloop。)

答案 1 :(得分:0)

一旦我改为使用GCD调用而不是使用递归循环,应用程序一直稳定下来:) 这是我用过的: 一旦按下开始按钮,从GUI开始: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){ [[ScannerSingleton sharedScanner]scanCurrentNetwork]; }); 这会调用一直保持运行的扫描方法,直到按下停止按钮:)

一旦我修复了这个并在应用程序的其他几个区域实现了GCD,它就会更顺畅:D