It looks like this issue is very similar to all of these:
I’ve tried injecting MessageManager::getInstance()->runDispatchLoopUntil (1000); in many different places but I still get the crash.