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 695278 - Avoid passing a NULL title to setTitle
Avoid passing a NULL title to setTitle
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-06 11:10 UTC by Aleksander Morgado
Modified: 2013-03-06 11:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch from the original reporter (1.84 KB, patch)
2013-03-06 11:12 UTC, Aleksander Morgado
committed Details | Review

Description Aleksander Morgado 2013-03-06 11:10:56 UTC
In gdk_window_set_decorations() we should avoid passing a NULL title NSString to setTitle, or the program will crash badly:

*** Assertion failure in -[GdkQuartzWindow setTitle:], /SourceCache/AppKit/AppKit-1138.51/AppKit.subproj/NSWindow.m:2538
An uncaught exception was raised
Invalid parameter not satisfying: aString != nil
 (
0 CoreFoundation 0x901d0a67 __raiseError + 231
1 libobjc.A.dylib 0x9c4e0149 objc_exception_throw + 155
2 CoreFoundation 0x90138289 +[NSException raise:format:arguments:] + 137
3 Foundation 0x9ccb4233 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 AppKit 0x919a6ee0 -[NSWindow setTitle:] + 144
5 libgdk-quartz-2.0.0.dylib 0x05bed39b gdk_window_set_decorations + 1003
6 libgdk-quartz-2.0.0.dylib 0x05bedfdc gdk_window_fullscreen + 284
7 libgtk-quartz-2.0.0.dylib 0x0594508e gtk_window_fullscreen + 254
...
Comment 1 Aleksander Morgado 2013-03-06 11:12:50 UTC
Created attachment 238188 [details] [review]
Patch from the original reporter
Comment 2 Kristian Rietveld 2013-03-06 11:23:24 UTC
Comment on attachment 238188 [details] [review]
Patch from the original reporter

Looks fine to me -- please commit.
Comment 3 Aleksander Morgado 2013-03-06 11:41:10 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 4 Aleksander Morgado 2013-03-06 11:41:36 UTC
Comment on attachment 238188 [details] [review]
Patch from the original reporter

Pushed to gtk-2-24, gtk-3-6 and git master