- (id)init方法 - 应用程序崩溃

时间:2016-07-27 09:26:33

标签: ios objective-c nsmutablearray

我使用Crashlytics来捕获应用程序中的错误。有时app崩溃了,Crashlytics说错误发生在下面的代码块中。我已经在.h文件中声明了所有变量。

-(id)init
{
    if ( self = [super init] ) {
    _currentTemperature=@"";
    _currentHumidity=@"";
    _currentWindSpeed=@"";
    _currentStatus=@"";
    self.weeklyMinTemperature=[[NSMutableArray alloc]init];
    self.weeklyMaxTemperature=[[NSMutableArray alloc]init];
    self.weeklyHumidity=[[NSMutableArray alloc]init];
    self.hourlySummary=[[NSMutableArray alloc]init];

    }
    return self;
}

错误日志如下所示。

EXC_BAD_ACCESS_KERN_INVALID ADDRESS

#6. Crashed: com.apple.UNSNotificationSchedulerConnection
0  libobjc.A.dylib                0x182ae1b90 objc_msgSend + 16
1  Foundation                     0x183d517a8 -[NSXPCEncoder _encodeObject:] + 484
2  UIKit                          0x188c8b1ec -[UIConcreteLocalNotification encodeWithCoder:] + 84
3  Foundation                     0x183d51870 -[NSXPCEncoder _encodeObject:] + 684
4  Foundation                     0x183dbad48 -[NSXPCEncoder _encodeArrayOfObjects:forKey:] + 264
5  Foundation                     0x183d51870 -[NSXPCEncoder _encodeObject:] + 684
6  Foundation                     0x183d51d58 encodeInvocationArguments + 320
7  Foundation                     0x183d51a18 -[NSXPCEncoder encodeInvocation:] + 368
8  Foundation                     0x183d51870 -[NSXPCEncoder _encodeObject:] + 684
9  Foundation                     0x183f27d64 -[NSXPCConnection _sendInvocation:withProxy:remoteInterface:withErrorHandler:timeout:userInfo:] + 2328
10 CoreFoundation                 0x18346ea1c ___forwarding___ + 408
11 CoreFoundation                 0x18336cc5c _CF_forwarding_prep_0 + 92
12 libdispatch.dylib              0x182eb54bc _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
14 libdispatch.dylib              0x182ec14c0 _dispatch_queue_drain + 864
15 libdispatch.dylib              0x182eb8f80 _dispatch_queue_invoke + 464
16 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
17 libdispatch.dylib              0x182ec3914 _dispatch_root_queue_drain + 2140
18 libdispatch.dylib              0x182ec30b0 _dispatch_worker_thread3 + 112
19 libsystem_pthread.dylib        0x1830cd470 _pthread_wqthread + 1092
20 libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

--

#0. com.apple.main-thread
0  libsystem_kernel.dylib         0x182febea8 read + 8
1  Foundation                     0x183d73f0c _NSReadFromFileDescriptorWithProgress + 228
2  Foundation                     0x183d73cec _NSReadBytesFromFileWithExtendedAttributes + 676
3  Foundation                     0x183d739f8 -[NSData(NSData) initWithContentsOfFile:] + 80
4  GeoServices                    0x189e8ec2c -[GEOResourceManifestManager _loadActiveTileGroupIfNecessary:] + 240
5  GeoServices                    0x189d2f3e8 GEOURLWorldDefaultURLStringWithSource + 164
6  GeoServices                    0x189d43658 _GEOURLStringWithSource + 56
7  GeoServices                    0x189e0d824 +[GEOLocationShifter isLocationShiftRequiredForCoordinate:] + 72
8  GeoServices                    0x189e7c970 -[_GEOReverseGeocodeRequestTicket submitWithHandler:networkActivity:] + 168
9  CoreLocation                   0x18a1f3eb4 (null) + 32576
10 libdispatch.dylib              0x182eb54bc _dispatch_call_block_and_release + 24
11 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
12 libdispatch.dylib              0x182ebab84 _dispatch_main_queue_callback_4CF + 1844
13 CoreFoundation                 0x183420d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14 CoreFoundation                 0x18341ebb8 __CFRunLoopRun + 1628
15 CoreFoundation                 0x183348c50 CFRunLoopRunSpecific + 384
16 GraphicsServices               0x184c30088 GSEventRunModal + 180
17 UIKit                          0x188632088 UIApplicationMain + 204
18 AgileblazeWeather              0x100053b78 main (main.m:14)
19 libdispatch.dylib              0x182ee68b8 (Missing)

