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 710073 - Assertion failure because _gtk_icon_info_load_symbolic_internal does not set error on all failure paths
Assertion failure because _gtk_icon_info_load_symbolic_internal does not set ...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-10-13 23:22 UTC by Mike Henning (drawoc)
Modified: 2013-10-16 01:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set error if g_file_load_contents() fails (538 bytes, patch)
2013-10-14 09:07 UTC, Olivier Brunel (jjacky)
none Details | Review
Set error if g_file_load_contents() fails (538 bytes, patch)
2013-10-14 09:22 UTC, Olivier Brunel (jjacky)
none Details | Review

Description Mike Henning (drawoc) 2013-10-13 23:22:56 UTC
Running gnome-shell 3.10.0.1 from the Arch Linux repo gives me an assertion failure within gtk+ 3.10.1. This is the console output:

Window manager warning: Log level 16: Failed to load apps: Failed to look up menu_file for "applications.menu"

Gjs-Message: JS LOG: GNOME Shell started at Sun Oct 13 2013 18:08:18 GMT-0400 (EDT)

(gnome-shell:6128): GLib-GIO-CRITICAL **: g_task_return_error: assertion 'error != NULL' failed

(gnome-shell:6128): GLib-GIO-CRITICAL **: g_task_propagate_pointer: assertion 'task->result_set == TRUE' failed
**
Gtk:ERROR:gtkicontheme.c:4644:gtk_icon_info_load_symbolic_finish: assertion failed: (pixbuf != NULL)


I haven't done too much debugging, but I'm guessing that on my machine, _gtk_icon_info_load_symbolic_internal hits one of the paths where it returns NULL without setting the error pointer to anything valid. Then, because error is still null, load_symbolic_icon_thread calls g_task_return_error (task, error), passing null as the second argument (causing the first assertion failure). Later, gtk_icon_info_load_symbolic_finish is called, and neither the pixbuf nor the task's error is set, which then causes the final assertion (pixbuf != NULL) to fail on line 4644.

This is the code I'm looking at: https://git.gnome.org/browse/gtk+/tree/gtk/gtkicontheme.c?id=3.10.1#n4482

That's what I'm guessing the problem is. I don't have debugging symbols, so it's really just speculation.
Comment 1 Olivier Brunel (jjacky) 2013-10-14 09:07:01 UTC
Created attachment 257234 [details] [review]
Set error if g_file_load_contents() fails

Looking at the code I don't see many paths where it returns NULL without setting the error, it seems there's only one: if the call to g_file_load_contents() fails.

Attached patch adds the error there as well, does that fixes it?
Comment 2 Olivier Brunel (jjacky) 2013-10-14 09:22:04 UTC
Created attachment 257237 [details] [review]
Set error if g_file_load_contents() fails

Looking at the code I don't see many paths where it returns NULL without setting the error, it seems there's only one: if the call to g_file_load_contents() fails.

Attached patch adds the error there as well, does that fixes it?
Comment 3 Mike Henning (drawoc) 2013-10-14 13:30:31 UTC
Yes, that patch fixes this for me. Thanks!
Comment 4 Matthias Clasen 2013-10-16 01:40:04 UTC
Fixed in 0e866bbba1a7b476cad0d9275cda407d9e04646b