Please help identify the cause of a thread crash





Our Xamarin forms iOS app can run on an iPhone in debugger without seeing a thread crash. Its Android app doesn't have the crash issue inside or outside a debugger. Please see the crash log when running outside a debugger on an iPhone. Please help identify the cause of the thread crash. Thank you.

Incident Identifier: FE40E812-93F1-442F-BC76-4F12116F386E
CrashReporter Key:  265bac06d9728abcf4454eab4bfbc9d307da449c
Hardware Model:   iPhone10,1
Process:       tecommobile.iOS [382]
Path:        /private/var/containers/Bundle/Application/3AC37153-DAE3-4C2C-90F3-33E4D7FD5830/tecommobile.iOS.app/tecommobile.iOS
Identifier:     au.com.interlogix.tecommobilev2
Version:       152 (2.0.4)
Code Type:      ARM-64 (Native)
Role:        Foreground
Parent Process:   launchd [1]
Coalition:      au.com.interlogix.tecommobilev2 [573]


Date/Time:      2021-02-22 12:52:19.6743 +1100
Launch Time:     2021-02-22 12:51:59.6754 +1100
OS Version:     iPhone OS 13.5.1 (17F80)
Release Type:    User
Baseband Version:  5.60.01
Report Version:   104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 8


Answered by j2bmw in 663237022
Thanks for your quick response.

I did include two text attachments because the max number
of characters was exceeded. You can see them as two dropdowns "Threads"
and "Binary Images" at the top of the page.

Now I have resolved the issue through removing an
additional TCP client and a timer associated with it. That was the reason that
caused the thread crash on iOS. However, it's still desirable to get your
advice on how to look at the crash log and locate the potential multithreading issue.
I know you really are an expert in the area.
Accepted Answer
Thanks for your quick response.

I did include two text attachments because the max number
of characters was exceeded. You can see them as two dropdowns "Threads"
and "Binary Images" at the top of the page.

Now I have resolved the issue through removing an
additional TCP client and a timer associated with it. That was the reason that
caused the thread crash on iOS. However, it's still desirable to get your
advice on how to look at the crash log and locate the potential multithreading issue.
I know you really are an expert in the area.
Sorry, I thought it's been fixed. But it still occurs following testing. Here is the crash log. Please help.

Incident Identifier: EAA01A20-6CDE-41F5-B042-4B189EA8EE2D
Hardware Model: iPhone10,1
Process: tecommobile.iOS [4650]
Path: /private/var/containers/Bundle/Application/F15D6705-06C0-40F7-B15A-DED9254C9166/tecommobile.iOS.app/tecommobile.iOS
Identifier: au.com.interlogix.tecommobilev2
Version: 152 (2.0.4)
AppStoreTools: 12D4d
AppVariant: 1:iPhone10,1:14
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: au.com.interlogix.tecommobilev2 [569]


Date/Time: 2021-02-25 06:47:46.0420 +1100
Launch Time: 2021-02-25 06:47:26.1358 +1100
OS Version: iPhone OS 14.4 (18D52)
Release Type: User
Baseband Version: 6.41.01
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4370219008
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
  • -->

__TEXT 1047c4000-104854000 [ 576K] r-x/r-x SM=COW ...commobile.iOS

Triggered by Thread: 0

Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001d1b4c84c __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001ee4309e8 pthread_kill + 212 (pthread.c:1392)
2 libsystem_c.dylib 0x00000001ae908970 __abort + 112 (abort.c:147)
3 libsystem_c.dylib 0x00000001ae908900 abort + 112 (abort.c:118)
4 tecommobile.iOS 0x0000000106bf70e8 0x1047c4000 + 37957864
5 tecommobile.iOS 0x0000000106b0f10c 0x1047c4000 + 37007628
6 tecommobile.iOS 0x0000000106ab0758 0x1047c4000 + 36620120
7 tecommobile.iOS 0x0000000106aaf140 0x1047c4000 + 36614464
8 tecommobile.iOS 0x0000000106aa6464 0x1047c4000 + 36578404
9 tecommobile.iOS 0x0000000104c462ec 0x1047c4000 + 4727532
10 tecommobile.iOS 0x00000001049f20ac 0x1047c4000 + 2285740
11 tecommobile.iOS 0x00000001049f7fb4 0x1047c4000 + 2310068
12 tecommobile.iOS 0x00000001057f8d2c 0x1047c4000 + 16993580
13 tecommobile.iOS 0x0000000104c07760 0x1047c4000 + 4470624
14 tecommobile.iOS 0x0000000106ac0ac4 0x1047c4000 + 36686532
15 tecommobile.iOS 0x0000000106b5892c 0x1047c4000 + 37308716
16 tecommobile.iOS 0x0000000106b5bd94 0x1047c4000 + 37322132
17 tecommobile.iOS 0x0000000104829580 0x1047c4000 + 415104
18 tecommobile.iOS 0x000000010482f11c 0x1047c4000 + 438556
19 Foundation 0x00000001a6f03614 __NSThreadPerformPerform + 184 (NSThread.m:807)
20 CoreFoundation 0x00000001a5b8dbf0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1967)
21 CoreFoundation 0x00000001a5b8daf0 __CFRunLoopDoSource0 + 204 (CFRunLoop.c:2011)
22 CoreFoundation 0x00000001a5b8ce38 __CFRunLoopDoSources0 + 256 (CFRunLoop.c:2048)
23 CoreFoundation 0x00000001a5b873e0 __CFRunLoopRun + 776 (CFRunLoop.c:2925)
24 CoreFoundation 0x00000001a5b86ba0 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242)
25 GraphicsServices 0x00000001bc8ef598 GSEventRunModal + 160 (GSEvent.c:2259)
26 UIKitCore 0x00000001a84782f4 -[UIApplication _run] + 1052 (UIApplication.m:3253)
27 UIKitCore 0x00000001a847d874 UIApplicationMain + 164 (UIApplication.m:4707)
28 tecommobile.iOS 0x000000010584d838 0x1047c4000 + 17340472
29 tecommobile.iOS 0x00000001057a0480 0x1047c4000 + 16630912
30 tecommobile.iOS 0x00000001057a0404 0x1047c4000 + 16630788
31 tecommobile.iOS 0x0000000104859d14 0x1047c4000 + 613652
32 tecommobile.iOS 0x0000000104c07760 0x1047c4000 + 4470624
33 tecommobile.iOS 0x0000000106ac0ac4 0x1047c4000 + 36686532
34 tecommobile.iOS 0x0000000106b5892c 0x1047c4000 + 37308716
35 tecommobile.iOS 0x0000000106b5da24 0x1047c4000 + 37329444
36 tecommobile.iOS 0x0000000106aa5fcc 0x1047c4000 + 36577228
37 tecommobile.iOS 0x0000000106bfddfc 0x1047c4000 + 37985788
38 tecommobile.iOS 0x0000000104857c7c 0x1047c4000 + 605308
39 libdyld.dylib 0x00000001a5865568 start + 4
The crash log is partially symbolicated. I didn't enable debugging in AppStore / Release build.

I have found the issue through code. It's a TcpClient socket error with null reference.
Please help identify the cause of a thread crash
 
 
Q