Open TomiOhl opened 2 weeks ago
I could not reproduce this with the Early Access Elementary ( but only tested briefly). Please indicate whether you have AutoSave switched on and also indicate which extensions are active. If you are able please run Code under gdb
in a terminal and when it crashes get a backtrace by typing bt
and post the output here.
Yes, I have autosave switched on. I have enabled these extensions:
gdb output:
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 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:
<https://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 io.elementary.code...
(No debugging symbols found in io.elementary.code)
(gdb) run
Starting program: /usr/bin/io.elementary.code
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2959640 (LWP 568669)]
[New Thread 0x7ffff2158640 (LWP 568670)]
[New Thread 0x7ffff18bc640 (LWP 568671)]
[New Thread 0x7ffff0eaf640 (LWP 568673)]
[Thread 0x7ffff0eaf640 (LWP 568673) exited]
[New Thread 0x7ffff0eaf640 (LWP 568674)]
[New Thread 0x7fffe93ff640 (LWP 568675)]
[Thread 0x7ffff0eaf640 (LWP 568674) exited]
[New Thread 0x7ffff0eaf640 (LWP 568676)]
[Thread 0x7fffe93ff640 (LWP 568675) exited]
[New Thread 0x7fffe93ff640 (LWP 568677)]
[Thread 0x7ffff0eaf640 (LWP 568676) exited]
[Thread 0x7fffe93ff640 (LWP 568677) exited]
[New Thread 0x7fffe93ff640 (LWP 568678)]
[New Thread 0x7ffff0eaf640 (LWP 568679)]
[New Thread 0x7fffe8bfe640 (LWP 568680)]
[Detaching after fork from child process 568682]
[New Thread 0x7fffd73ff640 (LWP 568694)]
[New Thread 0x7fffd6bfe640 (LWP 568695)]
[Thread 0x7fffd73ff640 (LWP 568694) exited]
[New Thread 0x7fffd73ff640 (LWP 568696)]
[New Thread 0x7fffd63fd640 (LWP 568697)]
[Thread 0x7fffd6bfe640 (LWP 568695) exited]
[Thread 0x7fffd63fd640 (LWP 568697) exited]
[Thread 0x7fffd73ff640 (LWP 568696) exited]
[New Thread 0x7fffd63fd640 (LWP 568698)]
[New Thread 0x7fffd73ff640 (LWP 568699)]
[Thread 0x7fffd63fd640 (LWP 568698) exited]
[New Thread 0x7fffd63fd640 (LWP 568700)]
[New Thread 0x7fffd6bfe640 (LWP 568701)]
[Thread 0x7fffd73ff640 (LWP 568699) exited]
[Thread 0x7fffd63fd640 (LWP 568700) exited]
[Thread 0x7fffd6bfe640 (LWP 568701) exited]
[New Thread 0x7fffd6bfe640 (LWP 568702)]
[New Thread 0x7fffd63fd640 (LWP 568703)]
[Thread 0x7fffd6bfe640 (LWP 568702) exited]
[New Thread 0x7fffd6bfe640 (LWP 568704)]
[New Thread 0x7fffd73ff640 (LWP 568705)]
[Thread 0x7fffd63fd640 (LWP 568703) exited]
[Thread 0x7fffd6bfe640 (LWP 568704) exited]
[Thread 0x7fffd73ff640 (LWP 568705) exited]
[New Thread 0x7fffd73ff640 (LWP 568706)]
[New Thread 0x7fffd6bfe640 (LWP 568707)]
[Thread 0x7fffd73ff640 (LWP 568706) exited]
[New Thread 0x7fffd73ff640 (LWP 568708)]
[New Thread 0x7fffd63fd640 (LWP 568709)]
[Thread 0x7fffd6bfe640 (LWP 568707) exited]
[Thread 0x7fffd73ff640 (LWP 568708) exited]
[New Thread 0x7fffd73ff640 (LWP 568710)]
[New Thread 0x7fffd6bfe640 (LWP 568711)]
[Thread 0x7fffd63fd640 (LWP 568709) exited]
[Thread 0x7fffd73ff640 (LWP 568710) exited]
[New Thread 0x7fffd73ff640 (LWP 568712)]
[New Thread 0x7fffd63fd640 (LWP 568713)]
[Thread 0x7fffd6bfe640 (LWP 568711) exited]
[Thread 0x7fffd73ff640 (LWP 568712) exited]
[New Thread 0x7fffd73ff640 (LWP 568714)]
[New Thread 0x7fffd63fd640 (LWP 568715)]
[Thread 0x7fffd63fd640 (LWP 568713) exited]
[Thread 0x7fffd73ff640 (LWP 568714) exited]
[New Thread 0x7fffd73ff640 (LWP 568716)]
[New Thread 0x7fffd6bfe640 (LWP 568717)]
[Thread 0x7fffd63fd640 (LWP 568715) exited]
[Thread 0x7fffd73ff640 (LWP 568716) exited]
[Thread 0x7fffd6bfe640 (LWP 568717) exited]
[New Thread 0x7fffd6bfe640 (LWP 568718)]
[New Thread 0x7fffd73ff640 (LWP 568719)]
[Thread 0x7fffd6bfe640 (LWP 568718) exited]
[New Thread 0x7fffd6bfe640 (LWP 568720)]
[New Thread 0x7fffd63fd640 (LWP 568721)]
[Thread 0x7fffd73ff640 (LWP 568719) exited]
[Thread 0x7fffd6bfe640 (LWP 568720) exited]
[Thread 0x7fffd63fd640 (LWP 568721) exited]
[New Thread 0x7fffd63fd640 (LWP 568722)]
[New Thread 0x7fffd6bfe640 (LWP 568723)]
[Thread 0x7fffd63fd640 (LWP 568722) exited]
[New Thread 0x7fffd63fd640 (LWP 568724)]
[New Thread 0x7fffd73ff640 (LWP 568725)]
[Thread 0x7fffd6bfe640 (LWP 568723) exited]
[Thread 0x7fffd63fd640 (LWP 568724) exited]
[Thread 0x7fffd73ff640 (LWP 568725) exited]
[New Thread 0x7fffd73ff640 (LWP 568726)]
[New Thread 0x7fffd63fd640 (LWP 568727)]
[Thread 0x7fffd73ff640 (LWP 568726) exited]
[New Thread 0x7fffd73ff640 (LWP 568728)]
[New Thread 0x7fffd6bfe640 (LWP 568729)]
[Thread 0x7fffd63fd640 (LWP 568727) exited]
[Thread 0x7fffd73ff640 (LWP 568728) exited]
[Thread 0x7fffd6bfe640 (LWP 568729) exited]
[Thread 0x7ffff0eaf640 (LWP 568679) exited]
[Thread 0x7fffe93ff640 (LWP 568678) exited]
(io.elementary.code:568666): GtkSourceView-CRITICAL **: 01:39:53.208: gtk_source_search_settings_get_regex_enabled: assertion 'GTK_SOURCE_IS_SEARCH_SETTINGS (settings)' failed
(io.elementary.code:568666): GtkSourceView-CRITICAL **: 01:39:53.208: gtk_source_search_settings_get_search_text: assertion 'GTK_SOURCE_IS_SEARCH_SETTINGS (settings)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_buffer_get_tag_table: assertion 'GTK_IS_TEXT_BUFFER (buffer)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_tag_table_get_size: assertion 'GTK_IS_TEXT_TAG_TABLE (table)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_tag_set_priority: assertion 'GTK_IS_TEXT_TAG (tag)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_iter_has_tag: assertion 'GTK_IS_TEXT_TAG (tag)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_iter_has_tag: assertion 'GTK_IS_TEXT_TAG (tag)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_iter_has_tag: assertion 'GTK_IS_TEXT_TAG (tag)' failed
(io.elementary.code:568666): GtkSourceView-CRITICAL **: 01:39:53.208: gtk_source_search_settings_get_at_word_boundaries: assertion 'GTK_SOURCE_IS_SEARCH_SETTINGS (settings)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_iter_has_tag: assertion 'GTK_IS_TEXT_TAG (tag)' failed
(io.elementary.code:568666): GtkSourceView-CRITICAL **: 01:39:53.208: gtk_source_search_settings_get_at_word_boundaries: assertion 'GTK_SOURCE_IS_SEARCH_SETTINGS (settings)' failed
(io.elementary.code:568666): GtkSourceView-CRITICAL **: 01:39:53.208: gtk_source_search_settings_get_search_text: assertion 'GTK_SOURCE_IS_SEARCH_SETTINGS (settings)' failed
(io.elementary.code:568666): Gtk-CRITICAL **: 01:39:53.208: gtk_text_buffer_remove_tag: assertion 'GTK_IS_TEXT_BUFFER (buffer)' failed
(io.elementary.code:568666): GtkSourceView-CRITICAL **: 01:39:53.208: gtk_source_search_settings_get_regex_enabled: assertion 'GTK_SOURCE_IS_SEARCH_SETTINGS (settings)' failed
(io.elementary.code:568666): GLib-GObject-CRITICAL **: 01:39:53.208: g_object_notify: assertion 'G_IS_OBJECT (object)' failed
Thread 1 "io.elementary.c" received signal SIGSEGV, Segmentation fault.
0x00007ffff6fbdefb in ?? () from /lib/x86_64-linux-gnu/libgtksourceview-4.so.0
(gdb) bt
#0 0x00007ffff6fbdefb in () at /lib/x86_64-linux-gnu/libgtksourceview-4.so.0
Thanks, that is helpful. Did you only get one line of output after typing bt
? The crash occured in a Gtk
library. Ideally we want a full backtrace into the Code code.
Yes, sadly only this one line got printed after typing bt.
You could try typing t a a bt
instead to get a backtrace from all threads I guess but I thought gdb
always gave the backtrace from the thread that crashed anyway. Another technique is to type set env G_DEBUG=fatal-criticals
before typing run
to investigate those critical error messages, which may or may not be related to the crash.
I'll see whether I can reproduce the crash using your settings on 7.1.
Set the env and also got the output of t a a bt
:
Another thing that may give a clue is to disable extensions, especially the non-default ones to see whether the problem persists.
Also give the exact keystrokes that produce the crash and any other features such as whether there are highlighted words and what you did immediately prior to the crash.
Just reproduced the crash! Needs using BackSpace
- deleting with Enter
or <Ctrl>X
or <Ctrl>K
works OK.
Hmm, now I cannot reproduce it again :frowning_face:
Yes, I always select either via the mouse or via Shift + arrows and always use backspace to delete. Sometimes there are highlighted words, sometimes there aren't when it happens, so I can't confirm if it's related to that feature. Sometimes it happens as soon as I open the file and do my first deletion. Sometimes it only comes after many deletions. I can provide a screen recording tomorrow with keystrokes if that helps - although now that you could reproduce the crash at least once it might not be needed
OK, I can reproduce it reasonable consistently now by repeating <Shift><Down>
followed by BackSpace
until it crashes. It seems to be associated with the "Highlight Selection" plugin.
@TomiOhl If you are able to try out the PR #1447 to see whether it fixes the issue for you that would be helpful but dont worry if you cannot.
Note you would need to install the PR after building it as it modifies a plugin.
What Happened?
Sometimes Code crashes when I select multiple lines and press backspace. I have an ocd where I need to keep only useful lines in bash history 😅, so when I'm deleting lines from there, that's when I get it mostly.
Steps to Reproduce
Expected Behavior
The lines should be deleted and Code should not crash
OS Version
7.x (Horus)
Software Version
Latest release (I have run all updates)
Log Output
Hardware Info
No response