How to interpret Apple crash report - app-store

Please, help to understand Apple Crash report. It seems to me that the app even doesn't start, but I fail to repeat the bug. I have also added GoogleAnalytics to the app. Can the reason be in it?
{"app_name":"Cells","app_version":"1.0","bundleID":"avector.Cells","adam_id":918451381,"os_version":"iPhone OS 8.0 (12A365)","slice_uuid":"f203c691-c7ff-30c0-9dc0-2ac203b92004","share_with_app_devs":false,"build_version":"2.0","is_first_party":false,"bug_type":"109","name":"Cells"}
Incident Identifier: 5D2C2326-720C-4456-BFFC-9D09AE4B82D0
CrashReporter Key: 761270594f1e0a7b7ba69ad8bab60cd243da0a3d
Hardware Model: xxx
Process: Cells [1170]
Path: /private/var/mobile/Containers/Bundle/Application/6EABC83E-7A5E-40B8-8D61-9EE06530AF82/Cells.app/Cells
Identifier: avector.Cells
Version: 2.0 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2014-09-19 15:27:20.980 -0700
Launch Time: 2014-09-19 15:27:15.645 -0700
OS Version: iOS 8.0 (12A365)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
(0x18485e084 0x1952b00e4 0x18485dd08 0x185662510 0x18478b8e0 0x1893e8f74 0x1892ef978 0x188fe0efc 0x188fe0e68 0x188fe7530 0x188fe4cd4 0x189055b38 0x189268ff0 0x18926b568 0x189269c00 0x18ca35640 0x184816360 0x184815468 0x184813668 0x184741664 0x18904b98c 0x189046984 0x1000bad10 0x19591ea08)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000195a37270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000195ad5224 pthread_kill + 108
2 libsystem_c.dylib 0x00000001959aeb14 abort + 108
3 libc++abi.dylib 0x0000000194a95414 abort_message + 112
4 libc++abi.dylib 0x0000000194ab4b88 default_terminate_handler() + 300
5 libobjc.A.dylib 0x00000001952b03bc _objc_terminate() + 124
6 libc++abi.dylib 0x0000000194ab1bb0 std::__terminate(void (*)()) + 12
7 libc++abi.dylib 0x0000000194ab1738 __cxa_rethrow + 140
8 libobjc.A.dylib 0x00000001952b0290 objc_exception_rethrow + 40
9 CoreFoundation 0x0000000184741710 CFRunLoopRunSpecific + 568
10 UIKit 0x000000018904b988 -[UIApplication _run] + 548
11 UIKit 0x0000000189046980 UIApplicationMain + 1484
12 Cells 0x00000001000bad0c 0x1000a8000 + 77068
13 libdyld.dylib 0x000000019591ea04 start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x0000000195a1cc94 kevent64 + 8
1 libdispatch.dylib 0x000000019590497c _dispatch_mgr_invoke + 272
2 libdispatch.dylib 0x00000001958f74a0 _dispatch_mgr_thread + 48
Thread 2:
0 libsystem_kernel.dylib 0x0000000195a37c78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000195ad1390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000195ad0fa4 start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x0000000195a37c78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000195ad1390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000195ad0fa4 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x0000000195a37c78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000195ad1390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000195ad0fa4 start_wqthread + 0
Thread 5:
0 libsystem_kernel.dylib 0x0000000195a37c78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000195ad1390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000195ad0fa4 start_wqthread + 0
Thread 6 name: GAIThread
Thread 6:
0 libsystem_kernel.dylib 0x0000000195a1ce7c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000195a1ccf4 mach_msg + 68
2 CoreFoundation 0x0000000184815804 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184813758 __CFRunLoopRun + 936
4 CoreFoundation 0x0000000184741660 CFRunLoopRunSpecific + 392
5 Foundation 0x0000000185642200 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 312
6 Foundation 0x000000018569c8f4 -[NSRunLoop(NSRunLoop) run] + 92
7 Cells 0x00000001000bd0f8 0x1000a8000 + 86264
8 Foundation 0x000000018572a608 __NSThread__main__ + 1068
9 libsystem_pthread.dylib 0x0000000195ad3e7c _pthread_body + 160
10 libsystem_pthread.dylib 0x0000000195ad3dd8 _pthread_start + 156
11 libsystem_pthread.dylib 0x0000000195ad0fac thread_start + 0
Thread 7:
0 libsystem_kernel.dylib 0x0000000195a37c78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x0000000195ad1390 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x0000000195ad0fa4 start_wqthread + 0
Thread 8 name: com.apple.NSURLConnectionLoader
Thread 8:
0 libsystem_kernel.dylib 0x0000000195a1ce7c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000195a1ccf4 mach_msg + 68
2 CoreFoundation 0x0000000184815804 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184813758 __CFRunLoopRun + 936
4 CoreFoundation 0x0000000184741660 CFRunLoopRunSpecific + 392
5 CFNetwork 0x0000000184242054 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436
6 Foundation 0x000000018572a608 __NSThread__main__ + 1068
7 libsystem_pthread.dylib 0x0000000195ad3e7c _pthread_body + 160
8 libsystem_pthread.dylib 0x0000000195ad3dd8 _pthread_start + 156
9 libsystem_pthread.dylib 0x0000000195ad0fac thread_start + 0
Thread 9 name: com.apple.CFSocket.private
Thread 9:
0 libsystem_kernel.dylib 0x0000000195a37498 __select + 8
1 CoreFoundation 0x000000018481b1fc __CFSocketManager + 656
2 libsystem_pthread.dylib 0x0000000195ad3e7c _pthread_body + 160
3 libsystem_pthread.dylib 0x0000000195ad3dd8 _pthread_start + 156
4 libsystem_pthread.dylib 0x0000000195ad0fac thread_start + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x00000001700ec0b7
x4: 0x0000000194ab5dfd x5: 0x000000016fd57430 x6: 0x000000000000006e x7: 0x0000000000000f80
x8: 0x0000000008000000 x9: 0x0000000004000000 x10: 0x0000000000000200 x11: 0x0000000000000000
x12: 0x0000000000000000 x13: 0x0000000000000000 x14: 0x0000000000000002 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x00000001995f5310 x21: 0x00000001995ddce8 x22: 0x0000000170146b50 x23: 0x0000000195f32770
x24: 0x0000000000000001 x25: 0x0000000170146b40 x26: 0x00000001995dc0a8 x27: 0x0000000000000001
x28: 0x0000000000000000 fp: 0x000000016fd57390 lr: 0x0000000195ad5228
sp: 0x000000016fd57370 pc: 0x0000000195a37270 cpsr: 0x00000000
Can anyone help me?

Related

iOS Crash in CLSTerminateHandler()

