http://bugs.winehq.org/show_bug.cgi?id=34188
Bug #: 34188 Summary: crash when creating a new wineprefix with winemac.drv Product: Wine Version: 1.6 Platform: x86 OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: winemac.drv AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com Classification: Unclassified
Created attachment 45475 --> http://bugs.winehq.org/attachment.cgi?id=45475 backtrace
May only be in 10.7+.
http://bugs.winehq.org/show_bug.cgi?id=34188
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=34188
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=34188
--- Comment #1 from Ken Thomases ken@codeweavers.com 2013-08-01 17:41:18 CDT --- The problem has to do with the use of the Core Text API (CTFontDescriptor, in particular) in gdi32. If that happens before Cocoa is loaded, then Cocoa blows up when it tries to access fonts, such as the font used in window title bars.
Although this is not a public part of the API, CTFontDescriptor and the Cocoa NSFontDescriptor class are assumed to be toll-free bridged (interchangeable with just a type cast) in the bowels of Cocoa. However, this bridging support is only enabled if Cocoa has been loaded into the process when CTFontDescriptor is first used.
Cocoa messages a CTFontDescriptor object as though it were an NSFontDescriptor object, by sending the -symbolicTraits message. When the bridging support is not enabled, this results in the crash.
For any given Wine session, at most one process enumerates the fonts (in gdi32's initialization). It caches the font details in a volatile registry key and subsequent processes read from that cache. So, only that process uses CTFontDescriptor. I think in almost all cases, that's wineboot.exe.
With an existing, up-to-date wineprefix, wineboot doesn't show any windows. Therefore, it doesn't cause Cocoa to access fonts, and doesn't crash.
However, when it is creating or updating a wineprefix, it shows a window and, boom, down it goes.
I'm developing a workaround. I plan to make gdi32 load the graphics driver (and thus, when using the Mac driver, Cocoa) before enumerating fonts. Or, if it's not feasible to load the graphics driver at that point, I'll make gdi32 load Cocoa directly if it's going to use the Mac driver.
http://bugs.winehq.org/show_bug.cgi?id=34188
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=34188
--- Comment #2 from Ken Thomases ken@codeweavers.com 2013-08-01 19:11:00 CDT --- Created attachment 45476 --> http://bugs.winehq.org/attachment.cgi?id=45476 Patch to fix the crash
Please give the attached patch a try. It fixes the problem in my testing on 10.8.x and, uh, later. ;) It would be good to get confirmation that it fixes it for 10.7.x.
http://bugs.winehq.org/show_bug.cgi?id=34188
--- Comment #3 from Austin English austinenglish@gmail.com 2013-08-01 19:34:23 CDT --- (In reply to comment #2)
Created attachment 45476 [details] Patch to fix the crash
Please give the attached patch a try. It fixes the problem in my testing on 10.8.x and, uh, later. ;) It would be good to get confirmation that it fixes it for 10.7.x.
Works on 10.7.5.
http://bugs.winehq.org/show_bug.cgi?id=34188
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #45476|0 |1 is obsolete| |
--- Comment #4 from Ken Thomases ken@codeweavers.com 2013-08-01 19:47:37 CDT --- Created attachment 45477 --> http://bugs.winehq.org/attachment.cgi?id=45477 Revised fix
Updated attached patch to the one I submitted to wine-patches. Correctly handles the case where HKCU\Software\Wine\Drivers exists but the Graphics value does not (or can't be read).
http://bugs.winehq.org/show_bug.cgi?id=34188
camillo.lugaresi+wine@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |camillo.lugaresi+wine@gmail | |.com
--- Comment #5 from camillo.lugaresi+wine@gmail.com 2013-08-03 21:33:03 CDT --- This should be the same issue as half of bug 34066 (but not the Steam half).
http://bugs.winehq.org/show_bug.cgi?id=34188
--- Comment #6 from Ken Thomases ken@codeweavers.com 2013-08-03 21:36:34 CDT --- Yup, those are the same symptoms. It's a shame I didn't see that bug before 1.6.
http://bugs.winehq.org/show_bug.cgi?id=34188
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #45477|0 |1 is obsolete| |
--- Comment #7 from Ken Thomases ken@codeweavers.com 2013-08-04 22:52:20 CDT --- Created attachment 45507 --> http://bugs.winehq.org/attachment.cgi?id=45507 Link gdi32 against AppKit
The new patch fixes things in a simpler way. It just links gdi32 against AppKit.
http://bugs.winehq.org/show_bug.cgi?id=34188
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |skrinak@gmail.com
--- Comment #8 from Austin English austinenglish@gmail.com 2013-08-07 17:44:22 CDT --- *** Bug 34213 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=34188
--- Comment #9 from Bruno Jesus 00cpxxx@gmail.com 2013-08-15 13:29:21 CDT --- A ptach related to this bug was commited: http://source.winehq.org/git/wine.git/?a=commit;h=1f2d55637399b6d2507b661d01...
http://bugs.winehq.org/show_bug.cgi?id=34188
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1f2d55637399b6d2507b661d013 | |c0bbf8a9c0d30 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #10 from Austin English austinenglish@gmail.com 2013-08-15 20:10:59 CDT --- (In reply to comment #9)
A ptach related to this bug was commited: http://source.winehq.org/git/wine.git/?a=commit;h=1f2d55637399b6d2507b661d01...
Works for me in 10.7.4. Thanks guys.
http://bugs.winehq.org/show_bug.cgi?id=34188
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org 2013-08-30 13:05:53 CDT --- Closing bugs fixed in 1.7.1.
http://bugs.winehq.org/show_bug.cgi?id=34188
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
http://bugs.winehq.org/show_bug.cgi?id=34188
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #12 from Alexandre Julliard julliard@winehq.org 2013-11-15 13:40:25 CST --- Removing 1.6.x milestone from bugs included in 1.6.1.
https://bugs.winehq.org/show_bug.cgi?id=34188
Brendan Shanks bshanks@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bshanks@codeweavers.com
--- Comment #13 from Brendan Shanks bshanks@codeweavers.com --- I did testing and found that this workaround is still needed for (at least) macOS 10.13.