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 755582 - nautilus: placement_grid_mark_icon(): nautilus killed by SIGSEGV
nautilus: placement_grid_mark_icon(): nautilus killed by SIGSEGV
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Crashers
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-24 20:02 UTC by Matthias Clasen
Modified: 2015-10-06 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
canvas-container: avoid creating layout if not grid (2.83 KB, patch)
2015-10-06 17:10 UTC, Carlos Soriano
committed Details | Review

Description Matthias Clasen 2015-09-24 20:02:49 UTC
The downstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1263106 has a stacktrace where nautilus crashes because it passes a NULL grid to placement_grid_mark_icon.

Looking at nautilus-canvas-container.c, all callers of placement_grid_new have a check for the return value being NULL. The one in line 6010 doesn't. And that is what leads to the crash here.
Comment 1 Carlos Soriano 2015-10-06 17:10:23 UTC
Created attachment 312751 [details] [review]
canvas-container: avoid creating layout if not grid

When relayouting we want to finish adding and layouting
the previous layout, but sometimes we can try to layout
when it's actually not possible to create a grid, for
instance if the size of the desktop is not enough or is
not yet allocated.
To prevent that, return early if we try to relayout in
that case and schedule a relayout.
Comment 2 Carlos Soriano 2015-10-06 17:16:34 UTC
I don't know very good this part of the code, but I think this will do.
Thanks for the pointers Mathias!
Attachment 312751 [details] pushed as b189ddf - canvas-container: avoid creating layout if not grid