I'm getting this crash from many devices using my app. I can't see where is the error since Xcode doesn't select any line in the code and the backtrace of the log is quite confusing for me.
The Xcode Organizer selects the error on CLSTerminateHandler(), but can see where in my project.
Here's the crash log:
Date/Time: 2020-01-27 14:10:51.6942 +0800
Launch Time: 2020-01-27 14:10:03.8467 +0800
OS Version: iPhone OS 13.3 (17C54)
Release Type: User
Baseband Version: 7.30.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 4
Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001b7670288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b766b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b766aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5 GraphicsServices 0x00000001c15f0328 GSEventRunModal + 104 (GSEvent.c:2246)
6 UIKitCore 0x00000001bb765ae0 UIApplicationMain + 1936 (UIApplication.m:4773)
7 StickersCreator 0x00000001048f3cac main + 68 (AppDelegate.swift:19)
8 libdyld.dylib 0x00000001b74f4360 start + 4
Thread 1 name:
Thread 1:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001b7670288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b766b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b766aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5 Foundation 0x00000001b79aa7f4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 228 (NSRunLoop.m:374)
6 Foundation 0x00000001b79aa6d4 -[NSRunLoop(NSRunLoop) runUntilDate:] + 88 (NSRunLoop.m:421)
7 UIKitCore 0x00000001bb7fe204 -[UIEventFetcher threadMain] + 152 (UIEventFetcher.m:637)
8 Foundation 0x00000001b7adb0a4 __NSThread__start__ + 848 (NSThread.m:724)
9 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
10 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 StickersCreator 0x000000010495f918 CLSMachExceptionServer + 100
3 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
4 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 3:
0 libsystem_pthread.dylib 0x00000001b7411758 start_wqthread + 0
Thread 4 name:
Thread 4 Crashed:
0 libsystem_kernel.dylib 0x00000001b74e9ec4 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001b74051d8 pthread_kill$VARIANT$mp + 136 (pthread.c:1458)
2 libsystem_c.dylib 0x00000001b73598c0 __abort + 112 (abort.c:147)
3 libsystem_c.dylib 0x00000001b7359850 abort + 112 (abort.c:118)
4 libc++abi.dylib 0x00000001b74b27d4 abort_message + 128 (abort_message.cpp:76)
5 libc++abi.dylib 0x00000001b74b29ac demangling_terminate_handler() + 272 (cxa_default_handlers.cpp:61)
6 libobjc.A.dylib 0x00000001b741a268 _objc_terminate() + 140 (objc-exception.mm:704)
7 StickersCreator 0x0000000104972730 CLSTerminateHandler() + 348
8 libc++abi.dylib 0x00000001b74bf304 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
9 libc++abi.dylib 0x00000001b74bf29c std::terminate() + 44 (cxa_handlers.cpp:87)
10 libdispatch.dylib 0x00000001b73bf198 _dispatch_client_callout + 36 (object.m:498)
11 libdispatch.dylib 0x00000001b73676f8 _dispatch_queue_override_invoke + 684 (inline_internal.h:2484)
12 libdispatch.dylib 0x00000001b7373fa4 _dispatch_root_queue_drain + 376 (inline_internal.h:2525)
13 libdispatch.dylib 0x00000001b7374770 _dispatch_worker_thread2 + 128 (queue.c:6628)
14 libsystem_pthread.dylib 0x00000001b740eb48 _pthread_wqthread + 212 (pthread.c:2364)
15 libsystem_pthread.dylib 0x00000001b7411760 start_wqthread + 8
Thread 5 name:
Thread 5:
0 libsystem_kernel.dylib 0x00000001b74e9c94 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001b7406cf8 _pthread_cond_wait$VARIANT$mp + 680 (pthread_cond.c:591)
2 libc++.1.dylib 0x00000001b753c7a8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24 (__threading_support:287)
3 JavaScriptCore 0x00000001c646d22c void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::uni... + 108 (condition_variable:204)
4 JavaScriptCore 0x00000001c6470bfc bmalloc::Scavenger::threadRunLoop() + 200 (condition_variable:213)
5 JavaScriptCore 0x00000001c64708e4 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 12 (Scavenger.cpp:384)
6 JavaScriptCore 0x00000001c6471bf0 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, st... + 40 (type_traits:4361)
7 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
8 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001b7670288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b766b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b766aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5 WebCore 0x00000001bf63317c RunWebThread(void*) + 612 (WebCoreThread.mm:626)
6 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
7 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 7:
0 libsystem_pthread.dylib 0x00000001b7411758 start_wqthread + 0
Thread 8 name:
Thread 8:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001b7670288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b766b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b766aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5 AVFAudio 0x00000001c4230c1c GenericRunLoopThread::Entry(void*) + 156 (GenericRunLoopThread.h:91)
6 AVFAudio 0x00000001c4281d60 CAPThread::Entry(CAPThread*) + 204 (CAPThread.cpp:286)
7 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
8 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 9 name:
Thread 9:
0 libsystem_kernel.dylib 0x00000001b74e9c94 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001b7406cf8 _pthread_cond_wait$VARIANT$mp + 680 (pthread_cond.c:591)
2 JavaScriptCore 0x00000001c643195c WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 80 (ThreadingPOSIX.cpp:518)
3 JavaScriptCore 0x00000001c6417848 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::Scope... + 2040 (ParkingLot.cpp:596)
4 WebKitLegacy 0x00000001c3689d74 bool WTF::Condition::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184 (ParkingLot.h:80)
5 WebKitLegacy 0x00000001c368c9a8 std::__1::unique_ptr<WTF::Function<void ()>, std::__1::default_delete<WTF::Function<void ()> > > ... + 168 (MessageQueue.h:153)
6 WebKitLegacy 0x00000001c368c08c WebCore::StorageThread::threadEntryPoint() + 68 (MessageQueue.h:131)
7 JavaScriptCore 0x00000001c642f5d4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 256 (Function.h:79)
8 JavaScriptCore 0x00000001c6431144 WTF::wtfThreadEntryPoint(void*) + 12 (ThreadingPOSIX.cpp:200)
9 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
10 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 10 name:
Thread 10:
0 libsystem_kernel.dylib 0x00000001b74e9c94 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001b7406cf8 _pthread_cond_wait$VARIANT$mp + 680 (pthread_cond.c:591)
2 JavaScriptCore 0x00000001c643199c WTF::ThreadCondition::timedWait(WTF::Mutex&, WTF::WallTime) + 144 (ThreadingPOSIX.cpp:541)
3 JavaScriptCore 0x00000001c6417848 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::Scope... + 2040 (ParkingLot.cpp:596)
4 JavaScriptCore 0x00000001c63f0104 bool WTF::Condition::waitUntil<WTF::Lock>(WTF::Lock&, WTF::TimeWithDynamicClockType const&) + 184 (ParkingLot.h:80)
5 JavaScriptCore 0x00000001c63f048c WTF::Detail::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0, void>:... + 216 (Condition.h:115)
6 JavaScriptCore 0x00000001c642f5d4 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 256 (Function.h:79)
7 JavaScriptCore 0x00000001c6431144 WTF::wtfThreadEntryPoint(void*) + 12 (ThreadingPOSIX.cpp:200)
8 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
9 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 11 name:
Thread 11:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001b7670288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b766b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b766aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5 CFNetwork 0x00000001ba9214e8 -[__CoreSchedulingSetRunnable runForever] + 192 (CoreSchedulingSet.mm:1372)
6 Foundation 0x00000001b7adb0a4 __NSThread__start__ + 848 (NSThread.m:724)
7 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
8 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 12 name:
Thread 12:
0 libsystem_kernel.dylib 0x00000001b74c8634 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b74c7aa0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001b7670288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575)
3 CoreFoundation 0x00000001b766b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931)
4 CoreFoundation 0x00000001b766aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
5 CFNetwork 0x00000001ba9214e8 -[__CoreSchedulingSetRunnable runForever] + 192 (CoreSchedulingSet.mm:1372)
6 Foundation 0x00000001b7adb0a4 __NSThread__start__ + 848 (NSThread.m:724)
7 libsystem_pthread.dylib 0x00000001b740dd8c _pthread_start + 156 (pthread.c:896)
8 libsystem_pthread.dylib 0x00000001b741176c thread_start + 8
Thread 13:
0 libsystem_pthread.dylib 0x00000001b7411758 start_wqthread + 0
Thread 14:
0 libsystem_pthread.dylib 0x00000001b7411758 start_wqthread + 0
Thread 15:
0 libsystem_pthread.dylib 0x00000001b7411758 start_wqthread + 0
Thread 4 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x0000000000000000 x5: 0x0000000000989680 x6: 0x0000000000000020 x7: 0x0000000000000000
x8: 0x000000016c60b000 x9: 0x40b3ddf8bf7fe521 x10: 0x00000000000003e8 x11: 0x2e73656c706d6153
x12: 0x29287974706d652e x13: 0x636e7566206e6920 x14: 0x0000000000000010 x15: 0x0a27734d4d477469
x16: 0x0000000000000148 x17: 0x000000007c000000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000007103 x21: 0x000000016c60a970 x22: 0x000000016c60b0e0 x23: 0x0000000000000114
x24: 0x000000016c60b0e0 x25: 0x0000000000000000 x26: 0x00000000000005ff x27: 0x00000001ff2f1480
x28: 0x0000000002ffffff fp: 0x000000016c60a890 lr: 0x00000001b74051d8
sp: 0x000000016c60a870 pc: 0x00000001b74e9ec4 cpsr: 0x40000000
esr: 0x56000080 Address size fault

