GNOME Bugzilla – Bug 757150
st_theme_node_prerender_shadow: guard against failure to allocate a texture
Last modified: 2016-05-13 14:16:01 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.
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.
Review of attachment 314143 [details] [review]: OK
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
Patch landed a while ago, closing.