IOHIDManagerScheduleWithRunLoop internal assertion post Catalina

Hello Apple devs,

We recently moved from Xcode 11 to 12 and Mojave to Catalina. After the update, our Mac OSX project calls to IOHIDManagerScheduleWithRunLoop trigger an internal assertion: "assertion failure: Schedule failed queue: 0x0 runLoop: 0x600003e14300". I have been unable to find any information on what the cause may be. Any help would be much appreciated.

Thanks!

Answered by Apple Designer in 680911022

Consider this snippet from the crashing thread’s backtrace:

5 com.apple.framework.IOKit   IOHIDManagerScheduleWithRunLoop + 302
6 com.interplay.darkalliance  JBE::InputPF::InitGamePad() + 822 (input_pf.cpp:666)

You can find the source for IOHIDManagerScheduleWithRunLoop in Darwin. Right at the start of that routine you’ll find this:

os_assert(!manager->runLoop && !manager->dispatchQueue,
          "Schedule failed queue: %p runLoop: %p", manager->dispatchQueue, manager->runLoop);

This is the assert you’re tripping. That routine is called by your code so you should look at JBE::InputPF::InitGamePad() to see how it might have called IOHIDManagerScheduleWithRunLoop twice on the same manager.

Share and Enjoy

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

our [macOS] project calls to IOHIDManagerScheduleWithRunLoop trigger an internal assertion

Can you post an Apple crash report for this? You’ll need you to run your code outside of the debugger to generate one. Oh, and use the text attachment feature (click the paperclip icon and then choose Add File) to avoid clogging up the timeline.

Share and Enjoy

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

Hi @eskimo, Thanks for the reply. I have attached the crash report. Best, Stephane

Accepted Answer

Consider this snippet from the crashing thread’s backtrace:

5 com.apple.framework.IOKit   IOHIDManagerScheduleWithRunLoop + 302
6 com.interplay.darkalliance  JBE::InputPF::InitGamePad() + 822 (input_pf.cpp:666)

You can find the source for IOHIDManagerScheduleWithRunLoop in Darwin. Right at the start of that routine you’ll find this:

os_assert(!manager->runLoop && !manager->dispatchQueue,
          "Schedule failed queue: %p runLoop: %p", manager->dispatchQueue, manager->runLoop);

This is the assert you’re tripping. That routine is called by your code so you should look at JBE::InputPF::InitGamePad() to see how it might have called IOHIDManagerScheduleWithRunLoop twice on the same manager.

Share and Enjoy

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

Thank you so much @eskimo, that source link and know what was the triggering condition was greatly helpful. I assume a new condition check that's just come up in Catalina. Much appreciate your help here.

IOHIDManagerScheduleWithRunLoop internal assertion post Catalina
 
 
Q