Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geany crashes on ubuntu/mate 22.04 when attempting to select text #3843

Closed
felixzng opened this issue Apr 16, 2024 · 10 comments
Closed

geany crashes on ubuntu/mate 22.04 when attempting to select text #3843

felixzng opened this issue Apr 16, 2024 · 10 comments

Comments

@felixzng
Copy link

Running on fresh install of ubuntu/mate 22.04. Crash is consistent, any time I try to select some text using either keyboard or mouse

thread 1 "geany" received signal SIGSEGV, Segmentation fault.
0x00007ffff6603104 in XVisualIDFromVisual () from /lib/x86_64-linux-gnu/libX11.so.6
(gdb) bt
#0 0x00007ffff6603104 in XVisualIDFromVisual ()
at /lib/x86_64-linux-gnu/libX11.so.6
#1 0x00007ffff7b79a2e in gdk_x11_window_foreign_new_for_display ()
at /lib/x86_64-linux-gnu/libgdk-3.so.0
#2 0x00007ffff7b649f8 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#3 0x00007ffff7b66191 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#4 0x00007ffff7b69d28 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#5 0x00007ffff7b2fa99 in gdk_display_get_event ()
at /lib/x86_64-linux-gnu/libgdk-3.so.0
#6 0x00007ffff7b69f46 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#7 0x00007ffff6b42d3b in g_main_context_dispatch ()
at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x00007ffff6b98258 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007ffff6b422b3 in g_main_loop_run ()
at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff7048cfd in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#11 0x00007ffff7c8fd1a in main_lib () at /lib/x86_64-linux-gnu/libgeany.so.0
#12 0x00007ffff7829d90 in __libc_start_call_main
(main=main@entry=0x555555555060, argc=argc@entry=2, argv=argv@entry=0x7fffffffdbb8)
at ../sysdeps/nptl/libc_start_call_main.h:58
#13 0x00007ffff7829e40 in __libc_start_main_impl
(main=0x555555555060, argc=2, argv=0x7fffffffdbb8, init=, fini=, rtld_fini=, stack_end=0x7fffffffdba8)
--Type for more, q to quit, c to continue without paging--
-start.c:392

@elextr
Copy link
Member

elextr commented Apr 16, 2024

Its hard to say anything except that the problem occurs inside the X11 library called from GDK called from GTK during the initialisation of the displays called from Geany at line #11. We don't even know the version of Geany.

@felixzng
Copy link
Author

This is geany 1.38
Below is complete debug log

GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 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 geany...
(No debugging symbols found in geany)
Starting program: /usr/bin/geany -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
(geany:843195): GLib-GIO-DEBUG: 07:38:44.497: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(geany:843195): dconf-DEBUG: 07:38:44.497: watch_fast: "/org/appmenu/gtk-module/" (establishing: 0, active: 0)
[New Thread 0x7ffff4dff640 (LWP 843202)]
[New Thread 0x7fffeffff640 (LWP 843203)]
(geany:843195): dconf-DEBUG: 07:38:44.499: unwatch_fast: "/org/appmenu/gtk-module/" (active: 0, establishing: 1)
[New Thread 0x7fffef7fe640 (LWP 843204)]
(geany:843195): dconf-DEBUG: 07:38:44.504: watch_established: "/org/appmenu/gtk-module/" (establishing: 0)
(geany:843195): GLib-GIO-DEBUG: 07:38:44.527: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
(geany:843195): dconf-DEBUG: 07:38:44.551: watch_fast: "/org/appmenu/gtk-module/" (establishing: 0, active: 0)
(geany:843195): dconf-DEBUG: 07:38:44.551: unwatch_fast: "/org/appmenu/gtk-module/" (active: 0, establishing: 1)
[New Thread 0x7fffeeffd640 (LWP 843205)]
(geany:843195): dconf-DEBUG: 07:38:44.552: watch_established: "/org/appmenu/gtk-module/" (establishing: 0)
Geany-INFO: 07:38:44.557: Geany 1.38, en_US.UTF-8
Geany-INFO: 07:38:44.557: GTK 3.24.33, GLib 2.72.4
Geany-INFO: 07:38:44.557: OS: Ubuntu 22.04.4 LTS (jammy)
Geany-INFO: 07:38:44.557: System data dir: /usr/share/geany
Geany-INFO: 07:38:44.557: User config dir: /home/felix/.config/geany
[New Thread 0x7fffee7fc640 (LWP 843206)]
[Thread 0x7fffee7fc640 (LWP 843206) exited]
[New Thread 0x7fffee7fc640 (LWP 843207)]
[New Thread 0x7fffedffb640 (LWP 843208)]
[Thread 0x7fffee7fc640 (LWP 843207) exited]
[New Thread 0x7fffedffb640 (LWP 843209)]
[Thread 0x7fffedffb640 (LWP 843208) exited]
[New Thread 0x7fffee7fc640 (LWP 843210)]
[Thread 0x7fffedffb640 (LWP 843209) exited]
[New Thread 0x7fffedffb640 (LWP 843211)]
[Thread 0x7fffee7fc640 (LWP 843210) exited]
[New Thread 0x7fffee7fc640 (LWP 843212)]
[Thread 0x7fffedffb640 (LWP 843211) exited]
[Thread 0x7fffee7fc640 (LWP 843212) exited]
Geany-INFO: 07:38:44.668: Loaded GTK+ CSS theme '/usr/share/geany/geany.css'
Geany-INFO: 07:38:44.669: Loaded GTK+ CSS theme '/usr/share/geany/geany-3.20.css'
Geany-INFO: 07:38:44.673: System plugin path: /usr/lib/x86_64-linux-gnu/geany
Geany-INFO: 07:38:44.680: Added filetype Scala (64).
Geany-INFO: 07:38:44.680: Added filetype Cython (65).
Geany-INFO: 07:38:44.680: Added filetype Swift (66).
Geany-INFO: 07:38:44.680: Added filetype Graphviz (67).
Geany-INFO: 07:38:44.680: Added filetype Groovy (68).
Geany-INFO: 07:38:44.680: Added filetype Genie (69).
Geany-INFO: 07:38:44.680: Added filetype JSON (70).
Geany-INFO: 07:38:44.680: Added filetype Arduino (71).
Geany-INFO: 07:38:44.680: Added filetype Meson (72).
Geany-INFO: 07:38:44.680: Added filetype Clojure (73).
Geany-INFO: 07:38:44.680: Added filetype Kotlin (74).
Geany-INFO: 07:38:44.680: Added filetype CUDA (75).
Geany-INFO: 07:38:44.680: Added filetype Nim (76).
Geany-INFO: 07:38:44.680: Added filetype TypeScript (77).
Geany-INFO: 07:38:44.753: Loaded libvte from libvte-2.91.so.0
Geany-INFO: 07:38:44.764: Loaded: /usr/lib/x86_64-linux-gnu/geany/splitwindow.so (Split Window)
[New Thread 0x7fffee7fc640 (LWP 843213)]
[New Thread 0x7fffedffb640 (LWP 843214)]
[Thread 0x7fffee7fc640 (LWP 843213) exited]
[New Thread 0x7fffee7fc640 (LWP 843215)]
[New Thread 0x7fffed250640 (LWP 843216)]
[Thread 0x7fffedffb640 (LWP 843214) exited]
[Thread 0x7fffee7fc640 (LWP 843215) exited]
Geany-INFO: 07:38:44.776: unknown : None (UTF-8)
[Thread 0x7fffed250640 (LWP 843216) exited]
[New Thread 0x7fffed250640 (LWP 843217)]
[New Thread 0x7fffee7fc640 (LWP 843218)]
[Thread 0x7fffee7fc640 (LWP 843218) exited]
[Thread 0x7fffed250640 (LWP 843217) exited]
[New Thread 0x7fffed250640 (LWP 843219)]
[New Thread 0x7fffee7fc640 (LWP 843220)]
[Thread 0x7fffed250640 (LWP 843219) exited]
[Thread 0x7fffee7fc640 (LWP 843220) exited]
[New Thread 0x7fffee7fc640 (LWP 843221)]
[New Thread 0x7fffed250640 (LWP 843222)]
[Thread 0x7fffee7fc640 (LWP 843221) exited]
[Thread 0x7fffed250640 (LWP 843222) exited]
[New Thread 0x7fffed250640 (LWP 843223)]
[New Thread 0x7fffee7fc640 (LWP 843224)]
[Thread 0x7fffed250640 (LWP 843223) exited]
[New Thread 0x7fffed250640 (LWP 843225)]
[New Thread 0x7fffee7fc640 (LWP 843226)]
[Thread 0x7fffee7fc640 (LWP 843224) exited]
[Thread 0x7fffed250640 (LWP 843225) exited]
[New Thread 0x7fffed250640 (LWP 843227)]
[New Thread 0x7fffedffb640 (LWP 843228)]
[Thread 0x7fffee7fc640 (LWP 843226) exited]
[Thread 0x7fffed250640 (LWP 843227) exited]
[Thread 0x7fffedffb640 (LWP 843228) exited]
[New Thread 0x7fffedffb640 (LWP 843229)]
[New Thread 0x7fffed250640 (LWP 843230)]
[Thread 0x7fffedffb640 (LWP 843229) exited]
[New Thread 0x7fffedffb640 (LWP 843231)]
[New Thread 0x7fffee7fc640 (LWP 843232)]
[Thread 0x7fffed250640 (LWP 843230) exited]
[Thread 0x7fffedffb640 (LWP 843231) exited]
[Thread 0x7fffee7fc640 (LWP 843232) exited]
[New Thread 0x7fffee7fc640 (LWP 843233)]
[New Thread 0x7fffedffb640 (LWP 843234)]
[Thread 0x7fffedffb640 (LWP 843234) exited]
[Thread 0x7fffee7fc640 (LWP 843233) exited]
[New Thread 0x7fffedffb640 (LWP 843235)]
[New Thread 0x7fffee7fc640 (LWP 843236)]
[Thread 0x7fffee7fc640 (LWP 843236) exited]
[Thread 0x7fffedffb640 (LWP 843235) exited]
[New Thread 0x7fffedffb640 (LWP 843237)]
[New Thread 0x7fffee7fc640 (LWP 843238)]
[Thread 0x7fffedffb640 (LWP 843237) exited]
[Thread 0x7fffee7fc640 (LWP 843238) exited]
[New Thread 0x7fffee7fc640 (LWP 843239)]
[New Thread 0x7fffedffb640 (LWP 843240)]
[Thread 0x7fffee7fc640 (LWP 843239) exited]
[Thread 0x7fffedffb640 (LWP 843240) exited]
[New Thread 0x7fffedffb640 (LWP 843241)]
[New Thread 0x7fffee7fc640 (LWP 843242)]
[Thread 0x7fffedffb640 (LWP 843241) exited]
[Thread 0x7fffee7fc640 (LWP 843242) exited]
[New Thread 0x7fffee7fc640 (LWP 843243)]
[New Thread 0x7fffedffb640 (LWP 843244)]
[Thread 0x7fffee7fc640 (LWP 843243) exited]
[Thread 0x7fffedffb640 (LWP 843244) exited]
[New Thread 0x7fffedffb640 (LWP 843245)]
** (geany:843195): DEBUG: 07:38:44.906: Name com.canonical.AppMenu.Registrar does not exist on the session bus

