uxcam / ios-sdk

This is the UXCam iOS SDK
9 stars 4 forks source link

Crash at [UXFileUtility createBodyDataForFile:name:formBoundary:] #23

Closed Cattivo5 closed 11 months ago

Cattivo5 commented 11 months ago

I am receiving several crash reports from my testers caused by the UXCam iOS SDK. The app crashes from time to time when the app was in background and is brought back to the foreground. The app does not crash when UXCam is deactivated/optOut or not used at all. The crash also seems to be independent from iOS and XCode Versions.

I am using UXCamSwiftUI v1.0.4 with UXCam v3.6.6.

Please have a look at the log excerpt below.

Hardware Model:      iPhone10,6
Role:                Background
Parent Process:      launchd [1]
OS Version:          iPhone OS 16.1.1 (20B101)
Release Type:        User
Baseband Version:    5.03.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  9

Last Exception Backtrace:
0   CoreFoundation                  0x1b1ef3a84 __exceptionPreprocess + 160 (NSException.m:202)
1   libobjc.A.dylib                 0x1b0345958 objc_exception_throw + 56 (objc-exception.mm:356)
2   CoreFoundation                  0x1b208560c _CFRaiseMemoryException + 40 (NSException.m:872)
3   CoreFoundation                  0x1b207da94 __CFReallocationFailed + 116 (CFBase.c:777)
4   CoreFoundation                  0x1b1f6efa8 __CFSafelyReallocate + 68 (CFBase.c:788)
5   Foundation                      0x1b12df924 _NSMutableDataGrowBytes + 324 (NSData.m:1965)
6   Foundation                      0x1b12ca098 -[NSConcreteMutableData appendBytes:length:] + 332 (NSData.m:2032)
7   Foundation                      0x1b12c9f00 -[NSData(NSData) enumerateByteRangesUsingBlock:] + 112 (NSData.m:537)
8   Foundation                      0x1b12c9d54 -[NSConcreteMutableData appendData:] + 116 (NSData.m:2041)
9   x                               0x104d12504 -[UXFileUtility createBodyDataForFile:name:formBoundary:] + 528
10  x                               0x104d127ec -[UXFileUtility createFileWithParameters:formBoundary:fileURL:fieldName:] + 432
11  x                               0x104d18994 -[UXFileUploadHandler uploadFile:session:uploadType:uploadParams:md5:fileSessionId:zippedSession:completion:] + 868
12  x                               0x104cbb674 -[UXUtil S3_Upload_File:uploadType:uploadParams:md5:fileSessionId:zippedSession:completion:] + 228
13  x                               0x104d017e4 __100-[UXPlistHandler uploadSingleFile:fromFolder:using:fromSession:sessionKey:dispatchGroup:completion:]_block_invoke + 328
14  libdispatch.dylib               0x1bdc1d850 _dispatch_call_block_and_release + 24 (init.c:1518)
15  libdispatch.dylib               0x1bdc1e7c8 _dispatch_client_callout + 16 (object.m:560)
16  libdispatch.dylib               0x1bdbf5e7c _dispatch_continuation_pop$VARIANT$armv81 + 436 (inline_internal.h:2632)
17  libdispatch.dylib               0x1bdbf55b4 _dispatch_async_redirect_invoke + 580 (queue.c:830)
18  libdispatch.dylib               0x1bdc02d48 _dispatch_root_queue_drain + 328 (inline_internal.h:0)
19  libdispatch.dylib               0x1bdc03514 _dispatch_worker_thread2 + 160 (queue.c:7052)
20  libsystem_pthread.dylib         0x1fe69ab14 _pthread_wqthread + 224 (pthread.c:2631)
21  libsystem_pthread.dylib         0x1fe69a67c start_wqthread + 8 (:-1)

