App Crashing at launching on iOS 15

We've been getting a crash on launch starting.

We found that all crashing users triggered prewarm before.

During the prewarm phase, we will create a thread, and after 15 seconds, the thread will perform the operation of clearing the pasteboard. I don't know if this is the cause of the problem.

But the previous version of our app will not crash, and the previous version also has iOS 15 users

Here is the crash log:

Answered by DTS Engineer in 707781022

What’s happening in thread 8? This backtrace is a worry:

19 UIKitCore … -[_UIConcretePasteboard setString:] + 332
20 OurApp    … +[CrashMonitor cleanPasteboard:] + 101396588 (CrashMonitor.m:102)

Your code (frame 20) is calling UIKit (frame 19) on a background thread. That is, in general, not allowed.

What does CrashMonitor do? If it’s part of a crash reporting system, I recommend that you remove it because it’s impossible to create a third-party crash reporter that’s reliable, binary compatible, and sufficient to debug complex problems. See Implementing Your Own Crash Reporter for an explanation as to why.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

What’s happening in thread 8? This backtrace is a worry:

19 UIKitCore … -[_UIConcretePasteboard setString:] + 332
20 OurApp    … +[CrashMonitor cleanPasteboard:] + 101396588 (CrashMonitor.m:102)

Your code (frame 20) is calling UIKit (frame 19) on a background thread. That is, in general, not allowed.

What does CrashMonitor do? If it’s part of a crash reporting system, I recommend that you remove it because it’s impossible to create a third-party crash reporter that’s reliable, binary compatible, and sufficient to debug complex problems. See Implementing Your Own Crash Reporter for an explanation as to why.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So the background thread cannot perform UIPasteboard operations?

UIKit is, in general, a main-thread-only framework. There are a few exceptions but, AFAIK, UIPasteboard is not one of them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App Crashing at launching on iOS 15
 
 
Q