Bug#930038: gedit crash in very long lines after searching for words (failed to allocate X bytes)

Bernhard Übelacker bernhardu at mailbox.org
Wed Jun 5 22:41:19 BST 2019


Dear Maintainer,
I just tried to reproduce the crash and succeeded
in a wayland session.

Following are the last frames where gedit aborts,
with debug symbol.

When debugging the issue it looks like we reach already line 327
with the pointer in "start" being higher that that in "end".

Therefore the difference gets negative and casted to an unsigned long.
I could not find which of the both variables would be wrong.

An example debug session is in attached file.


Upstream changed function notify_surrounding_text a little bit,
especially commit [1] which is not inside a release tag,
but unfortunately I guess this commit would not help here,
as we did already not enter lines 303/304.


Kind regards,
Bernhard



(gdb) bt
#0  0x00007ff119c84ca5 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
#1  0x00007ff119c85d3d in g_log_default_handler (log_domain=log_domain at entry=0x7ff119cca00e "GLib", log_level=log_level at entry=6, message=message at entry=0x560b3fd8b790 "../../../glib/gmem.c:105: failed to allocate 18446744073709470612 bytes", unused_data=unused_data at entry=0x0) at ../../../glib/gmessages.c:3111
#2  0x00007ff119c85f8f in g_logv (log_domain=0x7ff119cca00e "GLib", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args at entry=0x7ffd85588c30) at ../../../glib/gmessages.c:1350
#3  0x00007ff119c8617f in g_log (log_domain=log_domain at entry=0x7ff119cca00e "GLib", log_level=log_level at entry=G_LOG_LEVEL_ERROR, format=format at entry=0x7ff119cd4488 "%s: failed to allocate %lu bytes") at ../../../glib/gmessages.c:1413
#4  0x00007ff119c8492a in g_malloc (n_bytes=n_bytes at entry=18446744073709470612) at ../../../glib/gmem.c:104
#5  0x00007ff119c9e54a in g_strndup (str=str at entry=0x560b401352ec "a è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Qu"..., n=18446744073709470611) at ../../../glib/gstrfuncs.c:425
#6  0x00007ff10774663c in notify_surrounding_text (context=0x560b3f4b59c0) at ../../../../../modules/input/imwayland.c:335
#7  gtk_im_context_wayland_set_surrounding (context=0x560b3f4b59c0, text=<optimized out>, len=<optimized out>, cursor_index=<optimized out>) at ../../../../../modules/input/imwayland.c:800
#8  0x00007ff11a393f18 in gtk_text_view_retrieve_surrounding_handler (context=context at entry=0x560b3f2c3fa0, text_view=<optimized out>) at ../../../../gtk/gtktextview.c:9182
#9  0x00007ff11a448c26 in _gtk_marshal_BOOLEAN__VOID (closure=0x560b3f2c9af0, return_value=0x7ffd85588fe0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../../gtk/gtkmarshalers.c:1901
#10 0x00007ff11ad24c7d in g_closure_invoke (closure=0x560b3f2c9af0, return_value=0x7ffd85588fe0, n_param_values=1, param_values=0x7ffd85589040, invocation_hint=0x7ffd85588fc0) at ../../../gobject/gclosure.c:810
#11 0x00007ff11ad38345 in signal_emit_unlocked_R (node=<optimized out>, detail=detail at entry=0, instance=instance at entry=0x560b3f2c3fa0, emission_return=emission_return at entry=0x7ffd85589140, instance_and_params=instance_and_params at entry=0x7ffd85589040) at ../../../gobject/gsignal.c:3635


modules/input/imwayland.c:
327           if (start != context->surrounding.text)
328             start = g_utf8_next_char (start);
329           if (end != &context->surrounding.text[len])
330             end = g_utf8_find_prev_char (context->surrounding.text, end);
331
332           cursor -= start - context->surrounding.text;
333           anchor -= start - context->surrounding.text;
334
335           str = g_strndup (start, end - start);


[1] https://gitlab.gnome.org/GNOME/gtk/commit/81c8efc863fed7f3d348b9050db5f031fa3fceba
-------------- next part --------------

# Buster amd64 qemu VM 2019-06-05


apt update
apt dist-upgrade


apt install systemd-coredump gnome gdb gedit-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libffi6-dbg
apt build-dep libgtk-3-0


reboot



# Login to wayland session



mkdir /home/benutzer/source/libgtk-3-0/orig -p
cd    /home/benutzer/source/libgtk-3-0/orig
apt source libgtk-3-0
cd



export DISPLAY=:0


mkdir /tmp/2
cd    /tmp/2
for (( i=0; i<3000; i++)); do \
  echo -n "Questa è una riga di prova. " >> test.txt; done; echo -n " \
  cercami " >> test.txt; for (( i=0; i<3000; i++)); do \
  echo -n "Questa è una riga di prova. " >> test.txt; done

LANG=C gedit test.txt

# Now press Ctrl-F (to search), insert the word: "cercami", search the 
# word, and click with the mouse cursor near the selected word cercami




##############



benutzer at debian:/tmp/2$ ls -lisah test.txt
917573 172K -rw-r--r-- 1 benutzer benutzer 170K Jun  5 22:06 test.txt
benutzer at debian:/tmp/2$ file test.txt 
test.txt: UTF-8 Unicode text, with very long lines, with no line terminators


benutzer at debian:/tmp/2$ LANG=C gedit test.txt

(gedit:2173): GLib-ERROR **: 22:07:03.515: ../../../glib/gmem.c:105: failed to allocate 18446744073709470612 bytes
Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)



dmesg:
[   94.367443] traps: gedit[2173] trap int3 ip:7ff119c84ca5 sp:7ffd85588ae0 error:0 in libglib-2.0.so.0.5800.3[7ff119c4c000+7e000]



root at debian:~# journalctl --no-pager
Jun 05 22:07:03 debian kernel: do_trap: 6 callbacks suppressed
Jun 05 22:07:03 debian kernel: traps: gedit[2173] trap int3 ip:7ff119c84ca5 sp:7ffd85588ae0 error:0 in libglib-2.0.so.0.5800.3[7ff119c4c000+7e000]
Jun 05 22:07:03 debian systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Jun 05 22:07:03 debian systemd[1]: Started Process Core Dump (PID 2595/UID 0).
Jun 05 22:07:03 debian systemd-coredump[2596]: Process 2173 (gedit) of user 1000 dumped core.
                                               
                                               Stack trace of thread 2173:
                                               #0  0x00007ff119c84ca5 n/a (libglib-2.0.so.0)
                                               #1  0x00007ff119c85d3d g_log_default_handler (libglib-2.0.so.0)
                                               #2  0x00007ff119c85f8f g_logv (libglib-2.0.so.0)
                                               #3  0x00007ff119c8617f g_log (libglib-2.0.so.0)
                                               #4  0x00007ff119c8492a g_malloc (libglib-2.0.so.0)
                                               #5  0x00007ff119c9e54a g_strndup (libglib-2.0.so.0)
                                               #6  0x00007ff10774663c n/a (im-wayland.so)
                                               #7  0x00007ff11a393f18 n/a (libgtk-3.so.0)
                                               #8  0x00007ff11a448c26 n/a (libgtk-3.so.0)
                                               #9  0x00007ff11ad24c7d g_closure_invoke (libgobject-2.0.so.0)
                                               #10 0x00007ff11ad38345 n/a (libgobject-2.0.so.0)
                                               #11 0x00007ff11ad4094b g_signal_emit_valist (libgobject-2.0.so.0)
                                               #12 0x00007ff11ad41df4 g_signal_emit_by_name (libgobject-2.0.so.0)
                                               #13 0x00007ff11a296d48 n/a (libgtk-3.so.0)
                                               #14 0x00007ff11a448c26 n/a (libgtk-3.so.0)
                                               #15 0x00007ff11ad24c7d g_closure_invoke (libgobject-2.0.so.0)
                                               #16 0x00007ff11ad38345 n/a (libgobject-2.0.so.0)
                                               #17 0x00007ff11ad4094b g_signal_emit_valist (libgobject-2.0.so.0)
                                               #18 0x00007ff11ad41df4 g_signal_emit_by_name (libgobject-2.0.so.0)
                                               #19 0x00007ff107746d9d n/a (im-wayland.so)
                                               #20 0x00007ff11a398555 n/a (libgtk-3.so.0)
                                               #21 0x00007ff11a44617b n/a (libgtk-3.so.0)
                                               #22 0x00007ff11ad24c7d g_closure_invoke (libgobject-2.0.so.0)
                                               #23 0x00007ff11ad37b9d n/a (libgobject-2.0.so.0)
                                               #24 0x00007ff11ad4094b g_signal_emit_valist (libgobject-2.0.so.0)
                                               #25 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                                               #26 0x00007ff11a3f4324 n/a (libgtk-3.so.0)
                                               #27 0x00007ff11a407065 gtk_widget_send_focus_change (libgtk-3.so.0)
                                               #28 0x00007ff11a40908f n/a (libgtk-3.so.0)
                                               #29 0x00007ff11a40933a n/a (libgtk-3.so.0)
                                               #30 0x00007ff11ad27fef g_cclosure_marshal_VOID__OBJECTv (libgobject-2.0.so.0)
                                               #31 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                                               #32 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                                               #33 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                                               #34 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                                               #35 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                                               #36 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                                               #37 0x00007ff11a3f7fda gtk_widget_grab_focus (libgtk-3.so.0)
                                               #38 0x00007ff11a39d8bb n/a (libgtk-3.so.0)
                                               #39 0x00007ff1196058ee ffi_call_unix64 (libffi.so.6)
                                               #40 0x00007ff1196052bf ffi_call (libffi.so.6)
                                               #41 0x00007ff11ad258f6 g_cclosure_marshal_generic_va (libgobject-2.0.so.0)
                                               #42 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                                               #43 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                                               #44 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                                               #45 0x00007ff11a26e658 n/a (libgtk-3.so.0)
                                               #46 0x00007ff11ad27cf2 g_cclosure_marshal_VOID__BOXEDv (libgobject-2.0.so.0)
                                               #47 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                                               #48 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                                               #49 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                                               #50 0x00007ff11a26b4fe n/a (libgtk-3.so.0)
                                               #51 0x00007ff11a26ca23 n/a (libgtk-3.so.0)
                                               #52 0x00007ff11a26f886 n/a (libgtk-3.so.0)
                                               #53 0x00007ff11a23844c gtk_event_controller_handle_event (libgtk-3.so.0)
                                               #54 0x00007ff11a3f207b n/a (libgtk-3.so.0)
                                               #55 0x00007ff11a446274 n/a (libgtk-3.so.0)
                                               #56 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                                               #57 0x00007ff11ad40d14 g_signal_emit_valist (libgobject-2.0.so.0)
                                               #58 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                                               #59 0x00007ff11a3f4324 n/a (libgtk-3.so.0)
                                               #60 0x00007ff11a2b4976 n/a (libgtk-3.so.0)
                                               #61 0x00007ff11a2b6a83 gtk_main_do_event (libgtk-3.so.0)
                                               #62 0x00007ff119fb8465 n/a (libgdk-3.so.0)
                                               #63 0x00007ff11a0135b2 n/a (libgdk-3.so.0)
                                               
                                               Stack trace of thread 2174:
                                               #0  0x00007ff11ac41819 __poll (libc.so.6)
                                               #1  0x00007ff119c7f136 n/a (libglib-2.0.so.0)
                                               #2  0x00007ff119c7f25c g_main_context_iteration (libglib-2.0.so.0)
                                               #3  0x00007ff119c7f2a1 n/a (libglib-2.0.so.0)
                                               #4  0x00007ff119ca7425 n/a (libglib-2.0.so.0)
                                               #5  0x00007ff119ad6fa3 start_thread (libpthread.so.0)
                                               #6  0x00007ff11ac4c4cf __clone (libc.so.6)
                                               
                                               Stack trace of thread 2177:
                                               #0  0x00007ff11ac41819 __poll (libc.so.6)
                                               #1  0x00007ff119c7f136 n/a (libglib-2.0.so.0)
                                               #2  0x00007ff119c7f25c g_main_context_iteration (libglib-2.0.so.0)
                                               #3  0x00007ff1143ceffd n/a (libdconfsettings.so)
                                               #4  0x00007ff119ca7425 n/a (libglib-2.0.so.0)
                                               #5  0x00007ff119ad6fa3 start_thread (libpthread.so.0)
                                               #6  0x00007ff11ac4c4cf __clone (libc.so.6)
                                               
                                               Stack trace of thread 2175:
                                               #0  0x00007ff11ac41819 __poll (libc.so.6)
                                               #1  0x00007ff119c7f136 n/a (libglib-2.0.so.0)
                                               #2  0x00007ff119c7f4c2 g_main_loop_run (libglib-2.0.so.0)
                                               #3  0x00007ff11ae6ef66 n/a (libgio-2.0.so.0)
                                               #4  0x00007ff119ca7425 n/a (libglib-2.0.so.0)
                                               #5  0x00007ff119ad6fa3 start_thread (libpthread.so.0)
                                               #6  0x00007ff11ac4c4cf __clone (libc.so.6)
Jun 05 22:07:04 debian systemd[1]: systemd-coredump at 0-2595-0.service: Succeeded.





root at debian:~# coredumpctl list
TIME                            PID   UID   GID SIG COREFILE  EXE
Wed 2019-06-05 22:07:03 CEST   2173  1000  1000   5 present   /usr/bin/gedit




root at debian:~# coredumpctl gdb 2173
           PID: 2173 (gedit)
           UID: 1000 (benutzer)
           GID: 1000 (benutzer)
        Signal: 5 (TRAP)
     Timestamp: Wed 2019-06-05 22:07:03 CEST (1min 59s ago)
  Command Line: gedit test.txt
    Executable: /usr/bin/gedit
 Control Group: /user.slice/user-1000.slice/session-4.scope
          Unit: session-4.scope
         Slice: user-1000.slice
       Session: 4
     Owner UID: 1000 (benutzer)
       Boot ID: 8fd48ed1b32d4756b332a7c6324c4a36
    Machine ID: 32f43b50ac8c4b21941bc0b02f8e7811
      Hostname: debian
       Storage: /var/lib/systemd/coredump/core.gedit.1000.8fd48ed1b32d4756b332a7c6324c4a36.2173.1559765223000000.lz4
       Message: Process 2173 (gedit) of user 1000 dumped core.
                
                Stack trace of thread 2173:
                #0  0x00007ff119c84ca5 n/a (libglib-2.0.so.0)
                #1  0x00007ff119c85d3d g_log_default_handler (libglib-2.0.so.0)
                #2  0x00007ff119c85f8f g_logv (libglib-2.0.so.0)
                #3  0x00007ff119c8617f g_log (libglib-2.0.so.0)
                #4  0x00007ff119c8492a g_malloc (libglib-2.0.so.0)
                #5  0x00007ff119c9e54a g_strndup (libglib-2.0.so.0)
                #6  0x00007ff10774663c n/a (im-wayland.so)
                #7  0x00007ff11a393f18 n/a (libgtk-3.so.0)
                #8  0x00007ff11a448c26 n/a (libgtk-3.so.0)
                #9  0x00007ff11ad24c7d g_closure_invoke (libgobject-2.0.so.0)
                #10 0x00007ff11ad38345 n/a (libgobject-2.0.so.0)
                #11 0x00007ff11ad4094b g_signal_emit_valist (libgobject-2.0.so.0)
                #12 0x00007ff11ad41df4 g_signal_emit_by_name (libgobject-2.0.so.0)
                #13 0x00007ff11a296d48 n/a (libgtk-3.so.0)
                #14 0x00007ff11a448c26 n/a (libgtk-3.so.0)
                #15 0x00007ff11ad24c7d g_closure_invoke (libgobject-2.0.so.0)
                #16 0x00007ff11ad38345 n/a (libgobject-2.0.so.0)
                #17 0x00007ff11ad4094b g_signal_emit_valist (libgobject-2.0.so.0)
                #18 0x00007ff11ad41df4 g_signal_emit_by_name (libgobject-2.0.so.0)
                #19 0x00007ff107746d9d n/a (im-wayland.so)
                #20 0x00007ff11a398555 n/a (libgtk-3.so.0)
                #21 0x00007ff11a44617b n/a (libgtk-3.so.0)
                #22 0x00007ff11ad24c7d g_closure_invoke (libgobject-2.0.so.0)
                #23 0x00007ff11ad37b9d n/a (libgobject-2.0.so.0)
                #24 0x00007ff11ad4094b g_signal_emit_valist (libgobject-2.0.so.0)
                #25 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                #26 0x00007ff11a3f4324 n/a (libgtk-3.so.0)
                #27 0x00007ff11a407065 gtk_widget_send_focus_change (libgtk-3.so.0)
                #28 0x00007ff11a40908f n/a (libgtk-3.so.0)
                #29 0x00007ff11a40933a n/a (libgtk-3.so.0)
                #30 0x00007ff11ad27fef g_cclosure_marshal_VOID__OBJECTv (libgobject-2.0.so.0)
                #31 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                #32 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                #33 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                #34 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                #35 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                #36 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                #37 0x00007ff11a3f7fda gtk_widget_grab_focus (libgtk-3.so.0)
                #38 0x00007ff11a39d8bb n/a (libgtk-3.so.0)
                #39 0x00007ff1196058ee ffi_call_unix64 (libffi.so.6)
                #40 0x00007ff1196052bf ffi_call (libffi.so.6)
                #41 0x00007ff11ad258f6 g_cclosure_marshal_generic_va (libgobject-2.0.so.0)
                #42 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                #43 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                #44 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                #45 0x00007ff11a26e658 n/a (libgtk-3.so.0)
                #46 0x00007ff11ad27cf2 g_cclosure_marshal_VOID__BOXEDv (libgobject-2.0.so.0)
                #47 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                #48 0x00007ff11ad4132d g_signal_emit_valist (libgobject-2.0.so.0)
                #49 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                #50 0x00007ff11a26b4fe n/a (libgtk-3.so.0)
                #51 0x00007ff11a26ca23 n/a (libgtk-3.so.0)
                #52 0x00007ff11a26f886 n/a (libgtk-3.so.0)
                #53 0x00007ff11a23844c gtk_event_controller_handle_event (libgtk-3.so.0)
                #54 0x00007ff11a3f207b n/a (libgtk-3.so.0)
                #55 0x00007ff11a446274 n/a (libgtk-3.so.0)
                #56 0x00007ff11ad24eb6 n/a (libgobject-2.0.so.0)
                #57 0x00007ff11ad40d14 g_signal_emit_valist (libgobject-2.0.so.0)
                #58 0x00007ff11ad4191f g_signal_emit (libgobject-2.0.so.0)
                #59 0x00007ff11a3f4324 n/a (libgtk-3.so.0)
                #60 0x00007ff11a2b4976 n/a (libgtk-3.so.0)
                #61 0x00007ff11a2b6a83 gtk_main_do_event (libgtk-3.so.0)
                #62 0x00007ff119fb8465 n/a (libgdk-3.so.0)
                #63 0x00007ff11a0135b2 n/a (libgdk-3.so.0)
                
                Stack trace of thread 2174:
                #0  0x00007ff11ac41819 __poll (libc.so.6)
                #1  0x00007ff119c7f136 n/a (libglib-2.0.so.0)
                #2  0x00007ff119c7f25c g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007ff119c7f2a1 n/a (libglib-2.0.so.0)
                #4  0x00007ff119ca7425 n/a (libglib-2.0.so.0)
                #5  0x00007ff119ad6fa3 start_thread (libpthread.so.0)
                #6  0x00007ff11ac4c4cf __clone (libc.so.6)
                
                Stack trace of thread 2177:
                #0  0x00007ff11ac41819 __poll (libc.so.6)
                #1  0x00007ff119c7f136 n/a (libglib-2.0.so.0)
                #2  0x00007ff119c7f25c g_main_context_iteration (libglib-2.0.so.0)
                #3  0x00007ff1143ceffd n/a (libdconfsettings.so)
                #4  0x00007ff119ca7425 n/a (libglib-2.0.so.0)
                #5  0x00007ff119ad6fa3 start_thread (libpthread.so.0)
                #6  0x00007ff11ac4c4cf __clone (libc.so.6)
                
                Stack trace of thread 2175:
                #0  0x00007ff11ac41819 __poll (libc.so.6)
                #1  0x00007ff119c7f136 n/a (libglib-2.0.so.0)
                #2  0x00007ff119c7f4c2 g_main_loop_run (libglib-2.0.so.0)
                #3  0x00007ff11ae6ef66 n/a (libgio-2.0.so.0)
                #4  0x00007ff119ca7425 n/a (libglib-2.0.so.0)
                #5  0x00007ff119ad6fa3 start_thread (libpthread.so.0)
                #6  0x00007ff11ac4c4cf __clone (libc.so.6)

GNU gdb (Debian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/gedit...(no debugging symbols found)...done.
[New LWP 2173]
[New LWP 2174]
[New LWP 2177]
[New LWP 2175]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `gedit test.txt'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007ff119c84ca5 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
[Current thread is 1 (Thread 0x7ff115c0da80 (LWP 2173))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0x00007ff119c84ca5 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ff119c85d3d in g_log_default_handler () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ff119c85f8f in g_logv () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ff119c8617f in g_log () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ff119c8492a in g_malloc () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ff119c9e54a in g_strndup () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ff10774663c in ?? () from /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-wayland.so
#7  0x00007ff11a393f18 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#8  0x00007ff11a448c26 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#9  0x00007ff11ad24c7d in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ff11ad38345 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ff11ad4094b in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ff11ad41df4 in g_signal_emit_by_name () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ff11a296d48 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#14 0x00007ff11a448c26 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x00007ff11ad24c7d in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ff11ad38345 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ff11ad4094b in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ff11ad41df4 in g_signal_emit_by_name () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ff107746d9d in ?? () from /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-wayland.so
#20 0x00007ff11a398555 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#21 0x00007ff11a44617b in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#22 0x00007ff11ad24c7d in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ff11ad37b9d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ff11ad4094b in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007ff11ad4191f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007ff11a3f4324 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#27 0x00007ff11a407065 in gtk_widget_send_focus_change () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#28 0x00007ff11a40908f in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#29 0x00007ff11a40933a in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#30 0x00007ff11ad27fef in g_cclosure_marshal_VOID__OBJECTv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007ff11ad24eb6 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007ff11ad4132d in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#33 0x00007ff11ad4191f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#34 0x00007ff11ad24eb6 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#35 0x00007ff11ad4132d in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#36 0x00007ff11ad4191f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#37 0x00007ff11a3f7fda in gtk_widget_grab_focus () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#38 0x00007ff11a39d8bb in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#39 0x00007ff1196058ee in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#40 0x00007ff1196052bf in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#41 0x00007ff11ad258f6 in g_cclosure_marshal_generic_va () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#42 0x00007ff11ad24eb6 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#43 0x00007ff11ad4132d in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#44 0x00007ff11ad4191f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#45 0x00007ff11a26e658 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#46 0x00007ff11ad27cf2 in g_cclosure_marshal_VOID__BOXEDv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#47 0x00007ff11ad24eb6 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#48 0x00007ff11ad4132d in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#49 0x00007ff11ad4191f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#50 0x00007ff11a26b4fe in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#51 0x00007ff11a26ca23 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#52 0x00007ff11a26f886 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#53 0x00007ff11a23844c in gtk_event_controller_handle_event () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#54 0x00007ff11a3f207b in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#55 0x00007ff11a446274 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#56 0x00007ff11ad24eb6 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#57 0x00007ff11ad40d14 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#58 0x00007ff11ad4191f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#59 0x00007ff11a3f4324 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#60 0x00007ff11a2b4976 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#61 0x00007ff11a2b6a83 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#62 0x00007ff119fb8465 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#63 0x00007ff11a0135b2 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#64 0x00007ff119c7ef2e in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#65 0x00007ff119c7f1c8 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#66 0x00007ff119c7f25c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#67 0x00007ff11ae3599d in g_application_run () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#68 0x0000560b3d0891fa in main ()





Core was generated by `gedit test.txt'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007ff119c84ca5 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
554     ../../../glib/gmessages.c: Datei oder Verzeichnis nicht gefunden.
[Current thread is 1 (Thread 0x7ff115c0da80 (LWP 2173))]
(gdb) set width 0
(gdb) set pagination off
(gdb) directory /home/benutzer/source/libgtk-3-0/orig/gtk+3.0-3.24.5/debian/missing-sources/zlib.js-0.1.6/define/typedarray
Source directories searched: /home/benutzer/source/libgtk-3-0/orig/gtk+3.0-3.24.5/debian/missing-sources/zlib.js-0.1.6/define/typedarray:$cdir:$cwd
(gdb) bt
#0  0x00007ff119c84ca5 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
#1  0x00007ff119c85d3d in g_log_default_handler (log_domain=log_domain at entry=0x7ff119cca00e "GLib", log_level=log_level at entry=6, message=message at entry=0x560b3fd8b790 "../../../glib/gmem.c:105: failed to allocate 18446744073709470612 bytes", unused_data=unused_data at entry=0x0) at ../../../glib/gmessages.c:3111
#2  0x00007ff119c85f8f in g_logv (log_domain=0x7ff119cca00e "GLib", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args at entry=0x7ffd85588c30) at ../../../glib/gmessages.c:1350
#3  0x00007ff119c8617f in g_log (log_domain=log_domain at entry=0x7ff119cca00e "GLib", log_level=log_level at entry=G_LOG_LEVEL_ERROR, format=format at entry=0x7ff119cd4488 "%s: failed to allocate %lu bytes") at ../../../glib/gmessages.c:1413
#4  0x00007ff119c8492a in g_malloc (n_bytes=n_bytes at entry=18446744073709470612) at ../../../glib/gmem.c:104
#5  0x00007ff119c9e54a in g_strndup (str=str at entry=0x560b401352ec "a è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Qu"..., n=18446744073709470611) at ../../../glib/gstrfuncs.c:425
#6  0x00007ff10774663c in notify_surrounding_text (context=0x560b3f4b59c0) at ../../../../../modules/input/imwayland.c:335
#7  gtk_im_context_wayland_set_surrounding (context=0x560b3f4b59c0, text=<optimized out>, len=<optimized out>, cursor_index=<optimized out>) at ../../../../../modules/input/imwayland.c:800
#8  0x00007ff11a393f18 in gtk_text_view_retrieve_surrounding_handler (context=context at entry=0x560b3f2c3fa0, text_view=<optimized out>) at ../../../../gtk/gtktextview.c:9182
#9  0x00007ff11a448c26 in _gtk_marshal_BOOLEAN__VOID (closure=0x560b3f2c9af0, return_value=0x7ffd85588fe0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../../gtk/gtkmarshalers.c:1901
#10 0x00007ff11ad24c7d in g_closure_invoke (closure=0x560b3f2c9af0, return_value=0x7ffd85588fe0, n_param_values=1, param_values=0x7ffd85589040, invocation_hint=0x7ffd85588fc0) at ../../../gobject/gclosure.c:810
#11 0x00007ff11ad38345 in signal_emit_unlocked_R (node=<optimized out>, detail=detail at entry=0, instance=instance at entry=0x560b3f2c3fa0, emission_return=emission_return at entry=0x7ffd85589140, instance_and_params=instance_and_params at entry=0x7ffd85589040) at ../../../gobject/gsignal.c:3635
#12 0x00007ff11ad4094b in g_signal_emit_valist (instance=instance at entry=0x560b3f2c3fa0, signal_id=signal_id at entry=297, detail=detail at entry=0, var_args=var_args at entry=0x7ffd85589238) at ../../../gobject/gsignal.c:3401
#13 0x00007ff11ad41df4 in g_signal_emit_by_name (instance=0x560b3f2c3fa0, detailed_signal=detailed_signal at entry=0x7ff11a47e710 "retrieve-surrounding") at ../../../gobject/gsignal.c:3487
#14 0x00007ff11a296d48 in gtk_im_multicontext_retrieve_surrounding_cb (slave=slave at entry=0x560b3f4b59c0, multicontext=<optimized out>) at ../../../../gtk/gtkimmulticontext.c:532
#15 0x00007ff11a448c26 in _gtk_marshal_BOOLEAN__VOID (closure=0x560b3f97ff70, return_value=0x7ffd85589520, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../../gtk/gtkmarshalers.c:1901
#16 0x00007ff11ad24c7d in g_closure_invoke (closure=0x560b3f97ff70, return_value=0x7ffd85589520, n_param_values=1, param_values=0x7ffd85589580, invocation_hint=0x7ffd85589500) at ../../../gobject/gclosure.c:810
#17 0x00007ff11ad38345 in signal_emit_unlocked_R (node=<optimized out>, detail=detail at entry=0, instance=instance at entry=0x560b3f4b59c0, emission_return=emission_return at entry=0x7ffd85589680, instance_and_params=instance_and_params at entry=0x7ffd85589580) at ../../../gobject/gsignal.c:3635
#18 0x00007ff11ad4094b in g_signal_emit_valist (instance=instance at entry=0x560b3f4b59c0, signal_id=signal_id at entry=297, detail=detail at entry=0, var_args=var_args at entry=0x7ffd85589778) at ../../../gobject/gsignal.c:3401
#19 0x00007ff11ad41df4 in g_signal_emit_by_name (instance=0x560b3f4b59c0, detailed_signal=detailed_signal at entry=0x7ff10774802a "retrieve-surrounding") at ../../../gobject/gsignal.c:3487
#20 0x00007ff107746d9d in enable (context_wayland=0x560b3f4b59c0) at ../../../../../modules/input/imwayland.c:616
#21 0x00007ff11a398555 in gtk_text_view_focus_in_event (widget=widget at entry=0x560b3f4844d0, event=<optimized out>) at ../../../../gtk/gtktextview.c:5811
#22 0x00007ff11a44617b in _gtk_marshal_BOOLEAN__BOXED (closure=0x560b3eeeb3d0, return_value=0x7ffd85589a80, n_param_values=<optimized out>, param_values=0x7ffd85589ae0, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../../gtk/gtkmarshalers.c:83
#23 0x00007ff11ad24c7d in g_closure_invoke (closure=0x560b3eeeb3d0, return_value=0x7ffd85589a80, n_param_values=2, param_values=0x7ffd85589ae0, invocation_hint=0x7ffd85589a60) at ../../../gobject/gclosure.c:810
#24 0x00007ff11ad37b9d in signal_emit_unlocked_R (node=<optimized out>, detail=detail at entry=0, instance=instance at entry=0x560b3f4844d0, emission_return=emission_return at entry=0x7ffd85589c00, instance_and_params=instance_and_params at entry=0x7ffd85589ae0) at ../../../gobject/gsignal.c:3673
#25 0x00007ff11ad4094b in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args at entry=0x7ffd85589cb0) at ../../../gobject/gsignal.c:3401
#26 0x00007ff11ad4191f in g_signal_emit (instance=instance at entry=0x560b3f4844d0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../gobject/gsignal.c:3447
#27 0x00007ff11a3f4324 in gtk_widget_event_internal (widget=widget at entry=0x560b3f4844d0, event=event at entry=0x560b3f978220) at ../../../../gtk/gtkwidget.c:7744
#28 0x00007ff11a3f643a in gtk_widget_event (widget=widget at entry=0x560b3f4844d0, event=event at entry=0x560b3f978220) at ../../../../gtk/gtkwidget.c:7314
#29 0x00007ff11a407065 in gtk_widget_send_focus_change (widget=widget at entry=0x560b3f4844d0, event=event at entry=0x560b3f978220) at ../../../../gtk/gtkwidget.c:16176
#30 0x00007ff11a40908f in do_focus_change (widget=0x560b3f4844d0, in=1) at ../../../../gtk/gtkwindow.c:8426
#31 0x00007ff11a40933a in gtk_window_real_set_focus (window=<optimized out>, focus=0x560b3f4844d0) at ../../../../gtk/gtkwindow.c:8736
#32 0x00007ff11ad27fef in g_cclosure_marshal_VOID__OBJECTv (closure=0x560b3ef17bc0, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x560b3ee57640) at ../../../gobject/gmarshal.c:2102
#33 0x00007ff11ad24eb6 in _g_closure_invoke_va (closure=0x560b3ef17bc0, return_value=0x0, instance=0x560b3ef74b00, args=0x7ffd8558a0f0, n_params=1, param_types=0x560b3ee57640) at ../../../gobject/gclosure.c:873
#34 0x00007ff11ad4132d in g_signal_emit_valist (instance=0x560b3ef74b00, signal_id=<optimized out>, detail=0, var_args=var_args at entry=0x7ffd8558a0f0) at ../../../gobject/gsignal.c:3300
#35 0x00007ff11ad4191f in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../gobject/gsignal.c:3447
#36 0x00007ff11ad24eb6 in _g_closure_invoke_va (closure=0x560b3eef6e30, return_value=0x0, instance=0x560b3f4844d0, args=0x7ffd8558a3f0, n_params=0, param_types=0x0) at ../../../gobject/gclosure.c:873
#37 0x00007ff11ad4132d in g_signal_emit_valist (instance=0x560b3f4844d0, signal_id=<optimized out>, detail=0, var_args=var_args at entry=0x7ffd8558a3f0) at ../../../gobject/gsignal.c:3300
#38 0x00007ff11ad4191f in g_signal_emit (instance=instance at entry=0x560b3f4844d0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../gobject/gsignal.c:3447
#39 0x00007ff11a3f7fda in gtk_widget_grab_focus (widget=0x560b3f4844d0) at ../../../../gtk/gtkwidget.c:8033
#40 0x00007ff11a39d8bb in gtk_text_view_multipress_gesture_pressed (gesture=0x560b3f3b5780, n_press=1, x=<optimized out>, y=<optimized out>, text_view=0x560b3f4844d0) at ../../../../gtk/gtktextview.c:5633
#41 0x00007ff1196058ee in ffi_call_unix64 () at ../src/x86/unix64.S:76
#42 0x00007ff1196052bf in ffi_call (cif=cif at entry=0x7ffd8558a860, fn=fn at entry=0x7ff11a39d860 <gtk_text_view_multipress_gesture_pressed>, rvalue=<optimized out>, avalue=avalue at entry=0x7ffd8558a770) at ../src/x86/ffi64.c:525
#43 0x00007ff11ad258f6 in g_cclosure_marshal_generic_va (closure=0x560b3f2ca020, return_value=0x0, instance=<optimized out>, args_list=<optimized out>, marshal_data=<optimized out>, n_params=3, param_types=0x560b3ef57930) at ../../../gobject/gclosure.c:1610
#44 0x00007ff11ad24eb6 in _g_closure_invoke_va (closure=0x560b3f2ca020, return_value=0x0, instance=0x560b3f3b5780, args=0x7ffd8558ab00, n_params=3, param_types=0x560b3ef57930) at ../../../gobject/gclosure.c:873
#45 0x00007ff11ad4132d in g_signal_emit_valist (instance=0x560b3f3b5780, signal_id=<optimized out>, detail=0, var_args=var_args at entry=0x7ffd8558ab00) at ../../../gobject/gsignal.c:3300
#46 0x00007ff11ad4191f in g_signal_emit (instance=instance at entry=0x560b3f3b5780, signal_id=<optimized out>, detail=detail at entry=0) at ../../../gobject/gsignal.c:3447
#47 0x00007ff11a26e658 in gtk_gesture_multi_press_begin (gesture=0x560b3f3b5780, sequence=<optimized out>) at ../../../../gtk/gtkgesturemultipress.c:241
#48 0x00007ff11ad27cf2 in g_cclosure_marshal_VOID__BOXEDv (closure=0x560b3ef55c80, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x560b3ef55cf0) at ../../../gobject/gmarshal.c:1950
#49 0x00007ff11ad24eb6 in _g_closure_invoke_va (closure=0x560b3ef55c80, return_value=0x0, instance=0x560b3f3b5780, args=0x7ffd8558aeb0, n_params=1, param_types=0x560b3ef55cf0) at ../../../gobject/gclosure.c:873
#50 0x00007ff11ad4132d in g_signal_emit_valist (instance=0x560b3f3b5780, signal_id=<optimized out>, detail=0, var_args=var_args at entry=0x7ffd8558aeb0) at ../../../gobject/gsignal.c:3300
#51 0x00007ff11ad4191f in g_signal_emit (instance=instance at entry=0x560b3f3b5780, signal_id=<optimized out>, detail=detail at entry=0) at ../../../gobject/gsignal.c:3447
#52 0x00007ff11a26b4fe in _gtk_gesture_set_recognized (recognized=1, sequence=0x0, gesture=0x560b3f3b5780) at ../../../../gtk/gtkgesture.c:343
#53 _gtk_gesture_set_recognized (sequence=0x0, recognized=1, gesture=0x560b3f3b5780) at ../../../../gtk/gtkgesture.c:329
#54 _gtk_gesture_check_recognized (gesture=gesture at entry=0x560b3f3b5780, sequence=sequence at entry=0x0) at ../../../../gtk/gtkgesture.c:389
#55 0x00007ff11a26ca23 in gtk_gesture_handle_event (event=0x560b3f978040, controller=0x560b3f3b5780) at ../../../../gtk/gtkgesture.c:747
#56 gtk_gesture_handle_event (controller=0x560b3f3b5780, event=0x560b3f978040) at ../../../../gtk/gtkgesture.c:712
#57 0x00007ff11a26f886 in gtk_gesture_single_handle_event (controller=0x560b3f3b5780, event=0x560b3f978040) at ../../../../gtk/gtkgesturesingle.c:222
#58 0x00007ff11a23844c in gtk_event_controller_handle_event (controller=0x560b3f3b5780, event=event at entry=0x560b3f978040) at ../../../../gtk/gtkeventcontroller.c:230
#59 0x00007ff11a3f207b in _gtk_widget_run_controllers (widget=0x560b3f4844d0, event=0x560b3f978040, phase=GTK_PHASE_BUBBLE) at ../../../../gtk/gtkwidget.c:7379
#60 0x00007ff11a446274 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x560b3eee4f90, return_value=0x7ffd8558b250, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x560b3eef55c0) at ../../../../gtk/gtkmarshalers.c:129
#61 0x00007ff11ad24eb6 in _g_closure_invoke_va (closure=0x560b3eee4f90, return_value=0x7ffd8558b250, instance=0x560b3f4844d0, args=0x7ffd8558b320, n_params=1, param_types=0x560b3eef55c0) at ../../../gobject/gclosure.c:873
#62 0x00007ff11ad40d14 in g_signal_emit_valist (instance=0x560b3f4844d0, signal_id=<optimized out>, detail=0, var_args=var_args at entry=0x7ffd8558b320) at ../../../gobject/gsignal.c:3300
#63 0x00007ff11ad4191f in g_signal_emit (instance=instance at entry=0x560b3f4844d0, signal_id=<optimized out>, detail=detail at entry=0) at ../../../gobject/gsignal.c:3447
#64 0x00007ff11a3f4324 in gtk_widget_event_internal (widget=widget at entry=0x560b3f4844d0, event=event at entry=0x560b3f978040) at ../../../../gtk/gtkwidget.c:7744
#65 0x00007ff11a3f643a in gtk_widget_event (widget=widget at entry=0x560b3f4844d0, event=event at entry=0x560b3f978040) at ../../../../gtk/gtkwidget.c:7314
#66 0x00007ff11a2b4976 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x560b3f4844d0) at ../../../../gtk/gtkmain.c:2592
#67 propagate_event (widget=<optimized out>, event=0x560b3f978040, captured=<optimized out>, topmost=0x0) at ../../../../gtk/gtkmain.c:2695
#68 0x00007ff11a2b6a83 in gtk_main_do_event (event=0x560b3f978040) at ../../../../gtk/gtkmain.c:1915
#69 gtk_main_do_event (event=<optimized out>) at ../../../../gtk/gtkmain.c:1685
#70 0x00007ff119fb8465 in _gdk_event_emit (event=event at entry=0x560b3f978040) at ../../../../gdk/gdkevents.c:73
#71 0x00007ff11a0135b2 in gdk_event_source_dispatch (base=<optimized out>, callback=<optimized out>, data=<optimized out>) at ../../../../../gdk/wayland/gdkeventsource.c:124
#72 0x00007ff119c7ef2e in g_main_dispatch (context=0x560b3ee88210) at ../../../glib/gmain.c:3182
#73 g_main_context_dispatch (context=context at entry=0x560b3ee88210) at ../../../glib/gmain.c:3847
#74 0x00007ff119c7f1c8 in g_main_context_iterate (context=context at entry=0x560b3ee88210, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at ../../../glib/gmain.c:3920
#75 0x00007ff119c7f25c in g_main_context_iteration (context=context at entry=0x560b3ee88210, may_block=may_block at entry=1) at ../../../glib/gmain.c:3981
#76 0x00007ff11ae3599d in g_application_run (application=0x560b3ee781e0, argc=<optimized out>, argv=0x7ffd8558b7a8) at ../../../gio/gapplication.c:2470
#77 0x0000560b3d0891fa in main (argc=2, argv=0x7ffd8558b7a8) at gedit/gedit.c:146




(gdb) list 268,346 
268
269     static void
270     notify_surrounding_text (GtkIMContextWayland *context)
271     {
272     #define MAX_LEN 4000
273       const gchar *start, *end;
274       int len, cursor, anchor;
275       char *str = NULL;
276
277       if (!global || !global->text_input)
278         return;
279       if (global->current != GTK_IM_CONTEXT (context))
280         return;
281       if (!context->surrounding.text)
282         return;
283
284       len = strlen (context->surrounding.text);
285       cursor = context->surrounding.cursor_idx;
286       anchor = context->surrounding.anchor_idx;
287
288       /* The protocol specifies a maximum length of 4KiB on transfers,
289        * mangle the surrounding text if it's bigger than that, and relocate
290        * cursor/anchor locations as per the string being sent.
291        */
292       if (len > MAX_LEN)
293         {
294           if (context->surrounding.cursor_idx < MAX_LEN &&
295               context->surrounding.anchor_idx < MAX_LEN)
296             {
297               start = context->surrounding.text;
298               end = &context->surrounding.text[MAX_LEN];
299             }
300           else if (context->surrounding.cursor_idx > len - MAX_LEN &&
301                    context->surrounding.cursor_idx > len - MAX_LEN)
302             {
303               start = &context->surrounding.text[len - MAX_LEN];
304               end = &context->surrounding.text[len];
305             }
306           else
307             {
308               int mid, a, b;
309               int cursor_len = ABS (context->surrounding.cursor_idx -
310                                     context->surrounding.anchor_idx);
311
312               if (cursor_len > MAX_LEN)
313                 {
314                   g_warn_if_reached ();
315                   return;
316                 }
317
318               mid = MIN (context->surrounding.cursor_idx,
319                          context->surrounding.cursor_idx) + (cursor_len / 2);
320               a = MAX (0, mid - (MAX_LEN / 2));
321               b = MIN (MAX_LEN, mid + (MAX_LEN / 2));
322
323               start = &context->surrounding.text[a];
324               end = &context->surrounding.text[b];
325             }
326
327           if (start != context->surrounding.text)
328             start = g_utf8_next_char (start);
329           if (end != &context->surrounding.text[len])
330             end = g_utf8_find_prev_char (context->surrounding.text, end);
331
332           cursor -= start - context->surrounding.text;
333           anchor -= start - context->surrounding.text;
334
335           str = g_strndup (start, end - start);
336         }
337
338       zwp_text_input_v3_set_surrounding_text (global->text_input,
339                                               str ? str : context->surrounding.text,
340                                               cursor, anchor);
341       zwp_text_input_v3_set_text_change_cause (global->text_input,
342                                                context->surrounding_change);
343       g_free (str);
344     #undef MAX_LEN
345     }
346






set width 0
set pagination off
directory /home/benutzer/source/libgtk-3-0/orig/gtk+3.0-3.24.5/debian/missing-sources/zlib.js-0.1.6/define/typedarray
bt




#############


gdb -q --args gedit /tmp/2/test.txt

set width 0
set pagination off
directory /home/benutzer/source/libgtk-3-0/orig/gtk+3.0-3.24.5/debian/missing-sources/zlib.js-0.1.6/define/typedarray
maint set target-non-stop off
display/i $pc
b notify_surrounding_text
y
run
cont
cont
cont
cont
record
b g_strndup
cont









benutzer at debian:~$ gdb -q --args gedit /tmp/2/test.txt 
Reading symbols from gedit...Reading symbols from /usr/lib/debug/.build-id/d7/4fad44c53160fc83facee7714f6c3ee67c94ef.debug...done.
done.
(gdb) set width 0
(gdb) set pagination off
(gdb) directory /home/benutzer/source/libgtk-3-0/orig/gtk+3.0-3.24.5/debian/missing-sources/zlib.js-0.1.6/define/typedarray
Source directories searched: /home/benutzer/source/libgtk-3-0/orig/gtk+3.0-3.24.5/debian/missing-sources/zlib.js-0.1.6/define/typedarray:$cdir:$cwd
(gdb) maint set target-non-stop off
(gdb) display/i $pc
1: x/i $pc
<error: No registers.>
(gdb) b notify_surrounding_text
Function "notify_surrounding_text" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (notify_surrounding_text) pending.
(gdb) run
Starting program: /usr/bin/gedit /tmp/2/test.txt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2855700 (LWP 10132)]
[New Thread 0x7ffff2054700 (LWP 10133)]
[New Thread 0x7ffff1838700 (LWP 10134)]
[New Thread 0x7ffff0ff3700 (LWP 10135)]
[New Thread 0x7fffe3e20700 (LWP 10136)]
[Thread 0x7fffe3e20700 (LWP 10136) exited]

Thread 1 "gedit" hit Breakpoint 1, notify_surrounding_text (context=<optimized out>) at ../../../../../modules/input/imwayland.c:798
798       context_wayland->surrounding.anchor_idx = cursor_index;
1: x/i $pc
=> 0x7ffff03645bb <gtk_im_context_wayland_set_surrounding+43>:  mov    0x4aae(%rip),%rax        # 0x7ffff0369070 <global>
(gdb) cont
Continuing.

Thread 1 "gedit" hit Breakpoint 1, notify_surrounding_text (context=<optimized out>) at ../../../../../modules/input/imwayland.c:798
798       context_wayland->surrounding.anchor_idx = cursor_index;
1: x/i $pc
=> 0x7ffff03645bb <gtk_im_context_wayland_set_surrounding+43>:  mov    0x4aae(%rip),%rax        # 0x7ffff0369070 <global>
(gdb) cont
Continuing.

Thread 1 "gedit" hit Breakpoint 1, notify_surrounding_text (context=<optimized out>) at ../../../../../modules/input/imwayland.c:798
798       context_wayland->surrounding.anchor_idx = cursor_index;
1: x/i $pc
=> 0x7ffff03645bb <gtk_im_context_wayland_set_surrounding+43>:  mov    0x4aae(%rip),%rax        # 0x7ffff0369070 <global>
(gdb) cont
Continuing.

Thread 1 "gedit" hit Breakpoint 1, notify_surrounding_text (context=<optimized out>) at ../../../../../modules/input/imwayland.c:798
798       context_wayland->surrounding.anchor_idx = cursor_index;
1: x/i $pc
=> 0x7ffff03645bb <gtk_im_context_wayland_set_surrounding+43>:  mov    0x4aae(%rip),%rax        # 0x7ffff0369070 <global>
(gdb) cont
Continuing.

Thread 1 "gedit" hit Breakpoint 1, notify_surrounding_text (context=<optimized out>) at ../../../../../modules/input/imwayland.c:798
798       context_wayland->surrounding.anchor_idx = cursor_index;
1: x/i $pc
=> 0x7ffff03645bb <gtk_im_context_wayland_set_surrounding+43>:  mov    0x4aae(%rip),%rax        # 0x7ffff0369070 <global>
(gdb) record
(gdb) b g_strndup
Breakpoint 2 at 0x7ffff6c49530: file ../../../glib/gstrfuncs.c, line 423.
(gdb) cont
Continuing.
[Thread 0x7ffff1838700 (LWP 10134) exited]

Thread 1 "gedit" hit Breakpoint 2, g_strndup (str=str at entry=0x555556ae180c "a è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Qu"..., n=18446744073709470611) at ../../../glib/gstrfuncs.c:423
423     ../../../glib/gstrfuncs.c: Datei oder Verzeichnis nicht gefunden.
1: x/i $pc
=> 0x7ffff6c49530 <g_strndup>:  test   %rdi,%rdi

(gdb) print (size_t) $rsi
$12 = 18446744073709470611
(gdb) display (size_t) $rsi
4: (size_t) $rsi = 18446744073709470611
(gdb) reverse-nexti
notify_surrounding_text (context=0x555555c03150 [GtkIMContextWayland]) at ../../../../../modules/input/imwayland.c:335
335           str = g_strndup (start, end - start);
1: x/i $pc
=> 0x7ffff0364637 <gtk_im_context_wayland_set_surrounding+167>: callq  0x7ffff0364070 <g_strndup at plt>
3: len = <optimized out>
4: (size_t) $rsi = 18446744073709470611
(gdb) 
0x00007ffff0364634      332           cursor -= start - context->surrounding.text;
1: x/i $pc
=> 0x7ffff0364634 <gtk_im_context_wayland_set_surrounding+164>: sub    %r14d,%ebp
3: len = <optimized out>
4: (size_t) $rsi = 18446744073709470611
(gdb) 
0x00007ffff0364631      332           cursor -= start - context->surrounding.text;
1: x/i $pc
=> 0x7ffff0364631 <gtk_im_context_wayland_set_surrounding+161>: mov    %r13,%rdi
3: len = <optimized out>
4: (size_t) $rsi = 18446744073709470611
(gdb) 
332           cursor -= start - context->surrounding.text;
1: x/i $pc
=> 0x7ffff036462e <gtk_im_context_wayland_set_surrounding+158>: sub    %r13,%rsi
3: len = <optimized out>
4: (size_t) $rsi = 93825014750111
(gdb) display $rsi
5: $rsi = 93825014750111
(gdb) undisp 5
(gdb) display/x $rsi
6: /x $rsi = 0x555556acdb9f
(gdb) display/x $r13
7: /x $r13 = 0x555556ae180c
(gdb) print/x start
$13 = 0x555556ae180c
(gdb) print/x end
$14 = 0x555556acdb9f
(gdb) print/x end - start
$15 = 0xfffffffffffec393
(gdb) reverse-next
330             end = g_utf8_find_prev_char (context->surrounding.text, end);
1: x/i $pc
=> 0x7ffff0364623 <gtk_im_context_wayland_set_surrounding+147>: mov    %r12,%rdi
3: len = <optimized out>
4: (size_t) $rsi = 93825014750112
6: /x $rsi = 0x555556acdba0
7: /x $r13 = 0x555556ae180c
(gdb) undisp 4
(gdb) reverse-next
329           if (end != &context->surrounding.text[len])
1: x/i $pc
=> 0x7ffff036461e <gtk_im_context_wayland_set_surrounding+142>: cmp    %rsi,%rcx
3: len = <optimized out>
6: /x $rsi = 0x555556acdba0
7: /x $r13 = 0x555556ae180c
(gdb) reverse-next
328             start = g_utf8_next_char (start);
1: x/i $pc
=> 0x7ffff03646e9 <gtk_im_context_wayland_set_surrounding+345>: mov    0x48c0(%rip),%rdx        # 0x7ffff0368fb0
3: len = 174011
6: /x $rsi = 0x555556acdba0
7: /x $r13 = 0x555556ae180b
(gdb) reverse-next
327           if (start != context->surrounding.text)
1: x/i $pc
=> 0x7ffff03646e4 <gtk_im_context_wayland_set_surrounding+340>: cmp    %r13,%r12
3: len = 174011
6: /x $rsi = 0x555556acdba0
7: /x $r13 = 0x555556ae180b
(gdb) undisp 6
(gdb) undisp 7
(gdb) print/x start
$16 = 0x555556ae180b
(gdb) print context->surrounding.text
$17 = (gchar *) 0x555556accc00 "Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prova. Questa è una riga di prov"...
(gdb) next
328             start = g_utf8_next_char (start);
1: x/i $pc
=> 0x7ffff03646e9 <gtk_im_context_wayland_set_surrounding+345>: mov    0x48c0(%rip),%rdx        # 0x7ffff0368fb0
3: len = 174011
(gdb) 
329           if (end != &context->surrounding.text[len])
1: x/i $pc
=> 0x7ffff036461e <gtk_im_context_wayland_set_surrounding+142>: cmp    %rsi,%rcx
3: len = <optimized out>
(gdb) print/x end
$18 = 0x555556acdba0
(gdb) print/x &context->surrounding.text[174011]
$19 = 0x555556af73bb
(gdb) next
330             end = g_utf8_find_prev_char (context->surrounding.text, end);
1: x/i $pc
=> 0x7ffff0364623 <gtk_im_context_wayland_set_surrounding+147>: mov    %r12,%rdi
3: len = <optimized out>
(gdb) next
332           cursor -= start - context->surrounding.text;
1: x/i $pc
=> 0x7ffff036462e <gtk_im_context_wayland_set_surrounding+158>: sub    %r13,%rsi
3: len = <optimized out>
(gdb) print start < end
$20 = 0

(gdb) reverse-next
330             end = g_utf8_find_prev_char (context->surrounding.text, end);
1: x/i $pc
=> 0x7ffff0364623 <gtk_im_context_wayland_set_surrounding+147>: mov    %r12,%rdi
3: len = <optimized out>
(gdb) 
329           if (end != &context->surrounding.text[len])
1: x/i $pc
=> 0x7ffff036461e <gtk_im_context_wayland_set_surrounding+142>: cmp    %rsi,%rcx
3: len = <optimized out>
(gdb) 
328             start = g_utf8_next_char (start);
1: x/i $pc
=> 0x7ffff03646e9 <gtk_im_context_wayland_set_surrounding+345>: mov    0x48c0(%rip),%rdx        # 0x7ffff0368fb0
3: len = 174011
(gdb) 
327           if (start != context->surrounding.text)
1: x/i $pc
=> 0x7ffff03646e4 <gtk_im_context_wayland_set_surrounding+340>: cmp    %r13,%r12
3: len = 174011
(gdb) print start < end
$21 = 0
(gdb) print/x start
$22 = 0x555556ae180b
(gdb) print/x end
$23 = 0x555556acdba0





#############


Maybe  https://gitlab.gnome.org/GNOME/gtk/commit/81c8efc863fed7f3d348b9050db5f031fa3fceba

3.24.8 does not yet contain it
3.24.9 should when released.




More information about the pkg-gnome-maintainers mailing list