Crash KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED

I'm seeing crashes in my crash log, but I have yet to experience a crash directly. I've searched everything and tried everything but I'm stuck.
Any ideas on why I'm getting these in my crash logs?
Crash log
CrashReporter Key: d42015aa3717735a5388beca859904bc83c7d8a1
Hardware Model: iPhone9,2
Process: Waterspeed [9082]
Path: /private/var/containers/Bundle/Application/60208DDD-0A10-41FE-B309-56CF3CCB0E45/Waterspeed.app/Waterspeed
Identifier: TNT.Waterspeed
Version: 23 (2.9.28)
AppStoreTools: 10G3
AppVariant: 1:iPhone9,2:12.2
Code Type: ARM-64 (Native)
Role: Non UI
Parent Process: launchd [1]
Coalition: TNT.Waterspeed [2182]
Date/Time: 2019-07-22 19:20:09.0959 -1000
Launch Time: 2019-07-21 23:14:01.7633 -1000
OS Version: iPhone OS 12.3.1 (16F203)
Baseband Version: 5.60.01
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000fbcae9b80
VM Region Info: 0xfbcae9b80 is not in any region. Bytes after previous region: 56315779969
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [9082]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001fdcf60e0 object_isClass + 16 (objc-runtime-new.h:976)
1 Foundation 0x00000001ff56a8d0 KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED + 64 (NSKeyValueObserving.m:1122)
2 Foundation 0x00000001ff568170 NSKeyValueWillChangeWithPerThreadPendingNotifications.llvm.9306004367141260615 + 304 (NSKeyValueObserving.m:1152)
3 Foundation 0x00000001ff4e1d44 -[NSProgress _setValueForKeys:settingBlock:] + 264 (NSProgress.m:773)
4 Foundation 0x00000001ff4ff424 -[NSProgress _setRemoteValues:forKeys:] + 192 (NSProgress.m:2347)
5 Foundation 0x00000001ff6b3020 __45-[_NSProgressProxy _setRemoteValues:forKeys:]_block_invoke + 64 (NSProgressSubscriber.m:118)
6 CoreFoundation 0x00000001feaaee68 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20 (CFRunLoop.c:1838)
7 CoreFoundation 0x00000001feaae76c __CFRunLoopDoBlocks + 272 (CFRunLoop.c:1879)
8 CoreFoundation 0x00000001feaa9cd8 __CFRunLoopRun + 2312 (CFRunLoop.c:3178)
9 CoreFoundation 0x00000001feaa90b0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
10 GraphicsServices 0x0000000200ca979c GSEventRunModal + 104 (GSEvent.c:2245)
11 UIKitCore 0x000000022b457978 UIApplicationMain + 212 (UIApplication.m:4353)
12 Waterspeed 0x0000000102d95068 main + 68 (LoginViewController.swift:34)
13 libdyld.dylib 0x00000001fe56e8e0 start + 4
Thread 1 name:
Thread 1:
0 libsystem_kernel.dylib 0x00000001fe6af0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001fe6ae5a0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001feaaea10 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x00000001feaa9920 __CFRunLoopRun + 1360 (CFRunLoop.c:2971)
4 CoreFoundation 0x00000001feaa90b0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 Foundation 0x00000001ff476fac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 (NSRunLoop.m:367)
6 Foundation 0x00000001ff476e3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96 (NSRunLoop.m:411)
7 UIKitCore 0x000000022b53d494 -[UIEventFetcher threadMain] + 136 (UIEventFetcher.m:606)
8 Foundation 0x00000001ff5a36a4 __NSThread__start__ + 984 (NSThread.m:1175)
9 libsystem_pthread.dylib 0x00000001fe73c2c0 _pthread_body + 128 (pthread.c:857)
10 libsystem_pthread.dylib 0x00000001fe73c220 _pthread_start + 44 (pthread.c:884)
11 libsystem_pthread.dylib 0x00000001fe73fcdc thread_start + 4
Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x00000001fe6bc920 write + 8
1 Waterspeed 0x0000000102f50cb4 CLSSDKFileLog + 288 (CLSInternalLogging.c:0)
2 Waterspeed 0x0000000102f48388 CLSMachExceptionServer + 912 (CLSMachException.c:249)
3 libsystem_pthread.dylib 0x00000001fe73c2c0 _pthread_body + 128 (pthread.c:857)
4 libsystem_pthread.dylib 0x00000001fe73c220 _pthread_start + 44 (pthread.c:884)
5 libsystem_pthread.dylib 0x00000001fe73fcdc thread_start + 4
Thread 3 name:
Thread 3:
0 libsystem_kernel.dylib 0x00000001fe6af0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001fe6ae5a0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001feaaea10 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x00000001feaa9920 __CFRunLoopRun + 1360 (CFRunLoop.c:2971)
4 CoreFoundation 0x00000001feaa90b0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 CFNetwork 0x00000001ff0c274c -[__CoreSchedulingSetRunnable runForever] + 216 (CoreSchedulingSet.mm:1365)
6 Foundation 0x00000001ff5a36a4 __NSThread__start__ + 984 (NSThread.m:1175)
7 libsystem_pthread.dylib 0x00000001fe73c2c0 _pthread_body + 128 (pthread.c:857)
8 libsystem_pthread.dylib 0x00000001fe73c220 _pthread_start + 44 (pthread.c:884)
9 libsystem_pthread.dylib 0x00000001fe73fcdc thread_start + 4
Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x00000001fe6af0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001fe6ae5a0 mach_msg + 72 (mach_msg.c:103)
2 CoreFoundation 0x00000001feaaea10 __CFRunLoopServiceMachPort + 236 (CFRunLoop.c:2615)
3 CoreFoundation 0x00000001feaa9920 __CFRunLoopRun + 1360 (CFRunLoop.c:2971)
4 CoreFoundation 0x00000001feaa90b0 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3247)
5 Foundation 0x00000001ff476fac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300 (NSRunLoop.m:367)
6 Waterspeed 0x000000010301e8d0 -[_FSRRunLoopThread main] + 252 (FSRWebSocket.m:1843)
7 Foundation 0x00000001ff5a36a4 __NSThread__start__ + 984 (NSThread.m:1175)
8 libsystem_pthread.dylib 0x00000001fe73c2c0 _pthread_body + 128 (pthread.c:857)
9 libsystem_pthread.dylib 0x00000001fe73c220 _pthread_start + 44 (pthread.c:884)
10 libsystem_pthread.dylib 0x00000001fe73fcdc thread_start + 4
Thread 5 name:
Thread 5:
0 libsystem_kernel.dylib 0x00000001fe6ba328 __select + 8
1 CoreFoundation 0x00000001feab76f4 __CFSocketManager + 620 (CFSocket.c:2242)
2 libsystem_pthread.dylib 0x00000001fe73c2c0 _pthread_body + 128 (pthread.c:857)
3 libsystem_pthread.dylib 0x00000001fe73c220 _pthread_start + 44 (pthread.c:884)
4 libsystem_pthread.dylib 0x00000001fe73fcdc thread_start + 4
Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x00000001fe6bb93c kevent_id + 8
1 libdispatch.dylib 0x00000001fe51bbf0 _dispatch_kq_poll + 332 (event_kevent.c:718)
2 libdispatch.dylib 0x00000001fe51b114 _dispatch_event_loop_poke$VARIANT$mp + 476 (event_kevent.c:1644)
3 Foundation 0x00000001ff4fb080 -[NSFileAccessArbiterProxy revokeAccessClaimForID:] + 84 (NSFileAccessArbiter.m:2232)
4 Foundation 0x00000001ff660af0 __98-[NSFileCoordinator(NSPrivate) _withAccessArbiter:invokeAccessor:orDont:andRelinquishAccessCl... + 232 (NSFileCoordinator.m:960)
5 Foundation 0x00000001ff660cc0 __85-[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:error:byAccessor:]_block_i... + 28 (NSFileCoordinator.m:1014)
6 Foundation 0x00000001ff4e95a4 -[NSFileCoordinatorAccessorBlockCompletion decrement] + 76 (NSFileCoordinator.m:2245)
7 Foundation 0x00000001ff4d8f48 -[NSFileCoordinator _invokeAccessor:thenCompletionHandler:] + 164 (NSFileCoordinator.m:470)
8 Foundation 0x00000001ff65fbc0 __73-[NSFileCoordinator coordinateReadingItemAtURL:options:error:byAccessor:]_block_invoke + 88 (NSFileCoordinator.m:483)
9 Foundation 0x00000001ff660c98 __85-[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:error:byAccessor:]_block_i... + 108 (NSFileCoordinator.m:1013)
10 Foundation 0x00000001ff4d9160 -[NSFileCoordinator(NSPrivate) _withAccessArbiter:invokeAccessor:orDont:andRelinquishAccessClaim:] + 452 (NSFileCoordinator.m:943)
11 Foundation 0x00000001ff4da138 -[NSFileCoordinator(NSPrivate) _coordinateReadingItemAtURL:options:error:byAccessor:] + 776 (NSFileCoordinator.m:1008)
12 Foundation 0x00000001ff4d9e24 -[NSFileCoordinator coordinateReadingItemAtURL:options:error:byAccessor:] + 76 (NSFileCoordinator.m:480)
13 WatchConnectivity 0x0000000220177b1c -[WCContentIndex loadContentIfNecessary] + 808 (WCContentIndex.m:66)
14 Foundation 0x00000001ff647ec4 __74-[NSFilePresenterXPCMessenger _makePresenter:observeChangeWithSubitemURL:]_block_invoke_2 + 48 (NSFileAccessArbiter.m:3360)
15 Foundation 0x00000001ff66662c __95-[NSOperationQueue(NSFileCoordinationSupport) _fc_addUncancellableOperationForReactorID:block... + 140 (NSFileCoordinator.m:2427)
16 Foundation 0x00000001ff581ef8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16 (NSOperation.m:1559)
17 Foundation 0x00000001ff48e3e0 -[NSBlockOperation main] + 72 (NSOperation.m:1578)
18 Foundation 0x00000001ff48d8c8 -[__NSOperationInternal _start:] + 740 (NSOperation.m:907)
19 Foundation 0x00000001ff583c7c __NSOQSchedule_f + 272 (NSOperation.m:2165)
20 libdispatch.dylib 0x00000001fe55ca38 _dispatch_call_block_and_release + 24 (init.c:1372)
21 libdispatch.dylib 0x00000001fe55d7d4 _dispatch_client_callout + 16 (object.m:511)
22 libdispatch.dylib 0x00000001fe502018 _dispatch_continuation_pop$VARIANT$mp + 412 (inline_internal.h:2441)
23 libdispatch.dylib 0x00000001fe5016dc _dispatch_async_redirect_invoke + 600 (queue.c:796)
24 libdispatch.dylib 0x00000001fe50e02c _dispatch_root_queue_drain + 372 (inline_internal.h:2482)
25 libdispatch.dylib 0x00000001fe50e8d0 _dispatch_worker_thread2 + 128 (queue.c:6072)
26 libsystem_pthread.dylib 0x00000001fe73d1b4 _pthread_wqthread + 464 (pthread.c:2361)
27 libsystem_pthread.dylib 0x00000001fe73fcd4 start_wqthread + 4
Thread 7:
0 libsystem_pthread.dylib 0x00000001fe73fcd0 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x00000001fe73fcd0 start_wqthread + 0
Thread 9 name:
Thread 9:
0 libsystem_kernel.dylib 0x00000001fe6b9f2c __psynch_mutexwait + 8
1 libsystem_pthread.dylib 0x00000001fe735a84 _pthread_mutex_firstfit_lock_wait + 92 (pthread_mutex.c:1228)
2 libsystem_pthread.dylib 0x00000001fe7359f4 _pthread_mutex_firstfit_lock_slow$VARIANT$mp + 272 (pthread_mutex.c:1304)
3 Foundation 0x00000001ff478d44 -[NSObject(NSKeyValueObserverRegistration) addObserver:forKeyPath:options:context:] + 64 (NSKeyValueObserving.m:68)
4 WatchConnectivity 0x00000002201650a0 -[WCSession onqueue_updateProgressForFileTransfer:progress:] + 280 (WCSession.m:517)
5 WatchConnectivity 0x0000000220164c9c __51-[WCSession onqueue_createProgressForFileTransfer:]_block_invoke_2 + 44 (WCSession.m:496)
6 Foundation 0x00000001ff581ef8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16 (NSOperation.m:1559)
7 Foundation 0x00000001ff48e3e0 -[NSBlockOperation main] + 72 (NSOperation.m:1578)
8 Foundation 0x00000001ff48d8c8 -[__NSOperationInternal _start:] + 740 (NSOperation.m:907)
9 Foundation 0x00000001ff583c7c __NSOQSchedule_f + 272 (NSOperation.m:2165)
10 libdispatch.dylib 0x00000001fe50b7f0 _dispatch_block_async_invoke2 + 104 (queue.c:518)
11 libdispatch.dylib 0x00000001fe55d7d4 _dispatch_client_callout + 16 (object.m:511)
12 libdispatch.dylib 0x00000001fe502018 _dispatch_continuation_pop$VARIANT$mp + 412 (inline_internal.h:2441)
13 libdispatch.dylib 0x00000001fe5016dc _dispatch_async_redirect_invoke + 600 (queue.c:796)
14 libdispatch.dylib 0x00000001fe50e02c _dispatch_root_queue_drain + 372 (inline_internal.h:2482)
15 libdispatch.dylib 0x00000001fe50e8d0 _dispatch_worker_thread2 + 128 (queue.c:6072)
16 libsystem_pthread.dylib 0x00000001fe73d1b4 _pthread_wqthread + 464 (pthread.c:2361)
17 libsystem_pthread.dylib 0x00000001fe73fcd4 start_wqthread + 4
Thread 10:
0 libsystem_pthread.dylib 0x00000001fe73fcd0 start_wqthread + 0
Thread 11:
0 libsystem_pthread.dylib 0x00000001fe73fcd0 start_wqthread + 0
Thread 12:
0 libsystem_pthread.dylib 0x00000001fe73fcd0 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x00000002833a9b60 x1: 0x000000016d0768d0 x2: 0x000000016d0768e0 x3: 0x0000000000000000
x4: 0x0000000000000003 x5: 0x0000000000000000 x6: 0x00000002833b5320 x7: 0x000000023665c000
x8: 0x0000000fbcae9b60 x9: 0x0000000000000008 x10: 0x00000001fea19e54 x11: 0x0000002a0000007f
x12: 0x0000000104918f60 x13: 0x000001a238c5ba41 x14: 0x0000000000000000 x15: 0x0000030000000302
x16: 0x0000000238c5ba40 x17: 0x00000001fea19d00 x18: 0x0000000000000000 x19: 0x000000016d0768d0
x20: 0x0000000000000003 x21: 0x000000022b98d9bf x22: 0x00000002833a9b60 x23: 0x000000023665c000
x24: 0x0000000000000000 x25: 0x0000000283d85bc0 x26: 0x0000000000000003 x27: 0x000000016d0768d0
x28: 0x0000000000000000 fp: 0x000000016d0768c0 lr: 0x00000001ff56a8d0
sp: 0x000000016d076890 pc: 0x00000001fdcf60e0 cpsr: 0x20000000

App crashing only on Device

This strange crash happens only running on Devices, while in simulator works normally.
Debugging line by line, i noticed that it occurs while i append a String Value to an Array of Doubles. To do that i convert the double using an extension:
extension String {
func toDouble() -> Double? {
return NSNumberFormatter().numberFromString(self)?.doubleValue
}
}
So the crashing line is:
litros.append(temp_litros.toDouble()!) //litros is my array and temp_litros my string
the error:
fatal error: unexpectedly found nil while unwrapping an Optional value
I really don't understand why it works in simulator and it doesn't on devices.
Anyone have an ideia what could be happening here? Thanks in advance!
Crash Report:
Incident Identifier: 49F378A2-E7D9-4985-B208-99F529AE8813
CrashReporter Key: fe58b29412047d4d8980b9cb66ae017f1c2db7d5
Hardware Model: iPhone7,2
Process: Nuvem [9479]
Path: /private/var/mobile/Containers/Bundle/Application/8989627A-4064-428C-888B-C09F00A3EA0B/Nuvem.app/Nuvem
Identifier: br.com.gimenez.Nuvem
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-07-23 18:07:12.529 -0300
Launch Time: 2015-07-23 18:07:05.037 -0300
OS Version: iOS 8.4 (12H143)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000100659474
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x0000000100659474 0x100598000 + 791668
1 Nuvem 0x00000001000b5110 Nuvem.GraficoViewController.viewDidLoad (Nuvem.GraficoViewController)() -> () (GraficoViewController.swift:69)
2 Nuvem 0x00000001000b5410 #objc Nuvem.GraficoViewController.viewDidLoad (Nuvem.GraficoViewController)() -> () (GraficoViewController.swift:0)
3 UIKit 0x0000000188d14c14 -[UIViewController loadViewIfRequired] + 688
4 UIKit 0x0000000188d14924 -[UIViewController view] + 28
5 UIKit 0x0000000188eb71ec -[UINavigationController _startCustomTransition:] + 708
6 UIKit 0x0000000188dc9e80 -[UINavigationController _startDeferredTransitionIfNeeded:] + 464
7 UIKit 0x0000000188dc9c4c -[UINavigationController __viewWillLayoutSubviews] + 52
8 UIKit 0x0000000188dc9bcc -[UILayoutContainerView layoutSubviews] + 196
9 UIKit 0x0000000188d116f0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 576
10 QuartzCore 0x000000018864ddb4 -[CALayer layoutSublayers] + 148
11 QuartzCore 0x000000018864881c CA::Layer::layout_if_needed(CA::Transaction*) + 316
12 QuartzCore 0x00000001886486c0 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
13 QuartzCore 0x0000000188647e54 CA::Context::commit_transaction(CA::Transaction*) + 272
14 QuartzCore 0x0000000188647bd4 CA::Transaction::commit() + 524
15 QuartzCore 0x00000001886412fc CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 76
16 CoreFoundation 0x00000001842542a0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
17 CoreFoundation 0x000000018425122c __CFRunLoopDoObservers + 356
18 CoreFoundation 0x000000018425160c __CFRunLoopRun + 832
19 CoreFoundation 0x000000018417d2d0 CFRunLoopRunSpecific + 392
20 GraphicsServices 0x000000018dbd36f8 GSEventRunModal + 164
21 UIKit 0x0000000188d7af3c UIApplicationMain + 1484
22 Nuvem 0x00000001000ad9b8 main (AppDelegate.swift:14)
23 libdyld.dylib 0x0000000196612a04 start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x0000000196710c24 kevent64 + 8
1 libdispatch.dylib 0x00000001965f5e6c _dispatch_mgr_invoke + 272
2 libdispatch.dylib 0x00000001965e7998 _dispatch_mgr_thread + 48
Thread 2:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 5:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x0000000196710e0c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000196710c84 mach_msg + 68
2 CoreFoundation 0x0000000184253720 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184251674 __CFRunLoopRun + 936
4 CoreFoundation 0x000000018417d2d0 CFRunLoopRunSpecific + 392
5 CFNetwork 0x0000000183c5a590 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436
6 Foundation 0x000000018519ddb4 __NSThread__main__ + 1068
7 libsystem_pthread.dylib 0x00000001967c7dc4 _pthread_body + 160
8 libsystem_pthread.dylib 0x00000001967c7d20 _pthread_start + 156
9 libsystem_pthread.dylib 0x00000001967c4ef4 thread_start + 0
Thread 7 name: com.apple.CFSocket.private
Thread 7:
0 libsystem_kernel.dylib 0x000000019672b498 __select + 8
1 CoreFoundation 0x0000000184259124 __CFSocketManager + 668
2 libsystem_pthread.dylib 0x00000001967c7dc4 _pthread_body + 160
3 libsystem_pthread.dylib 0x00000001967c7d20 _pthread_start + 156
4 libsystem_pthread.dylib 0x00000001967c4ef4 thread_start + 0
Thread 8:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 9:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 10:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 11:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 12:
0 libsystem_kernel.dylib 0x0000000196710e0c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000196710c84 mach_msg + 68
2 CoreFoundation 0x0000000184253720 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184251674 __CFRunLoopRun + 936
4 CoreFoundation 0x000000018417d2d0 CFRunLoopRunSpecific + 392
5 Foundation 0x00000001850b54c4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 312
6 Foundation 0x000000018510f80c -[NSRunLoop(NSRunLoop) run] + 92
7 Nuvem 0x00000001000e64f8 +[PBAFURLConnectionOperation networkRequestThreadEntryPoint:] (PBAFURLConnectionOperation.m:151)
8 Foundation 0x000000018519ddb4 __NSThread__main__ + 1068
9 libsystem_pthread.dylib 0x00000001967c7dc4 _pthread_body + 160
10 libsystem_pthread.dylib 0x00000001967c7d20 _pthread_start + 156
11 libsystem_pthread.dylib 0x00000001967c4ef4 thread_start + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000100588b80 x1: 0x00000001742f6a00 x2: 0x0000000000000008 x3: 0x0000000196765a74
x4: 0x000000016fd80e38 x5: 0x0000000000000020 x6: 0x0000000000000000 x7: 0x0000000000000fa0
x8: 0x00000001742f6b80 x9: 0x0000000000000000 x10: 0x0000000100584800 x11: 0x00000000005d0bda
x12: 0x00000000fffffff2 x13: 0x00000001887c5480 x14: 0x0000000000000053 x15: 0x000000000000004d
x16: 0x00000001967bda50 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000144d85300
x20: 0x00000001978b7720 x21: 0x0000000000000008 x22: 0x0000000000000008 x23: 0x0000000000000000
x24: 0x0000000000000006 x25: 0x000000000004ffff x26: 0x0000000144e161d0 x27: 0x000000016fd810e9
x28: 0x0000000144d85300 fp: 0x000000016fd80ed0 lr: 0x0000000100659474
sp: 0x000000016fd80ec0 pc: 0x0000000100659474 cpsr: 0x60000000
By default NSNumberFormatter converts data according to current locale settings. In case of simulator it uses US locale and "." as decimal separator. In case of your device it uses "," as separator so it can't convert your data and numberFromString returns nil.
Try this:
extension String {
func toDouble() -> Double? {
let formatter = NSNumberFormatter()
formatter.locale = NSLocale(localeIdentifier: "en_US")
return formatter.numberFromString(self)?.doubleValue
}
}

Unknown exception and crash

My application crashes when I try to scroll the tableview very fast or reload the data from remote. Everything seems to be working fine, when I let the remote fetch happen first and then scroll the tableview. I have no idea what the crash log below means. It just works fine sometimes and crashes sometime.
Incident Identifier: 710A120C-97E3-45C8-A7B2-E6A7BD98BC1A
CrashReporter Key: 8bd54d8428128b9e6b8c04d59b86c40cccf33457
Hardware Model: iPhone5,2
Process: MyApp [5294]
Path: /var/mobile/Applications/B6ED5B19-B8D7-4146-90A2-F709AE35292F/MyApp.app/MyApp
Identifier: MyApp
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-02-26 16:45:27.693 +0200
OS Version: iOS 6.1.2 (10B146)
Report Version: 104
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 1
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libobjc.A.dylib 0x3c3f658a _cache_getImp + 10
1 libobjc.A.dylib 0x3c3f6fa0 lookUpMethod + 24
2 libobjc.A.dylib 0x3c3f81e2 class_respondsToSelector + 26
3 CoreFoundation 0x3470a750 objectIsKindOfClass + 32
4 CoreFoundation 0x3470a49c __handleUncaughtException + 64
5 libobjc.A.dylib 0x3c3fba46 _objc_terminate() + 126
6 libc++abi.dylib 0x3be48118 safe_handler_caller(void (*)()) + 76
7 libc++abi.dylib 0x3be481b0 std::terminate() + 16
8 libc++abi.dylib 0x3be49626 __cxa_rethrow + 90
9 libobjc.A.dylib 0x3c3fb9b0 objc_exception_rethrow + 8
10 CoreFoundation 0x3465129c CFRunLoopRunSpecific + 452
11 CoreFoundation 0x346510c4 CFRunLoopRunInMode + 100
12 GraphicsServices 0x3822f336 GSEventRunModal + 70
13 UIKit 0x3656d2b4 UIApplicationMain + 1116
14 MyApp 0x000910a2 0x44000 + 315554
15 MyApp 0x0004668c 0x44000 + 9868
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1 Crashed:
0 libsystem_kernel.dylib 0x3c8df5d0 kevent64 + 24
1 libdispatch.dylib 0x3c81ad22 _dispatch_mgr_invoke + 806
2 libdispatch.dylib 0x3c816374 _dispatch_mgr_thread + 32
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x3c8dee30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c8defd0 mach_msg + 48
2 CoreFoundation 0x346df2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x346de02c __CFRunLoopRun + 900
4 CoreFoundation 0x34651238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x346510c4 CFRunLoopRunInMode + 100
6 WebCore 0x3a650390 RunWebThread(void*) + 440
7 libsystem_c.dylib 0x3c8480de _pthread_start + 306
8 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x3c8dee30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c8defd0 mach_msg + 48
2 CoreFoundation 0x346df2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x346de02c __CFRunLoopRun + 900
4 CoreFoundation 0x34651238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x346510c4 CFRunLoopRunInMode + 100
6 Foundation 0x34f9e888 +[NSURLConnection(Loader) _resourceLoadLoop:] + 304
7 Foundation 0x3502222c __NSThread__main__ + 968
8 libsystem_c.dylib 0x3c8480de _pthread_start + 306
9 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 4:
0 libsystem_kernel.dylib 0x3c8efd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3c83dad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3c83d7f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3c83d680 start_wqthread + 4
Thread 5:
0 libsystem_kernel.dylib 0x3c8dee30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c8defd0 mach_msg + 48
2 CoreFoundation 0x346df2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x346de02c __CFRunLoopRun + 900
4 CoreFoundation 0x34651238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x346510c4 CFRunLoopRunInMode + 100
6 Foundation 0x34f755be -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x35018c40 -[NSRunLoop(NSRunLoop) run] + 76
8 MyApp 0x0016b900 0x44000 + 1210624
9 Foundation 0x3502222c __NSThread__main__ + 968
10 libsystem_c.dylib 0x3c8480de _pthread_start + 306
11 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 6:
0 libsystem_kernel.dylib 0x3c8dee30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c8defd0 mach_msg + 48
2 CoreFoundation 0x346df2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x346de02c __CFRunLoopRun + 900
4 CoreFoundation 0x34651238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x346510c4 CFRunLoopRunInMode + 100
6 Foundation 0x34f755be -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250
7 Foundation 0x35018c40 -[NSRunLoop(NSRunLoop) run] + 76
8 MyApp 0x000e63d0 0x44000 + 664528
9 Foundation 0x3502222c __NSThread__main__ + 968
10 libsystem_c.dylib 0x3c8480de _pthread_start + 306
11 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 7 name: com.apple.CFSocket.private
Thread 7:
0 libsystem_kernel.dylib 0x3c8ef594 __select + 20
1 CoreFoundation 0x346e3474 __CFSocketManager + 676
2 libsystem_c.dylib 0x3c8480de _pthread_start + 306
3 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 8:
0 libsystem_kernel.dylib 0x3c8dee30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c8defd0 mach_msg + 48
2 CoreFoundation 0x346df2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x346de02c __CFRunLoopRun + 900
4 CoreFoundation 0x34651238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x346afc46 CFRunLoopRun + 94
6 MyApp 0x00115d7e 0x44000 + 859518
7 Foundation 0x3502222c __NSThread__main__ + 968
8 libsystem_c.dylib 0x3c8480de _pthread_start + 306
9 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 9:
0 libsystem_kernel.dylib 0x3c8efd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3c83dad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3c83d7f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3c83d680 start_wqthread + 4
Thread 10:
0 libsystem_kernel.dylib 0x3c8efd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3c83dad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3c83d7f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3c83d680 start_wqthread + 4
Thread 11 name: JavaScriptCore::BlockFree
Thread 11:
0 libsystem_kernel.dylib 0x3c8ef08c __psynch_cvwait + 24
1 libsystem_c.dylib 0x3c840afc _pthread_cond_wait + 644
2 libsystem_c.dylib 0x3c840870 pthread_cond_timedwait + 40
3 JavaScriptCore 0x38625df6 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 102
4 JavaScriptCore 0x38738532 JSC::BlockAllocator::blockFreeingThreadMain() + 78
5 JavaScriptCore 0x3874b030 WTF::wtfThreadEntryPoint(void*) + 12
6 libsystem_c.dylib 0x3c8480de _pthread_start + 306
7 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 12 name: JavaScriptCore::Marking
Thread 12:
0 libsystem_kernel.dylib 0x3c8ef08c __psynch_cvwait + 24
1 libsystem_c.dylib 0x3c840afc _pthread_cond_wait + 644
2 libsystem_c.dylib 0x3c84acf8 pthread_cond_wait + 36
3 JavaScriptCore 0x386cb6dc JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode) + 140
4 JavaScriptCore 0x386cb620 JSC::MarkStackThreadSharedData::markingThreadMain() + 140
5 JavaScriptCore 0x3874b030 WTF::wtfThreadEntryPoint(void*) + 12
6 libsystem_c.dylib 0x3c8480de _pthread_start + 306
7 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 13 name: WebCore: CFNetwork Loader
Thread 13:
0 libsystem_kernel.dylib 0x3c8dee30 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3c8defd0 mach_msg + 48
2 CoreFoundation 0x346df2b6 __CFRunLoopServiceMachPort + 126
3 CoreFoundation 0x346de02c __CFRunLoopRun + 900
4 CoreFoundation 0x34651238 CFRunLoopRunSpecific + 352
5 CoreFoundation 0x346510c4 CFRunLoopRunInMode + 100
6 WebCore 0x3a6eaccc WebCore::runLoaderThread(void*) + 140
7 JavaScriptCore 0x3874b030 WTF::wtfThreadEntryPoint(void*) + 12
8 libsystem_c.dylib 0x3c8480de _pthread_start + 306
9 libsystem_c.dylib 0x3c847fa4 thread_start + 4
Thread 14:
0 libsystem_kernel.dylib 0x3c8efd98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x3c83dad6 _pthread_workq_return + 14
2 libsystem_c.dylib 0x3c83d7f2 _pthread_wqthread + 362
3 libsystem_c.dylib 0x3c83d680 start_wqthread + 4
Thread 1 crashed with ARM Thread State (32-bit):
r0: 0x00000004 r1: 0x00000000 r2: 0x00000000 r3: 0x0042c714
r4: 0x00000001 r5: 0x00000000 r6: 0x0042c744 r7: 0x0042c764
r8: 0x00000000 r9: 0x0042c6c8 r10: 0x3e3a2188 r11: 0x00000002
ip: 0x00000171 sp: 0x0042c6d0 lr: 0x3c81ad27 pc: 0x3c8df5d0
cpsr: 0x60000010
I would be really happy if anybody could explain me what this crash log could relate to and how I could solve it. Many many thanks to all those who are willing to help others.
Seems to me that it's dangling pointer, and you're sending message to it.
As MikeD said, use breakpoint on exception if it can help. But it's not 100% reliable since you get a SIGSEGV and not a SIGABRT. And the exception throw is not really the cause of the crash, just a border effect.
Edit
Ok: In your log crash, it says that libsystem_kernel.dylib has crashed in a kevent call. That won't help you since this is private and opaque, and you can be 100% sure this lib do its job well. This can appears because you have used (unintentionally) a space memory where you should not write into. Like with a dangling pointer. Let's say you have allocated memory to 0x2000 and you have a pointer pointing to this memory, if you freed the memory but still using this pointer to this address, if someone else (like libsystem_kernel) use it, and you change some data in the same time (because of your dangling pointer). Then the other side will use data corrupted, and some random behavior will occur. That's why if you analyze literally your crash log, you'll do wrong statement. Because kevent from libSystem is stable.
By the way you have thread 1 who crashed, but look into thread 0, it was trying to raise an exception too, but it didn't get time to do it. This can occur because of data corrupted too.
That's why I recommend you to make another crash, and compare it to this one. If the crash log are the same, then i was totally wrong. If the crash log are different, this is a dangling pointer.

What caused this iPhone crash log?

Im somewhat stuck, and need to have this resolved because one of my apps is exhibiting random crashes which cannot always be reproduced. This is one of the crash logs:
Incident Identifier: 59865612-9F00-44EA-9474-2BF607AD662E
CrashReporter Key: bea17b7f4237e78a13ce60449d694621d0f16a44
Hardware Model: iPhone2,1
Process: APPNAME [82]
Path: /var/mobile/Applications/ACE9A1A2-F1BE-43E0-9775-1291723D4C4A/APPNAME.app/APPNAME
Identifier: APPNAME
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-05-21 19:10:27.893 +0100
OS Version: iPhone OS 4.3.3 (8J2)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000009
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x33b24c98 objc_msgSend + 16
1 Foundation 0x344507b4 __NSFireTimer + 112
2 CoreFoundation 0x3039ca40 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
3 CoreFoundation 0x3039eec4 __CFRunLoopDoTimer + 844
4 CoreFoundation 0x3039f83e __CFRunLoopRun + 1082
5 CoreFoundation 0x3032febc CFRunLoopRunSpecific + 224
6 CoreFoundation 0x3032fdc4 CFRunLoopRunInMode + 52
7 GraphicsServices 0x3448e418 0x3448a000 + 17432
8 GraphicsServices 0x3448e4c4 0x3448a000 + 17604
9 UIKit 0x33f3cd62 -[UIApplication _run] + 398
10 UIKit 0x33f3a800 UIApplicationMain + 664
11 APPNAME 0x00002d88 0x1000 + 7560
12 APPNAME 0x00002d3c 0x1000 + 7484
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x36100fbc kevent + 24
1 libdispatch.dylib 0x33d0b032 _dispatch_mgr_invoke + 706
2 libdispatch.dylib 0x33d0c03a _dispatch_queue_invoke + 86
3 libdispatch.dylib 0x33d0b5ea _dispatch_worker_thread2 + 186
4 libsystem_c.dylib 0x33e0a58a _pthread_wqthread + 258
5 libsystem_c.dylib 0x33e0abbc start_wqthread + 0
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x360fdc00 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x360fd758 mach_msg + 44
2 CoreFoundation 0x3039d2b8 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x3039f562 __CFRunLoopRun + 350
4 CoreFoundation 0x3032febc CFRunLoopRunSpecific + 224
5 CoreFoundation 0x3032fdc4 CFRunLoopRunInMode + 52
6 WebCore 0x34c2627e RunWebThread(void*) + 382
7 libsystem_c.dylib 0x33e0930a _pthread_start + 242
8 libsystem_c.dylib 0x33e0abb4 thread_start + 0
Thread 3:
0 libsystem_kernel.dylib 0x360fdc00 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x360fd758 mach_msg + 44
2 CoreFoundation 0x3039d2b8 __CFRunLoopServiceMachPort + 88
3 CoreFoundation 0x3039f562 __CFRunLoopRun + 350
4 CoreFoundation 0x3032febc CFRunLoopRunSpecific + 224
5 CoreFoundation 0x3032fdc4 CFRunLoopRunInMode + 52
6 Foundation 0x343ea7f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
7 Foundation 0x343dd382 -[NSThread main] + 38
8 Foundation 0x3444f5c6 __NSThread__main__ + 966
9 libsystem_c.dylib 0x33e0930a _pthread_start + 242
10 libsystem_c.dylib 0x33e0abb4 thread_start + 0
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x360ffc60 __select + 20
1 CoreFoundation 0x303a28f2 __CFSocketManager + 582
2 libsystem_c.dylib 0x33e0930a _pthread_start + 242
3 libsystem_c.dylib 0x33e0abb4 thread_start + 0
Thread 5:
0 libsystem_kernel.dylib 0x361003ec __workq_kernreturn + 8
1 libsystem_c.dylib 0x33e0a6d8 _pthread_wqthread + 592
2 libsystem_c.dylib 0x33e0abbc start_wqthread + 0
Thread 6:
0 libsystem_kernel.dylib 0x361003ec __workq_kernreturn + 8
1 libsystem_c.dylib 0x33e0a6d8 _pthread_wqthread + 592
2 libsystem_c.dylib 0x33e0abbc start_wqthread + 0
Thread 7:
0 libsystem_kernel.dylib 0x361003ec __workq_kernreturn + 8
1 libsystem_c.dylib 0x33e0a6d8 _pthread_wqthread + 592
2 libsystem_c.dylib 0x33e0abbc start_wqthread + 0
Thread 8:
0 libsystem_kernel.dylib 0x361003ec __workq_kernreturn + 8
1 libsystem_c.dylib 0x33e0a6d8 _pthread_wqthread + 592
2 libsystem_c.dylib 0x33e0abbc start_wqthread + 0
Thread 0 crashed with ARM Thread State:
r0: 0x04246810 r1: 0x33738814 r2: 0x042b3704 r3: 0x00000000
r4: 0x00000001 r5: 0x00000001 r6: 0x00259330 r7: 0x2fdfeb30
r8: 0x002593d0 r9: 0x00000000 r10: 0x04241720 r11: 0x00000000
ip: 0x3fa3f4e8 sp: 0x2fdfea60 lr: 0x349077bb pc: 0x33dfcc98
cpsr: 0x280f0030
Can someone offer a suggestion as to what might be the cause ?
Thanks!
It looks like you have a timer firing and trying to send a message to an object that has been dealloc'ed.
Keyline here is: Exception Type: EXC_BAD_ACCESS (SIGBUS)
It occurs, when you are trying to access an object that has been released earlier. Since, you are trying to access an object in a timer's callback, what is possibly happening is that while the timer responds for an object, the object in question has been released.
You can track the object by enabling the NSZombie environment variable.
When you create a NSTimer it is critical that you hold on to the ref and then invalidate it if the object to be called goes away. Like so:
[self.bugZapTimer invalidate];
self.bugZapTimer = [NSTimer timerWithTimeInterval: 0.1
target: self
selector: #selector(bugZapTimer:)
userInfo: NULL
repeats: FALSE];
[[NSRunLoop currentRunLoop] addTimer:self.bugZapTimer forMode: NSDefaultRunLoopMode];
Then, in your dealloc method you must do:
[self.bugZapTimer invalidate];
self.bugZapTimer = nil;