Crash in the gl renderer if the css node contains transform and attached to object to be dragged
I've an image, which is attached to Gtk.DragSource
, with custom css node as follows
image.arrows {
background-color: Tomato;
}
image.arrows:hover {
transform: scaleX(-1);
}
as I start the drag, gtk4 crashes with this message
Gsk:ERROR:../gsk/ngl/gsknglcommandqueue.c:1241:gsk_ngl_command_queue_create_render_target: assertion failed: (width > 0)
Bail out! Gsk:ERROR:../gsk/ngl/gsknglcommandqueue.c:1241:gsk_ngl_command_queue_create_render_target: assertion failed: (width > 0)
fish: Job 1, './builddir/simple-drag-n-drop' terminated by signal SIGABRT (Abort)
I couldn't get a useful trace form gdb, after inserting a debug stub in gtk_renderer_render
to print css node to a file, here is the output
transform {
transform: translate(90, 84);
child: container {
container {
outset-shadow {
blur: 10;
color: rgba(0,0,0,0.2);
dx: 0;
dy: 8;
outline: 0 0 722 613 / 4;
spread: -5;
}
outset-shadow {
blur: 24;
color: rgba(0,0,0,0.14);
dx: 0;
dy: 16;
outline: 0 0 722 613 / 4;
spread: 2;
}
outset-shadow {
blur: 30;
color: rgba(0,0,0,0.12);
dx: 0;
dy: 6;
outline: 0 0 722 613 / 4;
spread: 5;
}
rounded-clip {
clip: 0 0 722 613 / 4;
child: color {
bounds: 0 0 722 613;
color: rgb(18,18,18);
}
}
}
rounded-clip {
clip: 0 0 722 613 / 4;
child: container {
transform {
transform: translate(0, 48);
child: container {
transform {
transform: translate(121, 181) scale(-1, 1) translate(-16, -16);
child: opacity {
opacity: 0.301961;
child: container {
rounded-clip {
clip: -5 -5 42 42 / 8;
child: color {
bounds: -5 -5 42 42;
color: rgba(20,104,71,0.5);
}
}
color-matrix {
matrix: matrix3d(-0.494118, -0.211765, -0.415686, 0, -0.00784314, -0.160784, -0.611765, 0, -0.0509804, -0.454902, -0.490196, 0, 0, 0, 0, 0.87);
offset: 1 1 1 0;
child: texture {
bounds: 0 0 32 32;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAAkElE\
QVRYhe3PsQ6AIAwE0NO4+MWO4qZfrQuDIS0FWmDpJSSEpL0H4PHoEgDcM8vfeIYj/uXDEVT5MESu\
vDuipLwboqbcHNFSbobgyk/i7bBG5MpBvMMSIZVzABNESXkOoEZQw2m5BKjZIyK4IQlQtGdjBh8A\
e7xfspeNuGdRLE9/3bRrVQBM4gAHOGA6wOP5AOZumsjuFkm+AAAAAElFTkSuQmCC\
");
}
}
}
}
}
transform {
transform: translate(505, 165);
child: container {
rounded-clip {
clip: -5 -5 42 42 / 8;
child: color {
bounds: -5 -5 42 42;
color: rgb(255,99,71);
}
}
color-matrix {
matrix: matrix3d(-0.494118, -0.211765, -0.415686, 0, -0.00784314, -0.160784, -0.611765, 0, -0.0509804, -0.454902, -0.490196, 0, 0, 0, 0, 0.87);
offset: 1 1 1 0;
child: texture {
bounds: 0 0 32 32;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAAnklE\
QVRYhe2WwQ5AQAxEBx/tiJvfcvBd67BxoVvVdkWynWQvYuY9DgKItJ7O0E0eW71BwCUhEAIh8GuB\
GcDqwFDtzMhfusSU0+Vod9gSV34SkO7cMhJFqswJUPAEYJIISCVKAma4VIIScIOfKQ1S17l7TSm9\
CclRP7mHhBtcI+EOfyNRDS6RqA7nJD6DUxJq+GAQ2JF/xTcAi2En0ngOlTWbf3+uiNgAAAAASUVO\
RK5CYII=\
");
}
}
}
}
transform {
transform: translate(258, 58);
child: container {
color {
bounds: -8 -8 120 109;
color: rgb(4,170,109);
}
shadow {
shadows: rgb(0,0,0) 1 1 2, rgb(0,0,255) 0 0 25, rgb(0,0,139) 0 0 5;
child: text {
color: rgb(255,255,255);
font: "Cascadia Code 60";
glyphs: "0";
offset: 28 74.2188;
}
}
}
}
transform {
transform: translate(158, 358);
child: container {
color {
bounds: -8 -8 382 35;
color: rgb(33,150,243);
}
text {
color: rgb(255,255,255);
font: "Cascadia Code 12";
glyphs: "Drag the arrows to the nummber and see!";
offset: 0 14.8438;
}
}
}
}
}
container {
container {
outset-shadow {
blur: 1;
color: rgba(0,0,0,0.2);
dx: 0;
dy: 3;
outline: 0 0 722 48 / 4 4 0 0;
spread: -2;
}
outset-shadow {
blur: 2;
color: rgba(0,0,0,0.14);
dx: 0;
dy: 2;
outline: 0 0 722 48 / 4 4 0 0;
}
outset-shadow {
blur: 5;
color: rgba(0,0,0,0.12);
dx: 0;
outline: 0 0 722 48 / 4 4 0 0;
}
rounded-clip {
clip: 0 0 722 48 / 4 4 0 0;
child: color {
bounds: 0 0 722 48;
color: rgb(39,39,39);
}
}
inset-shadow {
color: rgba(255,255,255,0.05);
dx: 0;
outline: 0 0 722 48 / 4 4 0 0;
}
}
transform {
transform: translate(6, 0);
child: container {
transform {
transform: translate(276, 14);
child: text {
color: rgba(255,255,255,0.87);
font: "Ubuntu Bold 12.9990234375";
glyphs: "simple", 16 6,09961, "d", 85 7,14062, "ag-n", 16 6,09961, "d", 85 7,14062, "op";
offset: 0 16.1543;
}
}
transform {
transform: translate(590, 0);
child: container {
transform {
transform: translate(10, 12);
child: container {
rounded-clip {
clip: -10 -6 36 36 / 4;
child: radial-gradient {
bounds: -172 -168 360 360;
center: 8 12;
hradius: 254.558;
vradius: 254.558;
stops: 0.1 rgba(0,0,0,0), 0.1 rgba(0,0,0,0);
}
}
cairo {
bounds: -10 -6 36 36;
pixels: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABmJLR0QA/wD/AP+gvaeTAAAAHElE\
QVRYhe3BMQEAAADCoPVPbQdvoAAAAAAAfgMUZAABS8lfxAAAAABJRU5ErkJggg==\
");
script: url("data:;base64,JSFDYWlyb1NjcmlwdAo=\
");
}
color-matrix {
matrix: matrix3d(-0.494118, -0.211765, -0.415686, 0, -0.00784314, -0.160784, -0.611765, 0, -0.0509804, -0.454902, -0.490196, 0, 0, 0, 0, 0.6);
offset: 1 1 1 0;
child: texture {
bounds: 0 4 16 16;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAAHElE\
QVQ4jWNgGAWjYDAARixi/0nRw0Q9t4xcAAB6DwEEbibXZgAAAABJRU5ErkJggg==\
");
}
}
}
}
transform {
transform: translate(52, 12);
child: container {
rounded-clip {
clip: -10 -6 36 36 / 4;
child: radial-gradient {
bounds: -172 -168 360 360;
center: 8 12;
hradius: 254.558;
vradius: 254.558;
stops: 0.1 rgba(0,0,0,0), 0.1 rgba(0,0,0,0);
}
}
cairo {
bounds: -10 -6 36 36;
pixels: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABmJLR0QA/wD/AP+gvaeTAAAAHElE\
QVRYhe3BMQEAAADCoPVPbQdvoAAAAAAAfgMUZAABS8lfxAAAAABJRU5ErkJggg==\
");
script: url("data:;base64,JSFDYWlyb1NjcmlwdAo=\
");
}
color-matrix {
matrix: matrix3d(-0.494118, -0.211765, -0.415686, 0, -0.00784314, -0.160784, -0.611765, 0, -0.0509804, -0.454902, -0.490196, 0, 0, 0, 0, 0.6);
offset: 1 1 1 0;
child: texture {
bounds: 0 4 16 16;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAATklE\
QVQ4jWNgGAXYwFEGBob/OPARdMWMWAz4T8ACbHowDPjPwMAghCQmjCROEOBSiFWciRgT8QF8Bgjj\
YKMAigMRmwuO4tGMEY2jgIEBAKHUE1gmQly4AAAAAElFTkSuQmCC\
");
}
}
}
}
transform {
transform: translate(94, 12);
child: container {
rounded-clip {
clip: -10 -6 36 36 / 18;
child: radial-gradient {
bounds: -172 -168 360 360;
center: 8 12;
hradius: 254.558;
vradius: 254.558;
stops: 0.1 rgba(0,0,0,0), 0.1 rgba(0,0,0,0);
}
}
cairo {
bounds: -10 -6 36 36;
pixels: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABmJLR0QA/wD/AP+gvaeTAAAAHElE\
QVRYhe3BMQEAAADCoPVPbQdvoAAAAAAAfgMUZAABS8lfxAAAAABJRU5ErkJggg==\
");
script: url("data:;base64,JSFDYWlyb1NjcmlwdAo=\
");
}
color-matrix {
matrix: matrix3d(-0.494118, -0.211765, -0.415686, 0, -0.00784314, -0.160784, -0.611765, 0, -0.0509804, -0.454902, -0.490196, 0, 0, 0, 0, 0.6);
offset: 1 1 1 0;
child: texture {
bounds: 0 4 16 16;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAAa0lE\
QVQ4je3PMQqDUBCE4S/ewaf3P4pilWcTBY+jzRYPMbB9MrDNMPOzw19PWlBRGm/AijkDqDixBaRg\
D++dAbSFLa4FptTjE8UTB8anYJcl4pUNfpuwS05Yb4XSQGoGMEdwuH1VMWUAv6YLt0sgMZE/gIIA\
AAAASUVORK5CYII=\
");
}
}
}
}
}
}
}
}
}
}
}
}
}
Edited by Matthias Clasen