Hardware: Macbook Pro M1 Max (64GB)
OS: MacOS 12.2.1
Xojo: 2021r3.1
Build Scenarios:
Build: ARM -> Target: ARM/Intel (crash)
Build: Intel -> Target: ARM (crash)
Build: Intel -> Target: Intel (ok)
Hi All,
Apologies in advance for the following semi-scattered question. Full disclosure, the application is not mine originally, and I’m unable to release any of the source as the application is proprietary with all kinds of NDA “goodness”.
That said, I’m having an issue with an a deeply nested HTTPSocket.Post
that is ultimately running inside a thread. The app hard crashes (both build and debug) in the exact same manner every time (see crash log excerpt):
Thread 6 Crashed:
0 libsystem_pthread.dylib 0x1854bc064 ___chkstk_darwin + 60
1 SSLSocket.dylib 0x1135dceec 0x1134d0000 + 1101548
2 SSLSocket.dylib 0x1135dca60 0x1134d0000 + 1100384
3 SSLSocket.dylib 0x1135dcbc0 0x1134d0000 + 1100736
4 SSLSocket.dylib 0x1135daba8 0x1134d0000 + 1092520
5 CustomApp 0x104d75ab4 SSLSocket.Close%%o<SSLSocket> + 60
6 CustomApp 0x104e0e034 HTTPSecureSocket._ProcessData%%o<HTTPSecureSocket>s + 508
7 CustomApp 0x104e0cc48 HTTPSecureSocket._HandleNewData%%o<HTTPSecureSocket> + 2564
8 CustomApp 0x104e0624c HTTPSecureSocket.Event_DataAvailable%%o<HTTPSecureSocket> + 56
9 SSLSocket.dylib 0x1135dd574 0x1134d0000 + 1103220
10 SSLSocket.dylib 0x1135dd498 0x1134d0000 + 1103000
11 SSLSocket.dylib 0x1135dd044 0x1134d0000 + 1101892
12 SSLSocket.dylib 0x1135dca70 0x1134d0000 + 1100400
13 SSLSocket.dylib 0x1135db3dc 0x1134d0000 + 1094620
14 SSLSocket.dylib 0x1135dbd7c 0x1134d0000 + 1097084
15 CustomApp 0x104d75bec SSLSocket.Poll%%o<SSLSocket> + 60
16 CustomApp 0x104e08884 HTTPSecureSocket.WaitForPage%%o<HTTPSecureSocket> + 404
17 CustomApp 0x104e07bac HTTPSecureSocket.Post%s%o<HTTPSecureSocket>si8 + 128
18 CustomApp 0x106eac300 SOAPSocket.SendRequest%s%o<SOAPSocket>sss + 5856
19 CustomApp 0x106ebc3e4 SOAPClient.sendSoapRequest%%o<SOAPClient>si8sb + 6276
20 CustomApp 0x106ebaaf4 SOAPClient.sendSoapRequest%%o<SOAPClient>si8s + 148
21 CustomApp 0x106c07df0 SoapDish.sendSoapRequest%%o<SoapDish>sb + 10792
22 CustomApp 0x106c05174 SoapDish.sendRequest%%o<SoapDish>s + 132
23 CustomApp 0x106c05084 SoapDish.sendRequest%%o<SoapDish> + 108
24 CustomApp 0x10685b220 DoDBUpdate.execute%%o<DoDBUpdate> + 5368
25 CustomApp 0x10bc6be90 CMDashboardWindow.CMDashboardWindow.loadMessages%%o<CMDashboardWindow.CMDashboardWindow> + 5588
26 CustomApp 0x10bc13634 CMDashboardWindow.CMDashboardWindow.LoadMessagesThread_Run%%o<CMDashboardWindow.CMDashboardWindow>o<Thread> + 592
27 CustomApp 0x10585351c Delegate.IM_Invoke%%o<Thread> + 60
28 XojoFramework 0x10eee7500 0x10ecc8000 + 2225408
29 XojoFramework 0x10edb0678 0x10ecc8000 + 951928
30 libsystem_pthread.dylib 0x1854c1240 _pthread_start + 148
31 libsystem_pthread.dylib 0x1854bc024 thread_start + 8
As it is a hard crash, no actionable error (unhandled exception or otherwise) is presented. Further, symbolication provides no useful information.
Interestingly, if I move the code outside the thread, the app temporarily hangs (as expected), but runs fine.
FYI, there is no UI being updated inside the thread, and no 3rd-party plugins being used in the process, but there is a timer that runs “in parallel” that checks for data written by the thread that then updates the UI. Also, I realize that HTTPSecureSocket is deprecated, but the workflow required by URLConnection isn’t really desirable at the moment.
Any recommendations as to where I might look or how I might further debug this issue?