Discovered when working on the gvfs-fuse-less patches.
Steps to reproduce:
1. Enable the saveactions plugin and enable "instant save". 2. Create new document (File->New). 3. Close the tab with the document.
The corresponding backtrace is
``` Thread 1 "geany" received signal SIGSEGV, Segmentation fault. 0x00007ffff58ecd8d in g_type_check_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (gdb) bt #0 0x00007ffff58ecd8d in g_type_check_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #1 0x00007ffff58e1514 in g_signal_handlers_disconnect_matched () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #2 0x00007ffff79e547c in ScintillaGTKAccessible::~ScintillaGTKAccessible (this=0x1ea0cf0, __in_chrg=<optimized out>) at gtk/ScintillaGTKAccessible.cxx:165 #3 0x00007ffff79e54ea in scintilla_object_accessible_finalize (object=0x387b030) at gtk/ScintillaGTKAccessible.cxx:1180 #4 0x00007ffff58ccd9a in g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 #5 0x00007ffff662ab04 in atk_focus_tracker_notify () from /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 #6 0x00007ffff00a43e7 in ?? () from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so #7 0x00007ffff6a64d57 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 #8 0x00007ffff53ed04a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x00007ffff53ed3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x00007ffff53ed712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #11 0x00007ffff6e2c6a7 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 #12 0x00007ffff79a1527 in main_lib (argc=1, argv=0x7fffffffde98) at libmain.c:1233 #13 0x00007ffff7367830 in __libc_start_main (main=0x4005a0 <main>, argc=1, argv=0x7fffffffde98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde88) at ../csu/libc-start.c:291 #14 0x00000000004005d9 in _start () ```
Does your Geany have commit 0df7d5a03a3f3681294d246d3b3adcf9a9d01485? It looks like an accessibility problem rather than a save-actions problem.
I just tried it with df05fc87120141da8e9fc5b67ac10dd550891e04 and wasn't able to reproduce it on X86_64 with Gtk2
Alright, I get the crash also without the plugin (or any other plugin) and with the latest master. So it's not saveactions bug, but Geany bug.
@elextr Actually the patch you mention seems to cause the crash.
@frlan I either get the crash, or
``` (geany:18259): GLib-GObject-WARNING **: instance of invalid non-instantiatable type '<invalid>'
(geany:18259): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ```
or
``` (geany:18302): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(geany:18302): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed ```
in the console.
@b4n Isn't it possible that sci->sci is already unreffed when the destructor is called? That would explain the errors and the crash.
To reproduce, it's enough to just create new document and close its "untitled" tab.
Closed #1410 via 1421a3f9c59a41074636a26cca6b431c3af40226.
Oh dear. I introduced a new crash fixing another one.
@b4n Isn't it possible that sci->sci is already unreffed when the destructor is called? That would explain the errors and the crash.
Yep that was it. Thanks for finding and narrowing this one down @techee!
@elextr ironically it's actually 0df7d5a03a3f3681294d246d3b3adcf9a9d01485 that introduced this very crash :)
Forwarded upstream: https://sourceforge.net/p/scintilla/bugs/1907/#a17e
github-comments@lists.geany.org