As the stacktrace below shows the problem is caused by module cogl_texture_new_with_size at cogl/cogl/deprecated/cogl/auto-texture.c .
This module is trying to create a texture with size 2560 x 1024, which is by default is configured by gdm3 with wayland for 2 monitors.
This is not supported by graphics-card, causing error "Failed to create texture 2d due to size/format constraints".
The error is freed by cogl_texture_new_with_size, but the variable skip_error is not set to NULL by the call to cogl_error_free (because the parameter is a copy).
Then module tries to allocate a slice with max_waste -1. This also fails, causing error "Sliced texture size of 2560 x 1024 not possible with max waste set to -1".
Module cogl_set_error complains about the skip_error not being NULL with message "CoglError set...", but does not set a new value to skip_error.
Also the second error is programmed to be freed by cogl_error_free at cogl_texture_new_with_size, that in this way tries to free the same memory twice. This causes the crash "double free or corruption (fasttop)", unless by accident the same memory-address is allocated again.
To solve, the statement skip_error = NULL; should be added:
cogl_texture_new_with_size (unsigned int width,
unsigned int height, CoglTextureFlags flags, CoglPixelFormat internal_format)
{
CoglTexture *tex;
CoglError *skip_error = NULL;
Proposed solution:
As the stacktrace below shows the problem is caused by module cogl_texture_ new_with_ size at cogl/cogl/ deprecated/ cogl/auto- texture. c . new_with_ size, but the variable skip_error is not set to NULL by the call to cogl_error_free (because the parameter is a copy).
This module is trying to create a texture with size 2560 x 1024, which is by default is configured by gdm3 with wayland for 2 monitors.
This is not supported by graphics-card, causing error "Failed to create texture 2d due to size/format constraints".
The error is freed by cogl_texture_
Then module tries to allocate a slice with max_waste -1. This also fails, causing error "Sliced texture size of 2560 x 1024 not possible with max waste set to -1". new_with_ size, that in this way tries to free the same memory twice. This causes the crash "double free or corruption (fasttop)", unless by accident the same memory-address is allocated again.
Module cogl_set_error complains about the skip_error not being NULL with message "CoglError set...", but does not set a new value to skip_error.
Also the second error is programmed to be freed by cogl_error_free at cogl_texture_
To solve, the statement skip_error = NULL; should be added: new_with_ size (unsigned int width,
CoglTextureFlag s flags,
CoglPixelFormat internal_format)
cogl_texture_
unsigned int height,
{
CoglTexture *tex;
CoglError *skip_error = NULL;
_COGL_GET_CONTEXT (ctx, NULL);
if ((_cogl_util_is_pot (width) && _cogl_util_is_pot (height)) || cogl_has_ feature (ctx, COGL_FEATURE_ ID_TEXTURE_ NPOT_BASIC) &&
cogl_has_ feature (ctx, COGL_FEATURE_ ID_TEXTURE_ NPOT_MIPMAP) )) 2d_new_ with_size (ctx, width, height));
(
{
/* First try creating a fast-path non-sliced texture */
tex = COGL_TEXTURE (cogl_texture_
_ cogl_texture_ set_internal_ format (tex, internal_format);
if (!cogl_ texture_ allocate (tex, &skip_error))
cogl_ error_free (skip_error);
skip_ error = NULL;
{
This solution is tested and solves the problem during startup and for right corner click.
Stacktrace with modulenames/ linenumbers: signal_ restore_ set (set=0xbfcb8a0c) at ../sysdeps/ unix/sysv/ linux/internal- signals. h:84 unix/sysv/ linux/raise. c:48 handler = {sa_handler = 0xb7996077 <g_vasprintf+7>, sa_sigaction = 0xb7996077 <g_vasprintf+7>}, sa_mask = {__val = {3080956952, 3060745084, 3080120357, 3217787880, 3060745084, 3217788000, 32868, 20347328, 0, 28984448, 2237142784, 3060745084, 3080120310, 3080956952, 3080956952, 3217788408, 1024, 31097824, 3080018485, 3060691022, 16, 3060756628, 0, 3, 4096, 3065078356, 2, 3066019840, 4096, 3217788168, 3064530671, 0}}, sa_flags = 4096, sa_restorer = 0x3} posix/libc_ fatal.c: 181 entry=0xb6ba525 c "double free or corruption (fasttop)") at malloc.c:5336 <optimized out>) at malloc.c:4216
__PRETTY_ FUNCTION_ _ = "_int_free" i386-linux- gnu/libglib- 2.0.so. 0 i386-linux- gnu/libglib- 2.0.so. 0 new_with_ size (width=2560, height=1024, flags=COGL_ TEXTURE_ NO_SLICING, internal_ format= COGL_PIXEL_ FORMAT_ RGBA_8888_ PRE) at deprecated/ cogl-auto- texture. c:121 offscreen_ effect_ real_create_ texture (effect=0x23c3b00, width=2560, height=1024) at clutter- offscreen- effect. c:141 <optimized out>, fbo_width= <optimized out>, effect=0x23c3b00) at clutter- offscreen- effect. c:189 member_ flags = 44250112, private_ member_ _padding3 = 37501488}
transparent = {private_member_red = 196 '\304', private_ member_ green = 12 '\f', private_member_blue = 81 'Q', private_ member_ alpha = 1 '\001', private_ member_ padding0 = 22088900, private_ member_ padding1 = 0, private_ member_ padding2 = 1}
stage_ width = 2560
stage_ height = 1024
texture_ width = <optimized out>
texture_ height = <optimized out> offscreen_ effect_ pre_paint (effect=0x23c3b00) at clutter- offscreen- effect. c:267 member_ flags = 44250112, private_ member_ _padding3 = 37501488}
transparent = {private_member_red = 196 '\304', private_ member_ green = 12 '\f', private_member_blue = 81 'Q', private_ member_ alpha = 1 '\001', private_ member_ padding0 = 22088900, private_ member_ padding1 = 0, private_ member_ padding2 = 1}
stage_ width = 2560
stage_ height = 1024
texture_ width = <optimized out>
texture_ height = <optimized out> effect_ real_paint (effect=0x23c3b00, flags=CLUTTER_ EFFECT_ PAINT_ACTOR_ DIRTY) at clutter- effect. c:211
pre_paint_ succeeded = <optimized out>
Package: gnome-shell 3.30.0-1ubuntu2
Stacktrace:
#0 0xb7ef9d41 in __kernel_vsyscall ()
#1 0xb6a4e512 in __libc_
set = {__val = {0, 0, 1482184750, 5789784, 2237142784, 273, 273, 3080022123, 3080956952, 16, 3080959932, 16, 3080023695, 16, 3217787612, 3066097232, 3080956952, 3080959932, 19876880, 3217787612, 3080285386, 11, 0, 3080023577, 3080285340, 3080956952, 16, 3080959932, 3080016471, 3217788168, 0, 3217787712}}
pid = <optimized out>
tid = <optimized out>
ret = 0
#2 0xb6a4e512 in __GI_raise (sig=6) at ../sysdeps/
set = {__val = {0, 0, 1482184750, 5789784, 2237142784, 273, 273, 3080022123, 3080956952, 16, 3080959932, 16, 3080023695, 16, 3217787612, 3066097232, 3080956952, 3080959932, 19876880, 3217787612, 3080285386, 11, 0, 3080023577, 3080285340, 3080956952, 16, 3080959932, 3080016471, 3217788168, 0, 3217787712}}
pid = <optimized out>
tid = <optimized out>
ret = 0
#3 0xb6a382b6 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_
sigs = {__val = {32, 0 <repeats 31 times>}}
#4 0xb6a9074c in __libc_message (action=do_abort, fmt=<optimized out>) at ../sysdeps/
ap = <optimized out>
fd = 2
list = <optimized out>
nlist = <optimized out>
cp = <optimized out>
written = <optimized out>
#5 0xb6a975dd in malloc_printerr (str=str@
#6 0xb6a98e6f in _int_free (av=<optimized out>, p=<optimized out>, have_lock=
idx = 6
old = <optimized out>
old2 = <optimized out>
size = <optimized out>
fb = <optimized out>
nextchunk = <optimized out>
nextsize = <optimized out>
nextinuse = <optimized out>
prevsize = <optimized out>
bck = <optimized out>
fwd = <optimized out>
#7 0xb7954290 in g_free () at /usr/lib/
#8 0xb7938c53 in g_error_free () at /usr/lib/
#9 0xb66d7058 in cogl_error_free (error=0x16cba70) at cogl-error.c:45
#10 0xb66db62c in cogl_texture_
tex = 0x1da83e0
skip_error = 0x16cba70
ctx = <optimized out>
#11 0xb6e9a618 in clutter_
#12 0xb6e9ab6b in update_fbo (fbo_height=
self = 0x23c3b00
priv = 0x23c3a30
self = 0x23c3b00
priv = 0x23c3a30
box = {x1 = 3.83952416e-38, y1 = -7.05064576e-06, x2 = -7.46333353e-06, y2 = -6.81363736e-06}
stage = <optimized out>
projection = {xx = 3.83970801e-38, yx = 3.83946587e-38, zx = 3.83939748e-38, wx = 3.83952416e-38, xy = 3.83970801e-38, yy = 3.71409562e-38, zy = -6.8135173e-06, wy = -3.49830611e-06, xz = -1.59032059, yz = 3.3734514e-37, zz = 3.83939748e-38, wz = -6.83245798e-06, xw = 3.83970801e-38, yw = 3.83946587e-38, zw = 0, ww = -1.59032059, private_member_inv = {1.33061024e-37, 3.83970801e-38, -6.83241933e-06, -2.85067945e-05, 3.83970801e-38, 3.83946587e-38, 3.83939748e-38, -2.43004561e-05, 3.83970801e-38, 3.83946587e-38, 3.83970801e-38, -1.01604956e-35, 2.80259693e-45, -2.02588271e-05, -3.4981374e-06, -7.46333353e-06}, private_member_type = 37501696, private_
fbo_width = 2560
fbo_height = 1024
width = -4.73312366e-06
height = -7.46333353e-06
xexpand = <optimized out>
yexpand = <optimized out>
#13 0xb6e9ab6b in clutter_
self = 0x23c3b00
priv = 0x23c3a30
box = {x1 = 3.83952416e-38, y1 = -7.05064576e-06, x2 = -7.46333353e-06, y2 = -6.81363736e-06}
stage = <optimized out>
projection = {xx = 3.83970801e-38, yx = 3.83946587e-38, zx = 3.83939748e-38, wx = 3.83952416e-38, xy = 3.83970801e-38, yy = 3.71409562e-38, zy = -6.8135173e-06, wy = -3.49830611e-06, xz = -1.59032059, yz = 3.3734514e-37, zz = 3.83939748e-38, wz = -6.83245798e-06, xw = 3.83970801e-38, yw = 3.83946587e-38, zw = 0, ww = -1.59032059, private_member_inv = {1.33061024e-37, 3.83970801e-38, -6.83241933e-06, -2.85067945e-05, 3.83970801e-38, 3.83946587e-38, 3.83939748e-38, -2.43004561e-05, 3.83970801e-38, 3.83946587e-38, 3.83970801e-38, -1.01604956e-35, 2.80259693e-45, -2.02588271e-05, -3.4981374e-06, -7.46333353e-06}, private_member_type = 37501696, private_
fbo_width = 2560
fbo_height = 1024
width = -4.73312366e-06
height = -7.46333353e-06
xexpand = <optimized out>
yexpand = <optimized out>
#14 0xb6e8087b in clutter_
actor_meta = 0x23c3b00
actor = <optimized out>