After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 622333 - Crash in gdk_window_impl_quartz_begin_paint_region
Crash in gdk_window_impl_quartz_begin_paint_region
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
2.90.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-06-21 23:45 UTC by John Ralls
Modified: 2010-06-27 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Quit gdk_window_impl_quartz_begin_paint_region if gdk_region_get_rectangles finds no rectangles. (478 bytes, patch)
2010-06-21 23:45 UTC, John Ralls
accepted-commit_now Details | Review

Description John Ralls 2010-06-21 23:45:10 UTC
Created attachment 164261 [details] [review]
Quit gdk_window_impl_quartz_begin_paint_region if gdk_region_get_rectangles finds no rectangles.

When a theme engine attempts to draw a hidden element, gdk_window_impl_quartz_begin_paint_region can crash because it will attempt to dereference the rects array when there are no rects.

I discovered this when trying to use a theme (MeiMac-Aqua, which uses the Mist engine) with an app that had been modified to use GtkOSXApplication (which puts the menubars on the Mac Menu, and therefore one hides the window's menubar). 

The attached patch prevents the crash.
Comment 1 Matthias Clasen 2010-06-26 18:40:46 UTC
Comment on attachment 164261 [details] [review]
Quit gdk_window_impl_quartz_begin_paint_region if gdk_region_get_rectangles finds no rectangles.

Looks good.
Comment 2 Kristian Rietveld 2010-06-26 19:13:02 UTC
I actually already committed this patch locally in name of John.  Will push this soonish (tonight/tomorrow).  (Have a couple of other patches pending as well that first need a quick spin on Tiger).
Comment 3 Kristian Rietveld 2010-06-27 09:03:28 UTC
Pushed on gtk-2-22: 093a867e51b383b5c1877415b410cc3c122c72da
Pushed on master: 98d47b57bffd545ab32e656ab91740a89baac992