smartlook / smartlook-mobile-issue-tracker

Official Smartlook issue tracker for mobile SDKs
4 stars 0 forks source link

Crash reported by Crashlytics related to Smartlook(1.8.1) #119

Closed ishch closed 2 years ago

ishch commented 3 years ago

Platform iOS

Technology Swift

Build instructions [optional] n/a

Rendering [optional] n/a

Affected devices [optional] n/a

Smartlook SDK version 1.8.1

Summary I integrated the SDK. Videos are being recorded but Crashlytics reports crashes related to Smartlool

Steps to reproduce [optional] n/a

Example Project [optional] n/a

Relevant logs and/or screenshots

1. Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashed: com.apple.main-thread
0  Smartlook                      0xd3fe4 _hidden#1271_ + 34 (__hidden#16377_:34)
1  Smartlook                      0xca658 _hidden#15808_ + 40 (__hidden#15828_:40)
2  Smartlook                      0xca2e4 _hidden#15804_ + 799860 (__hidden#925_:799860)
3  Smartlook                      0x7da8 _hidden#290_ + 29 (__hidden#311_:29)
4  UIKitCore                      0x19c108 -[UIViewController _setViewAppearState:isAnimating:] + 832
5  UIKitCore                      0x282fb4 -[UIViewController __viewDidAppear:] + 168
6  UIKitCore                      0x209120 -[UIViewController _endAppearanceTransition:] + 248
7  UIKitCore                      0x2222e0 __48-[UIPresentationController transitionDidFinish:]_block_invoke + 140
8  UIKitCore                      0x30feec -[_UIAfterCACommitBlock run] + 64
9  UIKitCore                      0x22a384 -[_UIAfterCACommitQueue flush] + 200
10 UIKitCore                      0x1577f4 _runAfterCACommitDeferredBlocks + 640
11 UIKitCore                      0x157eb4 _cleanUpAfterCAFlushAndRunDeferredBlocks + 128
12 UIKitCore                      0x158080 _afterCACommitHandler + 56
13 CoreFoundation                 0x3df24 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
14 CoreFoundation                 0xf568 __CFRunLoopDoObservers + 588

2. Fatal Exception: NSInternalInconsistencyException *** -[AVAssetWriterInput pixelBufferPool] A pixel buffer pool cannot be created with the receiver's sourcePixelBufferAttributes. The pixel buffer attributes must specify a width, height, and either a pixel format or a pixel format description.

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x9904c __exceptionPreprocess
1  libobjc.A.dylib                0x15f54 objc_exception_throw
2  AVFCore                        0xbdd54 -[AVAssetWriterInputWritingHelper _assetWriterTrack]
3  Smartlook                      0x61ea8 _hidden#8420_ + 68 (__hidden#8482_:68)
4  Smartlook                      0x632f4 _hidden#8446_ (__hidden#925_)
5  libswiftObjectiveC.dylib       0x1a20 autoreleasepool<A>(invoking:)
6  Smartlook                      0x61d8c _hidden#8419_ + 66 (__hidden#8482_:66)
7  Smartlook                      0x61a38 _hidden#8418_ + 49 (__hidden#8482_:49)
8  Smartlook                      0x152f4 _hidden#1973_ + 158 (__hidden#2011_:158)
9  Smartlook                      0x15374 _hidden#1974_ (__hidden#925_)
10 Foundation                     0x4fb18 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__
11 Foundation                     0x5dbb0 __NSOQSchedule_f
12 libdispatch.dylib              0x2914 _dispatch_call_block_and_release
13 libdispatch.dylib              0x4660 _dispatch_client_callout
14 libdispatch.dylib              0x7b34 _dispatch_continuation_pop
15 libdispatch.dylib              0x7190 _dispatch_async_redirect_invoke
16 libdispatch.dylib              0x15dd0 _dispatch_root_queue_drain
17 libdispatch.dylib              0x165f8 _dispatch_worker_thread2
18 libsystem_pthread.dylib        0x10b8 _pthread_wqthread
19 libsystem_pthread.dylib        0xe94 start_wqthread

3. Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashed: com.apple.main-thread
0  Smartlook                      0x6b62c _hidden#9293_ + 120 (__hidden#9306_:120)
1  Smartlook                      0x6bdac _hidden#9297_ + 25 (__hidden#9306_:25)
2  Smartlook                      0x6b8e8 _hidden#9295_ + 412280 (__hidden#925_:412280)
3  QuartzCore                     0x1020c CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 756
4  QuartzCore                     0x16b60 display_timer_callback(__CFMachPort*, void*, long, void*) + 372
5  CoreFoundation                 0xb3a0 __CFMachPortPerform + 176
6  CoreFoundation                 0x4e734 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
7  CoreFoundation                 0x51f40 __CFRunLoopDoSource1 + 596
8  CoreFoundation                 0xbe1c __CFRunLoopRun + 2380
9  CoreFoundation                 0x1f3c8 CFRunLoopRunSpecific + 600
10 GraphicsServices               0x138c GSEventRunModal + 164
11 UIKitCore                      0x51b060 -[UIApplication _run] + 1100
12 UIKitCore                      0x298b8c UIApplicationMain + 2124
13 *****                      0x68e8 main + 29 (WeekDay.swift:29)
14 ???                            0x1052ada24 (Missing)
pavel-kroh-smartlook commented 3 years ago

