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 757150 - st_theme_node_prerender_shadow: guard against failure to allocate a texture
st_theme_node_prerender_shadow: guard against failure to allocate a texture
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-26 17:46 UTC by Owen Taylor
Modified: 2016-05-13 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st_theme_node_prerender_shadow: guard against failure to allocate a texture (2.04 KB, patch)
2015-10-26 17:46 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2015-10-26 17:46:07 UTC
There are a lot of crashes in Fedora 23 because st_theme_node_prerender_shadow()
fails to allocate a texture. E.g:

 https://retrace.fedoraproject.org/faf/problems/bthash/?bth=0fb9c8e4bc71ccf9637659a49ceaede0ab028e81

This isn't likely to happen for a shadow that is simply big because we 9-slice big
shadows and allocate only a small offscreen texture - but for a texture that is
big in one direction but small in the other we don't slice, and hence can exceed
texture size limits.

This wasn't a frequent crash with F22, so my guess is that something is going wrong
with the size allocation of some element due to F23 changes. Maybe if we fix the
crash we'll get reports of misdrawing.

Long term, it would be good to 3-slice textures that we can't 9-slice so that we
can *always* be sure to allocate a small texture, but this patch just avoids the
crash and causes the shadow not to be rendered - this seems like a safer fix for
3.18 then fooling around with the complex shadow-drawing code.
Comment 1 Owen Taylor 2015-10-26 17:46:11 UTC
Created attachment 314143 [details] [review]
st_theme_node_prerender_shadow: guard against failure to allocate a texture

If we are trying to render a shadow at a size that is very large in one
direction, but small in the other direction (so that we don't 9-slice
the texture), then allocating the backing texture for the offscreen
buffer may fail due to texture-size limits. Don't crash in that case.
Comment 2 Florian Müllner 2015-10-26 17:48:38 UTC
Review of attachment 314143 [details] [review]:

OK
Comment 3 Owen Taylor 2015-10-27 19:57:48 UTC
Comment on attachment 314143 [details] [review]
st_theme_node_prerender_shadow: guard against failure to allocate a texture

Pushed to gnome-3-18 and master

Attachment 314143 [details] pushed as e7528bf - st_theme_node_prerender_shadow: guard against failure to allocate a texture
Comment 4 Florian Müllner 2016-05-13 14:16:01 UTC
Patch landed a while ago, closing.