Bug 16819

Summary: Deadlock when initializing user font
Product: cairo Reporter: Richard Hughes <cyreve>
Component: generalAssignee: Behdad Esfahbod <freedesktop>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.6.5   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed fix

Description Richard Hughes 2008-07-23 11:43:07 UTC
Created attachment 17841 [details] [review]
Proposed fix

Found in Inkscape.

When opening the SVG Fonts editing pane, Inkscape freezes as soon as a font name is selected. It turns out that Windows hangs an app on entering a mutex when that mutex has been exited more times than it has been entered, i.e. the sequence goes init, enter, exit, exit, enter:deadlock. Patch attached. The fix is in common code, but I haven't seen any instance of in not being caused by user fonts, nor have I tried to read the code to see if it could be.

NB: This description sounds a lot like bug 11900, but it can't be because the offending code was only written in May.
Comment 1 Behdad Esfahbod 2008-09-15 15:56:53 UTC
Thanks.

commit e079ec03cb8c2272162db86ec263b893df40460a
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Mon Sep 15 18:51:24 2008 -0400

    [scaled-font] Fix bug unlocking the wrong mutex (#16819)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.