qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix for crashes and non-responsive UI on macOS


From: Programmingkid
Subject: Re: [Qemu-devel] [PATCH] Fix for crashes and non-responsive UI on macOS Mojave
Date: Tue, 13 Nov 2018 19:53:20 -0500

> On Nov 11, 2018, at 4:35 PM, address@hidden wrote:
> 
> It seems that Cocoa checks are stricter on Mojave and some callbacks that 
> worked from non-GUI thread on High Sierra are no longer working.
> 
> The fixes included here are:
> 
> * Deferring qemu_main() to another thread so that the actual main thread is 
> reserved for the Cocoa UI; it also removes blocking from 
> applicationDidFinishLoading: delegate. I beleive this alone caused complete 
> UI blockage on Mojave.
> * Deferring UI-related updates in callbacks to the UI thread using 
> invokeOnMainThread helper function. This function uses DDInvocationGrabber 
> object courtesy of Dave Dribin, licensed under MIT license.
> Here?s relevant blog post for his code: 
> https://www.dribin.org/dave/blog/archives/2008/05/22/invoke_on_main_thread/
> 
> NSInvocation is used here instead of plain 
> performSelectorOnMainThread:withObject:waitUntilDone: because we want to be 
> able to pass non-id types to the handlers.

Also I realized that the only way we could call cocoa_refresh() from 
performSelectorOnMainThread:withObject:waitUntilDone: would be to add it to a 
class. 

> These changes are ought to work on OSX 10.6, although I don?t have a machine 
> handy to test it.
> 
> Fixes https://bugs.launchpad.net/qemu/+bug/1802684
> 
> From 8f86e30f3710d782d78dccdbe7a1564ae79220c7 Mon Sep 17 00:00:00 2001
> From: Berkus Decker <address@hidden>
> Date: Sun, 11 Nov 2018 21:58:17 +0200
> Subject: [PATCH 1/2] ui/cocoa: Defer qemu to another thread, leaving main
> thread for the UI

<snip>

I tried both patch 1 and 2 together on Mac OS 10.12. Both qemu-system-i386 and 
qemu-system-ppc do not load their BIOS files. All I see is a black window each 
time. There is no indication of anything loading. The Machine menu doesn't 
populate with devices. Sorry. 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]