Repository: geany/geany

Issue #2813: Geany crashes when I press "Ctrl + Shift + V"
Created: 2021-05-23T07:03:59Z
Hello, I am using Geany 1.37.1 (also tested latest git commit) on Manjaro Linux.
When I press "Ctrl + Shift + V" without switching to terminal tab in the Message Window, Geany crashes with error message:
/usr/include/c++/11.1.0/bits/shared_ptr_base.h:976: std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type& std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::operator*() const [with _Tp = vte::platform::Clipboard; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic; bool <anonymous> = false; bool <anonymous> = false; std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type = vte::platform::Clipboard]: Assertion '_M_get() != nullptr' failed.
中止 (核心已傾印)

Crash does not happen if virtual terminal is disabled in the settings or switching to terminal tab first. Pressing "Ctrl + Shift + V" also does not crash after switching to terminal tab and then switching to another tab.
Here is backtrace:
Thread 7 (Thread 0x7ffff18a0640 (LWP 49412) "pool-geany"):
#0  0x00007ffff7b8118d in syscall () at /usr/lib/libc.so.6
#1  0x00007ffff6d3b06b in g_cond_wait_until () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6cbc8b3 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6cbca44 in g_async_queue_timeout_pop () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6d1dd2a in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff6d1b0c1 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007ffff63eb259 in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007ffff7b865e3 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7ffff2abe640 (LWP 49408) "gdbus"):
#0  0x00007ffff7b7bb2f in poll () at /usr/lib/libc.so.6
#1  0x00007ffff6d40ae8 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6cec593 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6f315b8 in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007ffff6d1b0c1 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff63eb259 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007ffff7b865e3 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7ffff32bf640 (LWP 49407) "gmain"):
#0  0x00007ffff7b7bb2f in poll () at /usr/lib/libc.so.6
#1  0x00007ffff6d40ae8 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6cea781 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6cea7d2 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6d1b0c1 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff63eb259 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007ffff7b865e3 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff5ad8940 (LWP 49403) "geany"):
#0  0x00007ffff7ac4d22 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff7aae862 in abort () at /usr/lib/libc.so.6
#2  0x00007fffe0962f2a in std::__replacement_assert(char const*, int, char const*, char const*) (__file=__file@entry=0x7fffe09aea80 "/usr/include/c++/11.1.0/bits/shared_ptr_base.h", __line=__line@entry=976, __function=__function@entry=0x7fffe09ae8e8 "std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type& std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::operator*() const [with _Tp = vte::platform::Clipboard; __gn"..., __condition=__condition@entry=0x7fffe09ae8b4 "_M_get() != nullptr") at /usr/include/c++/11.1.0/x86_64-pc-linux-gnu/bits/c++config.h:504
#3  0x00007fffe09a2d60 in std::__shared_ptr_access<vte::platform::Clipboard, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const (this=0x555556013798) at /usr/include/c++/11.1.0/bits/shared_ptr_base.h:976
#4  std::__shared_ptr_access<vte::platform::Clipboard, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const (this=0x555556013798) at /usr/include/c++/11.1.0/bits/shared_ptr_base.h:974
#5  vte::platform::Widget::clipboard_get(vte::platform::ClipboardType) const (type=vte::platform::ClipboardType::CLIPBOARD, this=0x555556013740) at ../vte/src/widget.cc:228
#6  vte::platform::Widget::clipboard_request_text(vte::platform::ClipboardType) (this=0x555556013740, type=vte::platform::ClipboardType::CLIPBOARD) at ../vte/src/widget.cc:278
#7  0x00007ffff6e05096 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#8  0x00007ffff6e05210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#9  0x00007fffe098ccbe in vte_terminal_paste_clipboard(VteTerminal*) (terminal=0x555555bb5a90) at ../vte/src/widget.hh:252
        __PRETTY_FUNCTION__ = "void vte_terminal_paste_clipboard(VteTerminal*)"
#10 0x00007ffff6de7ddf in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff6e10fbd in  () at /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff6e04cad in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff6e05210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff760c341 in  () at /usr/lib/libgtk-3.so.0
#15 0x00007ffff6de7ddf in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff6e10fbd in  () at /usr/lib/libgobject-2.0.so.0
#17 0x00007ffff6e042db in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#18 0x00007ffff6e05210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff73738fc in gtk_accel_group_activate () at /usr/lib/libgtk-3.so.0
#20 0x00007ffff7374cfe in gtk_accel_groups_activate () at /usr/lib/libgtk-3.so.0
#21 0x00007ffff76363af in gtk_window_activate_key () at /usr/lib/libgtk-3.so.0
#22 0x00007ffff7630643 in  () at /usr/lib/libgtk-3.so.0
#23 0x00007ffff7362f5b in  () at /usr/lib/libgtk-3.so.0
#24 0x00007ffff6de7ddf in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#25 0x00007ffff6e109cb in  () at /usr/lib/libgobject-2.0.so.0
#26 0x00007ffff6e042db in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#27 0x00007ffff6e05210 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#28 0x00007ffff7622a35 in  () at /usr/lib/libgtk-3.so.0
#29 0x00007ffff74be862 in  () at /usr/lib/libgtk-3.so.0
#30 0x00007ffff74bfaed in gtk_main_do_event () at /usr/lib/libgtk-3.so.0
#31 0x00007ffff721ca03 in  () at /usr/lib/libgdk-3.so.0
#32 0x00007ffff726ca04 in  () at /usr/lib/libgdk-3.so.0
#33 0x00007ffff6ced02c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#34 0x00007ffff6d40b59 in  () at /usr/lib/libglib-2.0.so.0
#35 0x00007ffff6cec593 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#36 0x00007ffff74b561f in gtk_main () at /usr/lib/libgtk-3.so.0
#37 0x00007ffff7cd8a18 in main_lib (argc=<optimized out>, argv=<optimized out>) at libmain.c:1294
        doc = 0x55555623ce40
        config_dir_result = <optimized out>
        locale = <optimized out>
        utf8_configdir = <optimized out>
        os_info = <optimized out>
#38 0x00007ffff7aafb25 in __libc_start_main () at /usr/lib/libc.so.6
#39 0x000055555555505e in _start ()

Duplicate issue #3430: Crt-shif-V crashes Geany on Ubuntu
Created: 2023-03-17T12:29:45Z
If you inadvertently type Crtl-shif-V instead of Crrl-V (easy done when you switch from Terminal), Geany crashes
The crash report is attached, minus the coredump wich may or not contain sensitive information
geany-crash.zip

Closing comment (2023-03-17T12:39:17Z): Duplicate of #2813 and #3190 and fixed by #3091