Summary: | _global_image_glyph_cache_mutex is not initialized in win32 + static builds | ||
---|---|---|---|
Product: | cairo | Reporter: | Adam Strzelecki <ono> |
Component: | win32 backend | Assignee: | Owen Taylor <otaylor> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | critical | ||
Priority: | high | CC: | chris |
Version: | 1.0.2 | ||
Hardware: | x86 (IA32) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Adam Strzelecki
2005-10-05 06:38:40 UTC
Confirmed (w32 cross-compile) Fix: --- cairo-win32-surface.c~ 2005-10-03 16:44:43.000000000 -0400 +++ cairo-win32-surface.c 2005-12-18 13:58:21.000000000 -0500 @@ -1062,6 +1062,7 @@ CRITICAL_SECTION cairo_toy_font_face_hash_table_mutex; CRITICAL_SECTION cairo_scaled_font_map_mutex; CRITICAL_SECTION cairo_ft_unscaled_font_map_mutex; +CRITICAL_SECTION _global_image_glyph_cache_mutex; BOOL WINAPI DllMain (HINSTANCE hinstDLL, @@ -1072,11 +1073,13 @@ { case DLL_PROCESS_ATTACH: /* every 'mutex' from CAIRO_MUTEX_DECALRE needs to be initialized here */ + InitializeCriticalSection (&_global_image_glyph_cache_mutex); InitializeCriticalSection (&cairo_toy_font_face_hash_table_mutex); InitializeCriticalSection (&cairo_scaled_font_map_mutex); InitializeCriticalSection (&cairo_ft_unscaled_font_map_mutex); break; case DLL_PROCESS_DETACH: + DeleteCriticalSection (&_global_image_glyph_cache_mutex); DeleteCriticalSection (&cairo_toy_font_face_hash_table_mutex); DeleteCriticalSection (&cairo_scaled_font_map_mutex); DeleteCriticalSection (&cairo_ft_unscaled_font_map_mutex); Discussing this with cworth, we think what we need is a cairo_win32_init() that should be called before any multi-thread stuff. And given that, better to remove the dll initialization stuff, such that everyone is forced to actually call the win32_init() on win32. Cairo's mutex handling and initialization was cleaned up by Behdad during Apr/May 2007 (and included similar fixes). |
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.