Thread 8 name:
Thread 8:
0   libsystem_kernel.dylib          0x00000001ef8f2194 mach_msg2_trap + 8 (:-1)
1   libsystem_kernel.dylib          0x00000001ef903a08 mach_msg2_internal + 76 (mach_msg.c:201)
2   libsystem_kernel.dylib          0x00000001ef903c44 mach_msg_overwrite + 384 (mach_msg.c:0)
3   libsystem_kernel.dylib          0x00000001ef8f2688 mach_msg + 20 (mach_msg.c:323)
4   libdispatch.dylib               0x00000001bdbf0468 _dispatch_mach_send_and_wait_for_reply + 524 (mach.c:816)
5   libdispatch.dylib               0x00000001bdbf07ec dispatch_mach_send_with_result_and_wait_for_reply$VARIANT$armv81 + 56 (mach.c:2017)
6   libxpc.dylib                    0x00000001fe6ef01c xpc_connection_send_message_with_reply_sync + 236 (connection.c:998)
7   Foundation                      0x00000001b13197c0 __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 12 (NSXPCConnection.m:223)
8   Foundation                      0x00000001b12b3018 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2100 (NSXPCConnection.m:1678)
9   CoreFoundation                  0x00000001b1f089b0 ___forwarding___ + 708 (NSForwarding.m:3612)
10  CoreFoundation                  0x00000001b1f6c70c _CF_forwarding_prep_0 + 92 (:-1)
11  CFNetwork                       0x00000001b7fb3d50 __56-[__NSURLBackgroundSession _uploadTaskWithTaskForClass:]_block_invoke + 2032 (BackgroundSession.mm:999)
12  CFNetwork                       0x00000001b7ed8cb0 __68-[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:]_block_invoke + 584 (BackgroundSession.mm:800)
13  libdispatch.dylib               0x00000001bdc1e7c8 _dispatch_client_callout + 16 (object.m:560)
14  libdispatch.dylib               0x00000001bdc00b54 _dispatch_lane_barrier_sync_invoke_and_complete + 52 (queue.c:1023)
15  CFNetwork                       0x00000001b7f02168 -[__NSURLBackgroundSession performBlockOnQueueAndRethrowExceptions:] + 132 (BackgroundSession.mm:778)
16  CFNetwork                       0x00000001b7fab008 -[__NSURLBackgroundSession _uploadTaskWithTaskForClass:] + 148 (BackgroundSession.mm:892)
17  x                               0x0000000104d18a20 -[UXFileUploadHandler uploadFile:session:uploadType:uploadParams:md5:fileSessionId:zippedSession:completion:] + 1008
18  x                               0x0000000104cbb674 -[UXUtil S3_Upload_File:uploadType:uploadParams:md5:fileSessionId:zippedSession:completion:] + 228
19  x                               0x0000000104d017e4 __100-[UXPlistHandler uploadSingleFile:fromFolder:using:fromSession:sessionKey:dispatchGroup:completion:]_block_invoke + 328
20  libdispatch.dylib               0x00000001bdc1d850 _dispatch_call_block_and_release + 24 (init.c:1518)
21  libdispatch.dylib               0x00000001bdc1e7c8 _dispatch_client_callout + 16 (object.m:560)
22  libdispatch.dylib               0x00000001bdbf5e7c _dispatch_continuation_pop$VARIANT$armv81 + 436 (inline_internal.h:2632)
23  libdispatch.dylib               0x00000001bdbf55b4 _dispatch_async_redirect_invoke + 580 (queue.c:830)
24  libdispatch.dylib               0x00000001bdc02d48 _dispatch_root_queue_drain + 328 (inline_internal.h:0)
25  libdispatch.dylib               0x00000001bdc03514 _dispatch_worker_thread2 + 160 (queue.c:7052)
26  libsystem_pthread.dylib         0x00000001fe69ab14 _pthread_wqthread + 224 (pthread.c:2631)
27  libsystem_pthread.dylib         0x00000001fe69a67c start_wqthread + 8 (:-1)

Thread 9 name:
Thread 9 Crashed:
0   libsystem_kernel.dylib          0x00000001ef8f82f4 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib         0x00000001fe6a6654 pthread_kill + 208 (pthread.c:1670)
2   libsystem_c.dylib               0x00000001bdc5de88 abort + 124 (abort.c:118)
3   libc++abi.dylib                 0x00000001fe5e0dec abort_message + 128 (abort_message.cpp:78)
4   libc++abi.dylib                 0x00000001fe5d165c demangling_terminate_handler() + 300 (cxa_default_handlers.cpp:71)
5   libobjc.A.dylib                 0x00000001b034b06c _objc_terminate() + 124 (objc-exception.mm:498)
6   libc++abi.dylib                 0x00000001fe5e0288 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7   libc++abi.dylib                 0x00000001fe5e0230 std::terminate() + 52 (cxa_handlers.cpp:88)
8   libdispatch.dylib               0x00000001bdc1e7dc _dispatch_client_callout + 36 (object.m:563)
9   libdispatch.dylib               0x00000001bdbf5e7c _dispatch_continuation_pop$VARIANT$armv81 + 436 (inline_internal.h:2632)
10  libdispatch.dylib               0x00000001bdbf55b4 _dispatch_async_redirect_invoke + 580 (queue.c:830)
11  libdispatch.dylib               0x00000001bdc02d48 _dispatch_root_queue_drain + 328 (inline_internal.h:0)
12  libdispatch.dylib               0x00000001bdc03514 _dispatch_worker_thread2 + 160 (queue.c:7052)
13  libsystem_pthread.dylib         0x00000001fe69ab14 _pthread_wqthread + 224 (pthread.c:2631)
14  libsystem_pthread.dylib         0x00000001fe69a67c start_wqthread + 8 (:-1)
DFDIEGOH commented 11 months ago

Hi @Cattivo5, Diego here from the support team at UXCam. First of all, I wanted to apologize for the inconvenience in this regard. We have collected the information that you have shared and we will be investigating this internally.

I will keep you posted as soon as we get more updates in this regard, but we are here in case you have further questions.

DFDIEGOH commented 11 months ago

Hi @Cattivo5 Good news, our latest SDK version 3.6.7 has now been released and comes with the fix of this specific crash! Updating the library should fix this issue.

Closing this thread for now, but don't hesitate reaching out in case you have further questions