Hi @ishch ,

thank you for detailed technical report.

We investigate it, however, as the crash reports could not be symbolificated (it is not possible to do locally for bitcode releases) it is not straightforward to find the crash causes.

In any case, we plan a maintenance release in few days, we try to fix whatever we are able to do till then, and include the necessary symbolification data for more verbal future crash reports.

pavel-kroh-smartlook commented 2 years ago

Hi @ishch , Smartlook iOS SDK 1.8.2 has been released.

We attempted to address the issues there, but we cannot reproduce them and without full symbolification of the crash reports it is hard to find their causes. Thus, we also decided to add symbolification maps to the released SDK so the next crash reports will provide better information for us to debug the issues.

ishch commented 2 years ago

SDK 1.8.2

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x8000000000000010 -> 0x0000000000000010 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x8000000000000010
VM Region Info: 0x10 is not in any region.  Bytes before following region: 4298129392
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   100304000-100308000 [   16K] r-x/r-x SM=COW  ...app/****
Exception Note:  EXC_CORPSE_NOTIFY
Terminating Process: exc handler [1029]
Triggered by Thread:  3

Thread 3 Crashed:
0   Smartlook                       0x0000000101340dfc subscript.get + 0 (Smartlook+Event.swift:0)
1   Smartlook                       0x0000000101340dfc specialized Smartlook.track<A>(event:) + 244
2   Smartlook                       0x0000000101340df8 recordEvents.get + 36 (Smartlook+Event.swift:0)
3   Smartlook                       0x0000000101340df8 specialized Smartlook.track<A>(event:) + 240
4   Smartlook                       0x00000001012a0770 Smartlook.trackOrientation(use:) + 404 (Smartlook+RecordStartEvents.swift:21)
5   Smartlook                       0x00000001012dcf28 setupStartRecordEvents + 28 (Smartlook+RecordStartEvents.swift:14)
6   Smartlook                       0x00000001012dcf28 specialized static RecordEntity.startNew(for:in:using:at:) + 1044 (RecordEntity+CoreDataClass.swift:35)
7   Smartlook                       0x00000001013245dc startNew + 20 (StartNewRecordOperation.swift:0)
8   Smartlook                       0x00000001013245dc StartNewRecordOperation.perform(using:) + 196
9   Smartlook                       0x00000001012e2bc4 closure #2 in CoreDataOperation.perform() + 76 (CoreDataOperation.swift:36)
10  Smartlook                       0x00000001012f2024 thunk for @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
11  Smartlook                       0x00000001012f2044 thunk for @escaping @callee_guaranteed () -> () + 20 (<compiler-generated>:0)
12  CoreData                        0x00000001884fc754 developerSubmittedBlockToNSManagedObjectContextPerform + 156 (NSManagedObjectContext.m:3942)
13  libdispatch.dylib               0x0000000180be3660 _dispatch_client_callout + 20 (object.m:560)
14  libdispatch.dylib               0x0000000180bf28b4 _dispatch_lane_barrier_sync_invoke_and_complete + 56 (queue.c:1016)
15  CoreData                        0x00000001884fc9b4 -[NSManagedObjectContext performBlockAndWait:] + 264 (NSManagedObjectContext.m:4059)
16  Smartlook                       0x00000001012e2ae4 CoreDataOperation.perform() + 628 (CoreDataOperation.swift:34)
17  Smartlook                       0x0000000101281764 main + 36 (BaseOperation.swift:158)
18  Smartlook                       0x0000000101281764 BaseOperation.start() + 160 (BaseOperation.swift:146)
19  Smartlook                       0x00000001012817e4 @objc BaseOperation.start() + 28 (<compiler-generated>:0)
20  Foundation                      0x0000000182749b18 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 24 (NSOperation.m:2220)
21  Foundation                      0x0000000182757bb0 __NSOQSchedule_f + 184 (NSOperation.m:2231)
22  libdispatch.dylib               0x0000000180be1914 _dispatch_call_block_and_release + 32 (init.c:1517)
23  libdispatch.dylib               0x0000000180be3660 _dispatch_client_callout + 20 (object.m:560)
24  libdispatch.dylib               0x0000000180be6b34 _dispatch_continuation_pop + 504 (inline_internal.h:2601)
25  libdispatch.dylib               0x0000000180be6190 _dispatch_async_redirect_invoke + 596 (queue.c:823)
26  libdispatch.dylib               0x0000000180bf4dd0 _dispatch_root_queue_drain + 396 (inline_internal.h:0)
27  libdispatch.dylib               0x0000000180bf55f8 _dispatch_worker_thread2 + 164 (queue.c:6930)
28  libsystem_pthread.dylib         0x00000001f12120b8 _pthread_wqthread + 228 (pthread.c:2554)
29  libsystem_pthread.dylib         0x00000001f1211e94 start_wqthread + 8
pavel-kroh-smartlook commented 2 years ago

Thanks a lot, @ishch ! Now we have much better idea what is the issue, fixing is in progress and we plan to release it in a week or so.

pavel-kroh-smartlook commented 2 years ago

Hi @ishch , new 1.8.3 version of iOS SDK is released.

We addressed there all the issues you reported.

Thank you for your help with documenting and reporting them.

SenNeonoveNoci commented 2 years ago

@ishch I hope all your issues are resolved. I'm closing this issue, but if you experience any issues feel free to reopen it.