On Mon, 14 Oct 2019 at 13:53, <hikaru...@gmail.com> wrote: > > From: Hikaru Nishida <hikaru...@gmail.com> > > An NSEvent is fired before applicationDidFinishLaunching on macOS > Catalina. This causes deadlock of iothread_lock by calling > bool_with_iothread_lock in handleEvent while its already locked. > This patch prevents to call bool_with_iothread_lock until the > app_started_sem is released to prevent this deadlock.
Thanks for this analysis and patch. Do you know what the event that gets fired is? I'm wondering if it's something we need to handle (or if other events might in future fire in this window that matter to us). Incidentally, getting an NSEvent before applicationDidFinishLaunching seems to contradict the OSX API docs: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428385-applicationdidfinishlaunching which say "This method is called after the application's main run loop has been started but before it has processed any events." thanks -- PMM