(geany:843195): dconf-DEBUG: 07:38:44.906: watch_fast: "/org/appmenu/gtk-module/" (establishing: 0, active: 0)
(geany:843195): dconf-DEBUG: 07:38:44.906: unwatch_fast: "/org/appmenu/gtk-module/" (active: 0, establishing: 1)
(geany:843195): dconf-DEBUG: 07:38:44.907: watch_established: "/org/appmenu/gtk-module/" (establishing: 0)
[Detaching after fork from child process 843246]

Thread 1 "geany" received signal SIGSEGV, Segmentation fault.
0x00007ffff6603104 in XVisualIDFromVisual () from /lib/x86_64-linux-gnu/libX11.so.6

@felixzng
Copy link
Author

I have also built current geany 2.0. It runs with same outcome (.i.e crashes when attempting to select any text)

@elextr
Copy link
Member

elextr commented Apr 16, 2024

Sounds like something is wrong with your brand new Ubuntu.

Are you running Wayland? If so try GDK_BACKEND=wayland geany.

@felixzng
Copy link
Author

Thanks I will give at shot. My current default backed is x11

@felixzng
Copy link
Author

Looks like this it is not new issue. First reported 2 year back on Fedora thread. Probably not geany specific, but some odd interaction between gdk3 and x11

@elextr
Copy link
Member

elextr commented Apr 16, 2024

There are some reports of weirdnesses with XWayland and GTK, which have been fixed by running Geany as Wayland as I mentioned. But havn't had any reports that can be traced to real xorg and GTK (that my quick search on Geany issues found anyway), and it is just fine on my Linux Mint (which is based on Ubuntu).

@b4n
Copy link
Member

b4n commented Apr 21, 2024

From looking at the backtrace and the relevant GTK source code, this seems entirely unrelated to Geany itself (apart for Geany using GTK3, that is). It looks like either there is a bug in your XVisualIDFromVisual() (which could come from a driver bug maybe?), or a bug in GTK on how it uses this API (one interesting thing could be whether the parameter to XVisualIDFromVisual() is NULL or invalid memory -- you could probably figure this out with debugging information for those libraries).

@felixzng
Copy link
Author

Thank you. I have decided to take an easy way out and do fresh install. All works now. Cheers.

@b4n
Copy link
Member

b4n commented Apr 21, 2024

didn't you have a fresh install before already? Not sure, but maybe your hardware (hard drive maybe) is faulty?

@b4n b4n closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants