Pango assertion failure when selecting text in a textview with an emoji
- Go to page 2 of the widget-factory
- Insert an emoji
- Try selecting text anywhere in the line that contains the emoji
(gdb) bt full
#0 0x00007ffff6191eab in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007ffff617c5b9 in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x00007ffff71b19e3 in g_assertion_message (domain=0x7ffff5b31fb5 "Pango",
file=0x7ffff5b378dd "../pango/pango-glyph-item.c", line=319,
func=0x7ffff5b37a60 <__func__.16114> "pango_glyph_item_iter_next_cluster",
message=0x3110820 "assertion failed: (iter->start_char < iter->end_char)")
at ../../../../jhbuild/checkout/glib/glib/gtestutils.c:2878
lstr = "319\000\000\000\000\000\070y\263\365\377\177\000\000є#\367\377\177\000\000\000\000\000\000\000\000\000"
s = 0x359c700 "\220\355\240\002"
#3 0x00007ffff720a36a in g_assertion_message_expr ()
at ../../../../jhbuild/checkout/glib/glib/gtestutils.c:2904
s = 0x3110820 "assertion failed: (iter->start_char < iter->end_char)"
#4 0x00007ffff5b1fcf6 in pango_glyph_item_iter_next_cluster (iter=iter@entry=0x7fffffffabc0)
at ../pango/pango-glyph-item.c:319
glyph_index = 2
glyphs = <optimized out>
cluster = <optimized out>
item = 0x23be180
__func__ = "pango_glyph_item_iter_next_cluster"
#5 0x00007ffff5d51b46 in pango_cairo_renderer_draw_glyph_item (renderer=0xa6cba0,
text=0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️",
glyph_item=<optimized out>, x=0, y=0) at ../pango/pangocairo-render.c:619
crenderer = 0xa6cba0
font = 0x2f9bd00
glyphs = <optimized out>
item = 0x23be180
backward = <optimized out>
iter = {glyph_item = 0x39d6f90,
text = 0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️", start_glyph = 1, start_index = 76, start_char = 2, end_glyph = 2, end_index = 79, end_char = 2}
cairo_clusters = 0x7fffffffabf0
stack_clusters = {{num_bytes = 4, num_glyphs = 1}, {num_bytes = 1,
num_glyphs = 1} <repeats 125 times>, {num_bytes = 0, num_glyphs = 0}, {num_bytes = 0,
num_glyphs = 0}, {num_bytes = 0, num_glyphs = 0}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = 0, num_glyphs = 0}, {num_bytes = -2032681216, num_glyphs = -1899188581}, {
num_bytes = 0, num_glyphs = 0}, {num_bytes = -176148326, num_glyphs = 32767}, {
num_bytes = 37478800, num_glyphs = 0}, {num_bytes = -20164, num_glyphs = 32767}, {
num_bytes = 37580616, num_glyphs = 0}, {num_bytes = 7, num_glyphs = 0}, {num_bytes = 79,
num_glyphs = 0}, {num_bytes = -176147298, num_glyphs = 32767}, {num_bytes = 10,
num_glyphs = 100}, {num_bytes = 459, num_glyphs = 20}, {num_bytes = 91904,
num_glyphs = 25600}, {num_bytes = 38266128, num_glyphs = 0}, {num_bytes = 1,
num_glyphs = 0}, {num_bytes = -176199995, num_glyphs = 32767}, {num_bytes = 1,
num_glyphs = 0}, {num_bytes = -20224, num_glyphs = 32767}, {num_bytes = 38266128,
num_glyphs = 0}, {num_bytes = -176199846, num_glyphs = 32767}, {num_bytes = 49889048,
num_glyphs = 0}, {num_bytes = -2032681216, num_glyphs = -1899188581}, {num_bytes = 38265744,
num_glyphs = 0}, {num_bytes = 38265744, num_glyphs = 0}, {num_bytes = -20224,
num_glyphs = 32767}, {num_bytes = 8257872, num_glyphs = 0}, {num_bytes = 8257592,
num_glyphs = 0}, {num_bytes = -175889869, num_glyphs = 32767}, {num_bytes = -1717986918,
num_glyphs = 1069128089}, {num_bytes = 0, num_glyphs = 0}, {num_bytes = 60649360,
num_glyphs = 0}, {num_bytes = 8257536, num_glyphs = 0}, {num_bytes = 38265744,
num_glyphs = 0}, {num_bytes = 2, num_glyphs = -8388608}, {num_bytes = -8388608,
num_glyphs = 16777215}, {num_bytes = 16777215, num_glyphs = 10}, {num_bytes = 100,
---Type <return> to continue, or q <return> to quit---
num_glyphs = 459}, {num_bytes = 20, num_glyphs = 0}, {num_bytes = 0, num_glyphs = 894}, {
num_bytes = 306, num_glyphs = 359}, {num_bytes = 100, num_glyphs = 5}, {num_bytes = 20,
num_glyphs = 359}, {num_bytes = 100, num_glyphs = 5}, {num_bytes = 20, num_glyphs = 6}, {
num_bytes = 8, num_glyphs = 0}, {num_bytes = 16, num_glyphs = 0}, {num_bytes = 16,
num_glyphs = 0}, {num_bytes = 16, num_glyphs = 0}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = 0, num_glyphs = 0}, {num_bytes = 24, num_glyphs = 1145324612}, {num_bytes = 0,
num_glyphs = 0}, {num_bytes = -20064, num_glyphs = 32767}, {num_bytes = -20064,
num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 1}, {num_bytes = 3, num_glyphs = 0}, {
num_bytes = 0, num_glyphs = 1072693248}, {num_bytes = 0, num_glyphs = 0}, {num_bytes = 0,
num_glyphs = 0}, {num_bytes = 0, num_glyphs = 1072693248}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = 0, num_glyphs = -1067909120}, {num_bytes = 0, num_glyphs = 1072693248}, {
num_bytes = -1701143909, num_glyphs = 1070242458}, {num_bytes = -1869573999,
num_glyphs = 1071681680}, {num_bytes = -1667457891, num_glyphs = 1072471196}, {
num_bytes = 0, num_glyphs = 1072693248}, {num_bytes = 32, num_glyphs = 0}, {
num_bytes = 7922960, num_glyphs = 0}, {num_bytes = -148897619, num_glyphs = 32767}, {
num_bytes = 2, num_glyphs = 0}, {num_bytes = 6455296, num_glyphs = 0}, {
num_bytes = -149332208, num_glyphs = 32767}, {num_bytes = 16, num_glyphs = 0}, {
num_bytes = -19480, num_glyphs = 32767}, {num_bytes = 32, num_glyphs = 0}, {
num_bytes = 7922960, num_glyphs = 0}, {num_bytes = 7922960, num_glyphs = 0}, {
num_bytes = -19480, num_glyphs = 32767}, {num_bytes = -141438560, num_glyphs = 32767}, {
num_bytes = 13275488, num_glyphs = 0}, {num_bytes = 32, num_glyphs = 0}, {
num_bytes = 9099968, num_glyphs = 0}, {num_bytes = -148897619, num_glyphs = 32767}, {
num_bytes = 7061880, num_glyphs = 0}, {num_bytes = -151716893, num_glyphs = 32767}, {
num_bytes = -19664, num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 0}, {num_bytes = 0,
num_glyphs = 0}, {num_bytes = 47, num_glyphs = 0}, {num_bytes = 9099968, num_glyphs = 0}, {
num_bytes = -148895740, num_glyphs = 32767}, {num_bytes = -19648, num_glyphs = 32767}, {
num_bytes = 7061568, num_glyphs = 0}, {num_bytes = -19616, num_glyphs = 32767}, {
num_bytes = -19480, num_glyphs = 32767}, {num_bytes = -141438560, num_glyphs = 32767}, {
num_bytes = -151549040, num_glyphs = 32767}, {num_bytes = -19648, num_glyphs = 32767}, {
num_bytes = -141664651, num_glyphs = 32767}, {num_bytes = -19648, num_glyphs = 32767}, {
num_bytes = -143836333, num_glyphs = 32767}, {num_bytes = 58407840, num_glyphs = -65536}, {
num_bytes = 13275488, num_glyphs = 0}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = -175951962, num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = 37481248, num_glyphs = 0}, {num_bytes = -19568, num_glyphs = 32767}, {
num_bytes = -175950176, num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = -19568, num_glyphs = 32767}, {num_bytes = 36874752, num_glyphs = 0}, {
num_bytes = -175949800, num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 1072693248}, {
num_bytes = 0, num_glyphs = 1072693248}, {num_bytes = 0, num_glyphs = 1072693248}, {
num_bytes = -176096503, num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 0}, {
num_bytes = -176093164, num_glyphs = 32767}, {num_bytes = 36874752, num_glyphs = 0}, {
num_bytes = -19416, num_glyphs = 32767}, {num_bytes = -19408, num_glyphs = 32767}, {
num_bytes = -176117025, num_glyphs = 32767}, {num_bytes = 0, num_glyphs = 1072693248}, {
num_bytes = 0, num_glyphs = 1}}
num_clusters = 1
__func__ = "pango_cairo_renderer_draw_glyph_item"
#6 0x00007ffff5b2d202 in pango_renderer_draw_glyph_item (renderer=0xa6cba0,
text=0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️",
glyph_item=0x39d6f90, x=0, y=0) at ../pango/pango-renderer.c:718
__func__ = "pango_renderer_draw_glyph_item"
_g_boolean_var_ = <optimized out>
#7 0x00007ffff5d52101 in _pango_cairo_do_glyph_item (do_path=0, glyph_item=0x39d6f90,
text=0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️",
cr=0x232aa00) at ../pango/pangocairo-render.c:998
crenderer = 0xa6cba0
renderer = 0xa6cba0
---Type <return> to continue, or q <return> to quit---
crenderer = <optimized out>
renderer = <optimized out>
#8 pango_cairo_show_glyph_item (cr=0x232aa00,
text=0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️",
glyph_item=0x39d6f90) at ../pango/pangocairo-render.c:1127
__func__ = "pango_cairo_show_glyph_item"
#9 0x00007ffff76e304c in gtk_text_renderer_draw_glyph_item (renderer=<optimized out>,
text=0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️",
glyph_item=0x39d6f90, x=461824, y=15360) at ../gtk/gtktextdisplay.c:294
text_renderer = 0xa6cb00
#10 0x00007ffff5b2d202 in pango_renderer_draw_glyph_item (renderer=0xa6cb00,
text=0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️",
glyph_item=0x39d6f90, x=461824, y=15360) at ../pango/pango-renderer.c:718
__func__ = "pango_renderer_draw_glyph_item"
_g_boolean_var_ = <optimized out>
#11 0x00007ffff5b2dcbb in pango_renderer_draw_layout_line (renderer=0xa6cb00, line=line@entry=0x23bd0f0,
x=x@entry=10240, y=y@entry=15360) at ../pango/pango-renderer.c:572
metrics = <optimized out>
run = 0x39d6f90
logical_rect = {x = 36820064, y = 0, width = -175998684, height = 32767}
logical = 0x0
rise = <optimized out>
shape_attr = <optimized out>
ink_rect = {x = 2560, y = 0, width = 30720, height = 0}
ink = <optimized out>
x_off = 451584
glyph_string_width = 18432
state = {underline = PANGO_UNDERLINE_NONE, underline_rect = {x = 30720, y = 36875640, width = 0,
height = 2560}, strikethrough = 0, strikethrough_rect = {x = -2032681216, y = -1899188581,
width = 36875640, height = 0}, logical_rect_end = 480256}
l = 0x3932100
got_overall = 0
overall_rect = {x = -1667457891, y = 1072471196, width = 36875640, height = 0}
text = 0x23d6f00 "Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu.️\220️"
__func__ = "pango_renderer_draw_layout_line"
#12 0x00007ffff76e39b5 in render_para (selection_end_index=56, selection_start_index=55,
line_display=0x231d460, text_renderer=<optimized out>) at ../gtk/gtktextdisplay.c:697
cr = <optimized out>
clip_region = <optimized out>
line = 0x23bd0f0
selection_height = <optimized out>
last_y = 20480
line_rect = {x = 10240, y = 0, width = 470016, height = 20480}
selection_y = 0
first_y = 0
baseline = 15360
at_last_line = <optimized out>
context = 0xca9160
layout = <optimized out>
iter = 0x3932420
byte_offset = 0
screen_width = 873
selection = {red = 0.20784313725490197, green = 0.51764705882352946, blue = 0.89411764705882357,
alpha = 1}
---Type <return> to continue, or q <return> to quit---
first = 0
selection_node = <optimized out>
context = <optimized out>
layout = <optimized out>
byte_offset = <optimized out>
iter = <optimized out>
screen_width = <optimized out>
selection = <optimized out>
first = <optimized out>
selection_node = <optimized out>
line = <optimized out>
selection_y = <optimized out>
selection_height = <optimized out>
first_y = <optimized out>
last_y = <optimized out>
line_rect = <optimized out>
baseline = <optimized out>
at_last_line = <optimized out>
cr = <optimized out>
cr = <optimized out>
cr = <optimized out>
clip_region = <optimized out>
nonlayout_width = <optimized out>
cursor_rect = <optimized out>
cursor_color = <optimized out>
cr = <optimized out>
color = <optimized out>
#13 gtk_text_layout_snapshot (layout=0xc29720, widget=widget@entry=0xbb2890,
snapshot=snapshot@entry=0x7fffe000b0f0, clip=clip@entry=0x7fffffffb910)
at ../gtk/gtktextdisplay.c:898
line_display = 0x231d460
selection_start_index = 55
selection_end_index = 56
line = <optimized out>
context = 0xca9160
offset_y = 0
text_renderer = <optimized out>
selection_start = {dummy1 = 0x8f8e30, dummy2 = 0x875130, dummy3 = 55, dummy4 = -1, dummy5 = -1,
dummy6 = 5, dummy7 = -1269184619, dummy8 = -1503399873, dummy9 = 0x855720,
dummy10 = 0x39e0a80, dummy11 = 0, dummy12 = -1, dummy13 = 0, dummy14 = 0x0}
selection_end = {dummy1 = 0x8f8e30, dummy2 = 0x875130, dummy3 = 56, dummy4 = -1, dummy5 = -1,
dummy6 = -1, dummy7 = -1269184619, dummy8 = -1503399873, dummy9 = 0x2307400,
dummy10 = 0x856140, dummy11 = 0, dummy12 = -1, dummy13 = 0, dummy14 = 0x0}
have_selection = 1
line_list = 0xa9d550
tmp_list = 0x1186470
cr = 0x232aa00
__func__ = "gtk_text_layout_snapshot"
#14 0x00007ffff76ffe13 in gtk_text_view_paint (snapshot=0x7fffe000b0f0, widget=0xbb2890)
at ../gtk/gtktextview.c:5340
text_view = 0xbb2890
priv = 0xbb2600
text_view = <optimized out>
priv = <optimized out>
__func__ = "gtk_text_view_paint"
---Type <return> to continue, or q <return> to quit---
_g_boolean_var_ = <optimized out>
_g_boolean_var_ = <optimized out>
_g_boolean_var_ = <optimized out>
#15 draw_text (snapshot=0x7fffe000b0f0, widget=0xbb2890) at ../gtk/gtktextview.c:5380
text_view = 0xbb2890
priv = 0xbb2600
context = <optimized out>
text_view = <optimized out>
priv = <optimized out>
context = <optimized out>
#16 gtk_text_view_snapshot (widget=0xbb2890, snapshot=0x7fffe000b0f0) at ../gtk/gtktextview.c:5433
priv = 0xbb2600
tmp_list = <optimized out>
context = 0xca9160
bounds = {origin = {x = 0, y = 0}, size = {width = 894, height = 306}}
Couldn't reproduce this in the gtk3 version but I'm not 100% sure I managed to load the same pango.