Application violated contract by causing UIApplicationMain() to return. This incident will be reported

I just realized that when I run my games on the emulator and quit the game (by killing the emulator, not by using the Square in XCode to kill it), the game crashes and I receive this warning from within the assembly code where it crashed. Anyone else seeing this? Any idea? This is with version 3.17. I first thought it was linked to my new MAC, but no, it has been there for quite a while.

It crashes here: with this code: Thread 1: signal SIGTERM
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, @“AppController”); Crash here
}
}

when I go to assembly I see this:

0x7fff2469bba8 <+101>: leaq 0x7f3624(%rip), %rdi ; “Application violated contract by causing UIApplicationMain() to return. This incident will be reported.”

EDIT: I can reproduce it with the hello world cocos app

Crash appears on; MAC OS Big Sur, XCode 12.4, Emulator with 14.4