iOS Framework Crash in Crashyltics with strange characters - ios

There are a number of crashes being reported on Crashlytics (Fabric.io) for my app which is live (in Production). I (and my few of my friends) also use the same app regularly but have never seen any crash.
In detail- As per the crashlytics dashboard, the crash is caused in a Framework (also developed by me but cannot add crashytlics there - reference this) and the logs have below details -
Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x1a59e2a70 <redacted> + 384
1 (Missing) 0x0 (Missing)
2 (Missing) 0x0 (Missing)
3 XtraIntegration 0x1061e609c $s15XtraIntegration18QrUIViewControllerC05fetchC0yyFyAA0A6ResultOyAA0A8CardInfoVAA0A5ErrorOGcfU_ + 1728
4 XtraIntegration 0x106136f7c $s15XtraIntegration0A7SessionC03getA8CardInfo10completionyyAA0A6ResultOyAA0aeF0VAA0A5ErrorOGc_tFyAGySSAKGXEfU_yAGySo12NSDictionaryCAKGcfU_ + 1104
5 XtraIntegration 0x1063438c0 $s15XtraIntegration13ServiceClientC11requestJSON_10completionyAA21URLRequestConvertible_p_yAA0A6ResultOySo12NSDictionaryCAA0A5ErrorOGctFZy10Foundation4DataVSg_So13NSURLResponseCSgs0L0_pSgtcfU_yycfU_ + 1420
6 XtraIntegration 0x1061b6e34 $sIeg_IeyB_TR + 52
7 libdispatch.dylib 0x197f63bb0 <redacted> + 32
8 (Missing) 0x0 (Missing)
9 (Missing) 0x4b16b68197f70c00 (Missing)
10 (Missing) 0x621f120198239000 (Missing)
11 (Missing) 0x1a4d4a8198233b00 (Missing)
12 (Missing) 0x2645158198233000 (Missing)
13 (Missing) 0x0 (Missing)
14 (Missing) 0x494e46819c353800 (Missing)
15 (Missing) 0x0 (Missing)
16 libdyld.dylib 0x1980b2f30 <redacted> + 4
Also, whenever I get this crash, I see below in my report -
The screenshot says, there is a Fatal error while trying to unwrapping a nil value. And I see some strange characters like question marks.
Putting these things together, I assume I am getting an error in my Framework ViewController file (QRUIViewController in the logs) but I am not unwrapping any nil value in my whole code in that file.
Can anyone please help me understand what is going on with the app?
UPDATE
Similar Crash with below logs observed again
Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x1af933b00 specialized _fatalErrorMessage(_:_:file:line:flags:) + 296
1 libswiftCore.dylib 0x1af7583e0 _fatalErrorMessage(_:_:file:line:flags:) + 16
2 XtraIntegration 0x1025dbb84 $s15XtraIntegration18QrUIViewControllerC03getA2QR12xtraCardInfo7sessionyAA0aiJ0V_AA0A7SessionCtFyAA0A6ResultOyAA0aI13ImageResponseVAA0A5ErrorOGcfU0_ + 460
3 XtraIntegration 0x10252b97c $s15XtraIntegration0A7SessionC03getA9CardImage9cardToken0G6PngUrl10completionySS_SSyAA0A6ResultOyAA0aeF8ResponseVAA0A5ErrorOGctFyAIy10Foundation4DataVAMGcfU_ + 568
4 XtraIntegration 0x1025fc3c8 $s15XtraIntegration17ServiceClientDataC11requestJSON_10completionyAA21URLRequestConvertible_p_yAA0A6ResultOy10Foundation0E0VAA0A5ErrorOGctFZyAKSg_So13NSURLResponseCSgs0M0_pSgtcfU_yycfU_ + 796
5 XtraIntegration 0x1025aae34 $sIeg_IeyB_TR + 52
6 libdispatch.dylib 0x18171ca38 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x18171d7d4 _dispatch_client_callout + 16
8 libdispatch.dylib 0x1816cb008 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1068
9 CoreFoundation 0x181c7032c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
10 CoreFoundation 0x181c6b264 __CFRunLoopRun + 1924
11 CoreFoundation 0x181c6a7c0 CFRunLoopRunSpecific + 436
12 GraphicsServices 0x183e6b79c GSEventRunModal + 104
13 UIKitCore 0x1ae5efc38 UIApplicationMain + 212
14 Xtra 0x10124a350 main + 69 (AppDelegate.swift:69)
15 libdyld.dylib 0x18172e8e0 start + 4