#1. com.apple.libdispatch-manager
0  libsystem_kernel.dylib         0x1830054d8 kevent_qos + 8
1  libdispatch.dylib              0x182ec87d8 _dispatch_mgr_invoke + 232
2  libdispatch.dylib              0x182eb7648 _dispatch_source_invoke + 50

#2. Thread
0  libsystem_kernel.dylib         0x183004b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1830cd530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#3. com.apple.CoreLocation.ConnectionClient.0x1446aa130.events
0  libsystem_kernel.dylib         0x182fe902c semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x182ec6394 _dispatch_semaphore_wait_slow + 160
2  CoreLocation                   0x18a1bad4c (null) + 628
3  CoreLocation                   0x18a1bf804 (null) + 1176
4  CoreLocation                   0x18a1fac44 (null) + 60624
5  CoreLocation                   0x18a1f8898 (null) + 51492
6  CoreLocation                   0x18a1f87cc (null) + 51288
7  CoreLocation                   0x18a1f9a18 (null) + 55972
8  libxpc.dylib                   0x183100f68 _xpc_connection_call_event_handler + 68
9  libxpc.dylib                   0x1830fed10 _xpc_connection_mach_event + 2132
10 libdispatch.dylib              0x182eb5578 _dispatch_client_callout4 + 16
11 libdispatch.dylib              0x182eb9864 _dispatch_mach_msg_invoke + 656
12 libdispatch.dylib              0x182ec1694 _dispatch_queue_drain + 1332
13 libdispatch.dylib              0x182eb8978 _dispatch_mach_invoke + 600
14 libdispatch.dylib              0x182ec1694 _dispatch_queue_drain + 1332
15 libdispatch.dylib              0x182eb8f80 _dispatch_queue_invoke + 464
16 libdispatch.dylib              0x182ec1694 _dispatch_queue_drain + 1332
17 libdispatch.dylib              0x182eb8f80 _dispatch_queue_invoke + 464
18 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
19 libdispatch.dylib              0x182ec3914 _dispatch_root_queue_drain + 2140
20 libdispatch.dylib              0x182ec30b0 _dispatch_worker_thread3 + 112
21 libsystem_pthread.dylib        0x1830cd470 _pthread_wqthread + 1092
22 libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#4. com.apple.NSXPCConnection.m-user.com.apple.usernotification.notificationscheduler
0  libsystem_kernel.dylib         0x182fe8fd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x182fe8e54 mach_msg + 72
2  libxpc.dylib                   0x18311314c xpc_pipe_routine + 256
3  libxpc.dylib                   0x183105f18 _xpc_interface_routine + 200
4  libxpc.dylib                   0x1831062f0 _xpc_look_up_endpoint + 224
5  libxpc.dylib                   0x1830ffc60 _xpc_connection_bootstrap_look_up_slow + 212
6  libxpc.dylib                   0x1830ff958 _xpc_connection_init + 536
7  libxpc.dylib                   0x1830ff730 _xpc_connection_resume_init + 20
8  libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
9  libdispatch.dylib              0x182ec14c0 _dispatch_queue_drain + 864
10 libdispatch.dylib              0x182eb8f80 _dispatch_queue_invoke + 464
11 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
12 libdispatch.dylib              0x182ec3914 _dispatch_root_queue_drain + 2140
13 libdispatch.dylib              0x182ec30b0 _dispatch_worker_thread3 + 112
14 libsystem_pthread.dylib        0x1830cd470 _pthread_wqthread + 1092
15 libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#5. Thread
0  libsystem_kernel.dylib         0x183004b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1830cd530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#6. Crashed: com.apple.UNSNotificationSchedulerConnection
0  libobjc.A.dylib                0x182ae1b90 objc_msgSend + 16
1  Foundation                     0x183d517a8 -[NSXPCEncoder _encodeObject:] + 484
2  UIKit                          0x188c8b1ec -[UIConcreteLocalNotification encodeWithCoder:] + 84
3  Foundation                     0x183d51870 -[NSXPCEncoder _encodeObject:] + 684
4  Foundation                     0x183dbad48 -[NSXPCEncoder _encodeArrayOfObjects:forKey:] + 264
5  Foundation                     0x183d51870 -[NSXPCEncoder _encodeObject:] + 684
6  Foundation                     0x183d51d58 encodeInvocationArguments + 320
7  Foundation                     0x183d51a18 -[NSXPCEncoder encodeInvocation:] + 368
8  Foundation                     0x183d51870 -[NSXPCEncoder _encodeObject:] + 684
9  Foundation                     0x183f27d64 -[NSXPCConnection _sendInvocation:withProxy:remoteInterface:withErrorHandler:timeout:userInfo:] + 2328
10 CoreFoundation                 0x18346ea1c ___forwarding___ + 408
11 CoreFoundation                 0x18336cc5c _CF_forwarding_prep_0 + 92
12 libdispatch.dylib              0x182eb54bc _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
14 libdispatch.dylib              0x182ec14c0 _dispatch_queue_drain + 864
15 libdispatch.dylib              0x182eb8f80 _dispatch_queue_invoke + 464
16 libdispatch.dylib              0x182eb547c _dispatch_client_callout + 16
17 libdispatch.dylib              0x182ec3914 _dispatch_root_queue_drain + 2140
18 libdispatch.dylib              0x182ec30b0 _dispatch_worker_thread3 + 112
19 libsystem_pthread.dylib        0x1830cd470 _pthread_wqthread + 1092
20 libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#7. com.twitter.crashlytics.ios.MachExceptionServer
0  AgileblazeWeather              0x10006c74c CLSProcessRecordAllThreads + 4295460684
1  AgileblazeWeather              0x10006c74c CLSProcessRecordAllThreads + 4295460684
2  AgileblazeWeather              0x10006cb6c CLSProcessRecordAllThreads + 4295461740
3  AgileblazeWeather              0x10005d82c CLSHandler + 4295399468
4  AgileblazeWeather              0x1000589b0 CLSMachExceptionServer + 4295379376
5  libsystem_pthread.dylib        0x1830cfb28 _pthread_body + 156
6  libsystem_pthread.dylib        0x1830cfa8c _pthread_body + 154
7  libsystem_pthread.dylib        0x1830cd028 thread_start + 4

