I reported this first here: https://developer.apple.com/forums/thread/746539
But have since discovered more findings. In that report there is a hang stack trace (from an .ips file) showing the 3rd party library KKMV featuring. However since posting that I have discovered that my app is hanging all over the place at random places, I've been collecting .ips files and they are all different - expect they all have one thing in common, which is that it always involves __ulock_wait2 / NSLog. There's one example posted in the linked post, but here's a different example but with the same last lines of __ulock_wait2/NSLog
Here's another snippet from a hang, again, just like all the others, it finishes with NSLog/__ulock_wait2
318 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 (CoreFoundation + 194472) [0x1988a27a8]
318 @objc CallExtensionManager.appBecameActive() + 28 (Myapp + 296292) [0x100ba8564]
317 CallExtensionManager.appBecameActive() + 912 (Myapp + 295912) [0x100ba83e8]
317 specialized static Logger.always(_:) + 316 (CallFilterFast + 108104) [0x100b7a648]
317 specialized withVaList<A>(_:_:) + 428 (Foundation + 5337508) [0x197c381a4]
317 _NSLogv + 164 (Foundation + 603072) [0x1977b43c0]
317 _CFLogvEx3 + 252 (CoreFoundation + 652276) [0x1989123f4]
317 _CFLogvEx2Predicate + 352 (CoreFoundation + 652792) [0x1989125f8]
317 __CFLogCString + 84 (CoreFoundation + 652948) [0x198912694]
317 _logToStderr + 144 (CoreFoundation + 653980) [0x198912a9c]
317 __ulock_wait2 + 8 (libsystem_kernel.dylib + 59708) [0x1e1a7193c]
*317 ??? (<7ABFF6F3-9E55-3D7B-8DB8-8CF19FB41EFE> + 5068548) [0xfffffff008229704]
Every time the app hangs, in the .ips logging is featured when the ips is opened in XCode or when the ips is examined it always features in the Heaviest stack for the main thread of the target process.
I've drastically reduced the amount of logging within the app in case it was too much, but it made no difference.
When the app hangs there's no crash, I'm running the app either from Testflight, or installing via XCode but then running it from XCode. If its installed via XCode then a dialog pops up saying it crashed, but there is not crash stack (there's no .crash files on the iPhone, only .ips files, there's no crash reported to crashlytics, and if reported via Testflight there's also no crash info).
Why is NSLog featuring in every .ips file when this happen but at a different location everytime?
If the app is hanging and blocking the main thread, then why isn't it being terminated by Watchdog and thus not producing a .crash file?