I have this on Manajaro (x86_64, Gnome, Wayland) for a week when there was a bigger update. I installed GTK3 about ten days ago. Could that be the problem?
![image](https://user-images.githubusercontent.com/7109443/99150379-0d261600-2649-11e...)
Please let me know if you require anything else to resolve this issue.
Thank you!
I built geany from the latest Github commit 0a0b4b000cf18e837b921057a461ad05a08e41d3
![image](https://user-images.githubusercontent.com/7109443/99151875-00a6bb00-2653-11e...)
I'll report back if the error persists or not
It works with Sully. You can close this ticket at your discretion.
I'm using 1.37.1 from the Ubuntu PPA, built using GTK+ v3.22.30 & GLib v2.56.4, on Peppermint 10 (x86_64, XFCE/LXDE, x11) , and having the same issue. It seems to always happen when I have a file open with unsaved changes.
I switched to Ubuntu because of that. I don't have the bug there. I miss Manjaro. Dear developers, it would be nice if you could advise with test instructions. I don't mind building Geany from source and putting in some debug prints here and there if you let me know where to start. I use Geany like crazy every day, totally love it in fact, so I can't have it freezing on me.
See #2665
Note that none of the devs can get a freeze because we don't use those distros so we are kinda hamstrung to do anything, but the advice on Fedora seems to be "use wayland directly, not Xwayland"
I'll give it try.
BTW, you should look into Manjaro. I really recommend it. It is as user-friendly as Ubuntu, configures everything automatically and whatnot, but has some nice additional features. Most notably 'pacman', the package manager of Arch Linux, which can handle tricky installations much better than apt. This is interesting especially for developers as it can handle multiple installations of the same package with different versions very well e.g. GTK2 and GTK3 or a 32-bit and 64-bit version of the same package. Manjaro comes with the zsh which you will absolutely love. I have even started using it on Ubuntu. And finally, Manjaro comes with a beautiful Gnome desktop, so it is definitely worth checking out. You can run a full-fledged desktop from a live-CD...
Ok, thanks for the help! And also thanks for the work you put into Geany. I'm a power user! Can't use it enough, thanks for that!
Closed #2658.
@jansalleine : Got your message, thank you! I'll give it a try. Switched from Majaro to Ubuntu because of this bug. Looking forward to some Manjaro time :-)
_I don't know if this comment will be displayed on a closed issue, but I had the same problem on Arch Linux, Gnome 3, X11 Session. In this case my workaround was to edit /usr/share/applications/geany.desktop and change the "Exec" line to: Exec=env GDK_BACKEND=x11 geany %F_
@jansalleine : Got your message, thank you! I'll give it a try. Switched from Manjaro to Ubuntu because of this bug. Looking forward to some Manjaro time :-)
_I don't know if this comment will be displayed on a closed issue, but I had the same problem on Arch Linux, Gnome 3, X11 Session. In this case my workaround was to edit /usr/share/applications/geany.desktop and change the "Exec" line to: Exec=env GDK_BACKEND=x11 geany %F_
Mh. Unfortunately I deleted that comment, because after some time that bug occured again. For some weird reason not running geany in "maximized" window seems to be the only thing that "fixes" that issue for me. I wish you luck anyway :-)
@jansalleine full screen issues have been reported before #1532 and #1787 for eg. But it still comes back to my comment [above](https://github.com/geany/geany/issues/2658#issuecomment-745023264) which I also said on a number of the previous issues as well. Until the problem happens to/for somebody who can (capable and has time) debug it nothing will happen unfortunately.
AFAICT it doesn't happen to any of the regular contributors, but may happen as more systems upgrade to newer and still flakey components like Wayland compositors (Gnome, Sway, etc) and very flakey XWayland. But until somebody debugs the problem its not fixable. IIRC suggestions for debugging were made on previous issues but (perhaps understandably) people just found a workaround and didn't contribute further.
@jansalleine full screen issues have been reported before #1532 and #1787 for eg. But it still comes back to my comment [above](https://github.com/geany/geany/issues/2658#issuecomment-745023264) which I also said on a number of the previous issues as well. Until the problem happens to/for somebody who can (capable and has time) debug it nothing will happen unfortunately.
AFAICT it doesn't happen to any of the regular contributors, but may happen as more systems upgrade to newer and still flakey components like Wayland compositors (Gnome, Sway, etc) and very flakey XWayland. But until somebody debugs the problem its not fixable. IIRC suggestions for debugging were made on previous issues but (perhaps understandably) people just found a workaround and didn't contribute further.
Hey, so what do I have to do to provide the debug output that could help? I must admit I don't fully understand how Gnome 3 X11 session works. Does it still run through Wayland despite its name? I run Gnome 3 + X11 on my desktop and my laptop, because this seems to be the most "stable" option for the majority of the programs I use. The only exceptions are geany and xfce-terminal. Both suffer from those occasional hick-ups.
I'm not an expert, but IIUC there are many moving parts and some possible configurations are:
1. x.org X11 with Gnome WM and GTK talking X11, thats the traditional setup, and therefore the one _most likely_ to be stable until the components start to bitrot 2. Wayland compositor such as Gnome and GTK talking Wayland to it, thats the future, but still new, some have found that to be stable, but YMMV, and unknown if they used full screen 3. Wayland compositor such as Gnome and GTK talking X11 to Xwayland that talks Wayland to the compositor, waaay too many moving parts, a GTK that expects the old fashioned weirdness of x.org talking to a new implementation on top of Wayland that does not have all the features of x.org is bound to be buggy IMO.
So the first thing is to be absolutely sure what the setup is, newer distros like Fedora or Arch default to a wayland compositor, so its setup 2 by default, but setting `GDK_BACKEND=X11` when running Geany will use setup 3 IIUC. But you should be able to select Gnome on x.org at the login dialog to get setup 1.
It would be great if you can test all the combinations and report which work fullscreen/maximised and windowed, which don't work, and which work really badly.
Once you have the worst combination (so its nice and repeatable) run Geany under GDB (see HACKING) and when its frozen type ctrl+C in the GDB window and get a `bt` to show where its stuck. Probably important to repeat this to be sure that its the same place (the lowest level function locations may change if its polling but it should be down the same basic rabbit hole of calls). Hard to do if fullscreen unless you have two screens though.
PS, when using GDB you may not get symbols depending on your distro, but you may be able to load them from a package, or build Geany.
Also always use `geany -c /tmp/something_that_does_not_exist` to ensure a consistent default configuration.
PPS note that fullscreen `view->fullscreen` is different to maximised (using the window decorations) and may behave differently.
@elextr As far as I can tell the session type doesn't matter at all. I usally run setup 1 (X11), but also tried setup 2 (Wayland). The "freeze" happens on both.
`[spider@havarie ~]$ echo $XDG_SESSION_TYPE x11 [spider@havarie ~]$ yay -Qi gnome-desktop | grep Version Version : 1:3.38.3-1`
Unfortunately I don't have debug symbols. This is the gdb output from a quick test this morning (Gnome 3, X11, maximized Window): `^C--Type <RET> for more, q to quit, c to continue without paging--
Thread 1 "geany" received signal SIGINT, Interrupt. 0x00007ffff7bb547f in poll () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff7bb547f in poll () at /usr/lib/libc.so.6 #1 0x00007ffff6d9fb7f in () at /usr/lib/libglib-2.0.so.0 #2 0x00007ffff6d4b0a3 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 #3 0x00007ffff74fa22f in gtk_main () at /usr/lib/libgtk-3.so.0 #4 0x00007ffff7d0f460 in main_lib () at /usr/lib/libgeany.so.0 #5 0x00007ffff7ae8b25 in __libc_start_main () at /usr/lib/libc.so.6 #6 0x000055555555505e in () (gdb) c Continuing. ^C Thread 1 "geany" received signal SIGINT, Interrupt. 0x00007ffff7bb547f in poll () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff7bb547f in poll () at /usr/lib/libc.so.6 #1 0x00007ffff6d9fb7f in () at /usr/lib/libglib-2.0.so.0 #2 0x00007ffff6d4b0a3 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 #3 0x00007ffff74fa22f in gtk_main () at /usr/lib/libgtk-3.so.0 #4 0x00007ffff7d0f460 in main_lib () at /usr/lib/libgeany.so.0 #5 0x00007ffff7ae8b25 in __libc_start_main () at /usr/lib/libc.so.6 #6 0x000055555555505e in () ` I'll build geany from source to get proper gdb output...
@jansalleine is probably not necessary to build Geany, its clear that Geany is waiting for communication, its stopped in the `poll()` system function ([see](https://man7.org/linux/man-pages/man2/poll.2.html)) which is usually waiting for communication from something and there is no Geany code in the backtrace beyond the startup that calls `gtk_main()`, so Geany has not asked for a screen update, or opened a file or anything else, its just patiently waiting for a keypress to be communicated.
It confirms the theory that some keypress communication from the server is going missing, maybe something in the compositor (Wayland) or WM (X11) is interecpting the keypress and holding it, and the main part of both those is of course Gnome, but that doesn't really help us do anything about it I'm afraid.
@elextr Yes, it seems to be an issue with Gnome then. I'll consider to open an issue there.
Anyway: thank you for the quick replies and thanks to everyone working on this awesome program! I've tried a ton of text editors and IDEs in my life as a programmer and always felt the latter bloated and the former too limited. For me Geany is the perfect "middle-ground".
After hours of aggresive googling and messing up, I found this which works wonderfully to fix this: https://extensions.gnome.org/extension/4028/wandering-pixel/
@shivensinha4 Awesome find! Thank you! I've been working in maximized window with Geany last night for many hours without problems with that extension \o/ It also explains why it worked for me when I didn't maximize the Geany window, because then conky on my desktop forced the redraw all the time.
You're welcome! Glad to know that it worked for you too. It's funny, if we search hard enough, the number of different threads that exist across several websites that talk about the same issue manifesting in different forms, and only a single discussion out of them mention this extension. I was too lazy to go back and post this solution on the other pages, but this was among the first links that popped up when I googled about Geany :)
Good job, guys!
github-comments@lists.geany.org