#8. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x182fe8fd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x182fe8e54 mach_msg + 72
2  CoreFoundation                 0x183420c60 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x18341e964 __CFRunLoopRun + 1032
4  CoreFoundation                 0x183348c50 CFRunLoopRunSpecific + 384
5  CFNetwork                      0x183ac9bcc +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6  Foundation                     0x183e3fe4c __NSThread__start__ + 1000
7  libsystem_pthread.dylib        0x1830cfb28 _pthread_body + 156
8  libsystem_pthread.dylib        0x1830cfa8c _pthread_body + 154
9  libsystem_pthread.dylib        0x1830cd028 thread_start + 4

#9. Thread
0  libsystem_kernel.dylib         0x183004b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1830cd530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#10. Thread
0  libsystem_kernel.dylib         0x183004b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1830cd530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#11. Thread
0  libsystem_kernel.dylib         0x183004b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1830cd530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1830cd020 start_wqthread + 4

#12. com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x183004344 __select + 8
1  CoreFoundation                 0x1834271c8 __CFSocketManager + 648
2  libsystem_pthread.dylib        0x1830cfb28 _pthread_body + 156
3  libsystem_pthread.dylib        0x1830cfa8c _pthread_body + 154
4  libsystem_pthread.dylib        0x1830cd028 thread_start + 4

这种类型的崩溃是什么原因?我的代码块中有错误吗?

0 个答案:

没有答案