Related

Fabric/Crashlytics stopped showing adequate stacktrace for iOS app

My app is integrated with Fabric, and I was able to see crash stack traces for a long time. All of a sudden recently I noticed that the crash reports stopped making sense. All I see for my app stack trace is this:
Crashed: com.apple.main-thread
0 myApp 0x102a005b0 _hidden#5298_ (__hidden#5526_:499)
1 myApp 0x102a018e0 _hidden#5310_ (__hidden#5526_:346)
2 myApp 0x102a0f1e4 _hidden#5361_ (__hidden#5526_)
3 myApp 0x102bc00e0 _hidden#1801_ (__hidden#19024_)
4 libdispatch.dylib 0x180e48b24 _dispatch_call_block_and_release + 24
5 libdispatch.dylib 0x180e48ae4 _dispatch_client_callout + 16
6 libdispatch.dylib 0x180e89d60 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 964
7 CoreFoundation 0x1814ff070 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
8 CoreFoundation 0x1814fcbc8 __CFRunLoopRun + 2272
9 CoreFoundation 0x18141cda8 CFRunLoopRunSpecific + 552
10 GraphicsServices 0x1833ff020 GSEventRunModal + 100
11 UIKit 0x18b3fd78c UIApplicationMain + 236
12 myApp 0x10299bc14 main (__hidden#1255_:18)
13 libdyld.dylib 0x180eadfc0 start + 4
Fabric is not reporting any dSYMs missing or anything.
Does anyone know what's going on and how to fix this?

iOS app crashing in release but not in development and Swift symbols are not resolved

My app is working perfectly fine in development but switching to production / AdHoc release it crashes on the transition to the third UIViewController of my application flow.
Between the build there shouldn't be any difference. I have retrieved the log from the Devices window:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000001000d49ac
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 MYAPP 0x00000001000d49ac 0x100010000 + 805292
1 UIKit 0x00000001868a8954 -[UIViewController loadViewIfRequired] + 688
2 UIKit 0x00000001868a8664 -[UIViewController view] + 28
3 UIKit 0x0000000186f9c1cc -[_UIFullscreenPresentationController _setPresentedViewController:] + 72
4 UIKit 0x0000000186ba378c -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 116
5 UIKit 0x0000000186bbeb4c -[UIViewController _presentViewController:withAnimationController:completion:] + 1968
6 UIKit 0x0000000186bc0f64 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 116
7 UIKit 0x0000000186995c48 -[UIViewController presentViewController:animated:completion:] + 212
8 MYAPP 0x0000000100090dcc 0x100010000 + 527820
9 MYAPP 0x0000000100090bd0 0x100010000 + 527312
10 PromiseKit 0x000000010032a9f4 0x1002e8000 + 272884
11 PromiseKit 0x00000001002ee820 0x1002e8000 + 26656
12 libdispatch.dylib 0x00000001936c1990 _dispatch_call_block_and_release + 20
13 libdispatch.dylib 0x00000001936c1950 _dispatch_client_callout + 12
14 libdispatch.dylib 0x00000001936c6208 _dispatch_main_queue_callback_4CF + 1604
15 CoreFoundation 0x00000001820522e8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
16 CoreFoundation 0x0000000182050390 __CFRunLoopRun + 1488
17 CoreFoundation 0x0000000181f7d1f0 CFRunLoopRunSpecific + 392
18 GraphicsServices 0x000000018b39f6f8 GSEventRunModal + 164
19 UIKit 0x000000018690e108 UIApplicationMain + 1484
20 MYAPP 0x00000001000be820 0x100010000 + 714784
21 libdyld.dylib 0x00000001936eea04 start + 0
What is bugging me:
There is a clear inconsistency between the environments I am working on.
The calls from MYAPP doesn't seem to be linked to any component / method call. I'm working with Swift maybe it does cause problem to resolve symbols. Which could make sense since PromiseKit calls are also unresolved.
I have no idea about how to debug this, not even about how to put log everywhere (because I wouldn't know how to get them).
Any help is welcome!
In Build settings, try changing Swift compiler -> Optimization Level -> Release to None. There's still a bug where sometimes the compiler messes up closures when optimizations are on. Maybe that's what's happening to you.

Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000000000003

I have completed developing a Swift application using iOS SDK 8.1 and it is now being tested by external testers via TestFlight as beta. Recently, I have received a crash report via Crashlytics with the following stack trace:
0 libobjc.A.dylib objc_msgSend + 28 setRefreshControlState:
1 libdispatch.dylib _dispatch_call_block_and_release + 24
2 libdispatch.dylib _dispatch_client_callout + 16
3 libdispatch.dylib _dispatch_after_timer_callback + 92
4 libdispatch.dylib _dispatch_client_callout + 16
5 libdispatch.dylib _dispatch_source_latch_and_call + 792
6 libdispatch.dylib _dispatch_source_invoke + 288
7 libdispatch.dylib _dispatch_main_queue_callback_4CF + 424
8 CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
9 CoreFoundation __CFRunLoopRun + 1492
10 CoreFoundation CFRunLoopRunSpecific + 396
11 GraphicsServices GSEventRunModal + 168
12 UIKit UIApplicationMain + 1488
13 opsgenie AppDelegate.swift line 0 top_level_code
14 opsgenie AppDelegate.swift line 0 main
15 libdyld.dylib start + 4
I could not replicate the issue neither on my own device, nor on simulator and this crash has happened only once in three weeks. I have no idea about what may cause this crash and what this crash report means. I have also analysed my custom Crashlytics logs which are generated, however, everything seems normal and I still have no idea about the problem. I know it is nearly impossible to understand the problem by only having this stack trace on hand, but any recommendation/idea would be very useful.
you are using pull to refresh , while the content is loading user is going to another view hence the crash.try to replicate it on a slow connection while doing pull to refresh.you can make sure you handle startRefreshing, endRefreshing methods properly

iOS: Need help figuring out this crash "Crashed: NSOperationQueue Serial Queue EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000"

This is the crash report I received from crashlytics and I don't have the slightest clue on what it means or what to do about this. Any tips or suggestions will be appreciated.
Thread : Crashed: NSOperationQueue Serial Queue
0 libsystem_platform.dylib 0x3baef4da _platform_memmove$VARIANT$Swift + 185
1 ??? 0x0000000c
2 DataDetectorsCore 0x350b26bb DDTokenCacheGetItemAtIndexCreateIfNeeded + 90
3 DataDetectorsCore 0x350b2635 DDTokenCacheGetTokensAtPosition + 1084
4 DataDetectorsCore 0x350ae41d _DDScannerHandleState + 472
5 DataDetectorsCore 0x350aea71 _DDScannerHandleState + 2092
6 DataDetectorsCore 0x350addf1 DDScannerScanQuery + 328
7 DataDetectorsUI 0x350c8f7d -[DDOperation main] + 288
8 Foundation 0x31664aa5 -[__NSOperationInternal _start:] + 772
9 Foundation 0x3170896d __NSOQSchedule_f + 60
10 libdispatch.dylib 0x3b9c5e7b _dispatch_queue_drain + 374
11 libdispatch.dylib 0x3b9c2f93 _dispatch_queue_invoke + 42
12 libdispatch.dylib 0x3b9c6745 _dispatch_root_queue_drain + 76
13 libdispatch.dylib 0x3b9c69c5 _dispatch_worker_thread2 + 56
14 libsystem_pthread.dylib 0x3baf0dff _pthread_wqthread + 298
Do you have any part of your app where the user clicks on a URL or specifies a URL which is then handled by your app, or by the system on behalf of your app. The subsystem that does this is DataDetectorsCore.
If you have code around that area, it would be a good idea to add log messages, assert checks, validation, and unit test code.
It might be that you are receiving maliciously crafted URLs; here is an example but for the Mac platform: http://nakedsecurity.sophos.com/2013/02/06/anatomy-of-a-bug-how-mac-os-x-chokes-if-you-type-file/

How can I debug this crash log

I get this crash log from my device log after that my app is crashed. Before crash I clicked on cancel button from search bar inside UITableView.
How can I understand what and where is the problem ?
how can I debug this kind of log from production device?
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3b74b1fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3b7b2a4e pthread_kill + 54
2 libsystem_c.dylib 0x3b6fc028 abort + 72
3 libc++abi.dylib 0x3ab4a98a abort_message + 70
4 libc++abi.dylib 0x3ab636e2 default_terminate_handler() + 250
5 libobjc.A.dylib 0x3b19b936 _objc_terminate() + 190
6 libc++abi.dylib 0x3ab611b0 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x3ab60d12 __cxa_rethrow + 98
8 libobjc.A.dylib 0x3b19b80a objc_exception_rethrow + 38
9 CoreFoundation 0x30d724e2 CFRunLoopRunSpecific + 638
10 CoreFoundation 0x30d7224e CFRunLoopRunInMode + 102
11 GraphicsServices 0x35aac2e6 GSEventRunModal + 134
12 UIKit 0x33627840 UIApplicationMain + 1132
13 MYAPPNAME 0x000ffc44 0xfa000 + 23620
14 libdyld.dylib 0x3b694ab4 start + 0
------- EDITED ------
i get Last Exception Backtrace:
0 CoreFoundation 0x30e3ee7e __exceptionPreprocess + 126
1 libobjc.A.dylib 0x3b19b6c2 objc_exception_throw + 34
2 CoreFoundation 0x30e3ed50 +[NSException raise:format:arguments:] + 100
3 Foundation 0x317e70aa -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 86
4 UIKit 0x33796348 -[UITableView _endCellAnimationsWithContext:] + 7940
5 MYAPPNAME 0x00233972 0xfa000 + 1284466
6 MYAPPNAME 0x00232e3c 0xfa000 + 1281596
7 MYAPPNAME 0x00232fd8 0xfa000 + 1282008
8 MYAPPNAME 0x002319d4 0xfa000 + 1276372
9 Foundation 0x3181933a __NSFireDelayedPerform + 410
10 CoreFoundation 0x30e09e7a
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 10
11 CoreFoundation 0x30e09a96 __CFRunLoopDoTimer + 790
12 CoreFoundation 0x30e07e1e __CFRunLoopRun + 1214
13 CoreFoundation 0x30d7246c CFRunLoopRunSpecific + 520
14 CoreFoundation 0x30d7224e CFRunLoopRunInMode + 102
15 GraphicsServices 0x35aac2e6 GSEventRunModal + 134
16 UIKit 0x33627840 UIApplicationMain + 1132
17 MYAPPNAME 0x000ffc44 0xfa000 + 23620
18 libdyld.dylib 0x3b694ab2 tlv_initializer + 2
The crash happened because of an unhandled exception.
While symbolicating the crash report with the Xcode organizer usually helps, it doesn't help in this case, since stack frame 13 will only show something like main (main.m:14).
If the crash report doesn't contain an Last Exception Backtrace section, the report is basically meaningless.
Try to reproduce the crash while running the app with the debugger or integrate a 3rd party crash report solution that is able to provide the Last Exception Backtrace and also the Application Information section which gives you the detailed exception error.
There are many 3rd party solutions out there, I won't recommend any, since I would be biased :)
Update: As you now provided the Last Exception Backtrace it shows that there is an Assertion triggered when a tableview animation is ending. Once you symbolicates the crash report you'll see which lines of code in your app are causing this.

Resources