diff --git a/src/servers/input/InputServer.cpp b/src/servers/input/InputServer.cpp index eaec934847..247144cff9 100644 --- a/src/servers/input/InputServer.cpp +++ b/src/servers/input/InputServer.cpp @@ -183,8 +183,16 @@ InputServer::InputServer() fAddOnManager = new(std::nothrow) ::AddOnManager(SafeMode()); if (fAddOnManager != NULL) { - fAddOnManager->Run(); + // We need to Run() the AddOnManager looper after having loaded + // the initial add-ons, otherwise we may deadlock when the looper + // thread for some reason already receives node monitor notifications + // while we are still locked ourselves and are executing LoadState() + // at the same time (which may lock the add-on looper thread). + // NOTE: At first sight this may look like we may loose node monitor + // notifications while the thread is not yet running, but in fact those + // message should just pile up and be processed later. fAddOnManager->LoadState(); + fAddOnManager->Run(); } BMessenger messenger(this);