While using Geany in Gnome I found that sometimes code navigations was slow, changing to a new line o making selections were reflected after aprox 1 second on the screen.
Just opening a file and navigating doesn't trigger this problem, after editing, saving or selecting some text the issue shows up.
I have other setup of Stretch with MATE desktop and the problem isn't there.
I also compiled a clone of the geany github repo and I was able to reproduce the problem (in Gnome).
(I filed a bug report to the debian package)
Please always report the versions of GTK when making reports like this (menu->help->debug messages near the top). For both the Gnome and Mate systems.
@elextr Sorry, here is the info Geany 1.29, es_CL.UTF-8 GTK 2.24.31, GLib 2.50.3
@FabianInostroza which system is that for? the Gnome or the Mate and whats the versions for the other?
And what evrsion of the OS and is it Wayland or X11?
@elextr For both systems (both setups are Debian Stretch). Both systems are using X11 on the same machine.
Tried with default settings and the issue is here.
Here is more info of the machine: Linux debian-local 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux GNOME 3.22.2 CPU Intel i7-3520M 16 GB RAM, SSD disk
Ok, since you had two systems one working and one not the first idea was to find what was different, simply having a different desktop would normally be considered to have no effect.
But in the absence of any other differences I guess its Gnome's fault, maybe its causing GTK to do something in the background, like enumerate filesystem contents in case you open the file chooser or something similar.
Did you check for anything else using CPU in the Gnome case?
Yes, there is nothing using CPU, just firefox with 1%.
I tried running strace but it showed a lot of events and I don't know what to filter.
Based on a recommendation on issue #1526 I tried Scite (just on GNOME) and it works fine, no delays.
I have vague memories of reports a version of GTK did bad things like blocking in the main thread, but I can't find it just now, and I don't know why it would depend on the desktop.
Yes, there is nothing using CPU, just firefox with 1%.
Do you mean even Geany isn't using CPU?
Anyway, one possible candidate would be the new-ish accessibility support, could you try re-building Geany without it, like commenting out/removing [line 3070 of *scintilla/gtk/ScintillaGTK.cxx*](https://github.com/geany/geany/blob/master/scintilla/gtk/ScintillaGTK.cxx#L3... (not actually tested but it should work)
@b4n Yes, the system monitor shows 0% for geany.
Compiled with that line commented out and doesn't affect.
Other difference I have noticed while running geany between the two setups is that the terminal prompt of geany in GNOME doesn't show colors, both systems have libvte9. I don't think this is related to the main problem.
I uploaded a video showing the delays I'm talking about, I hope you can hear the mouse clicks: https://drive.google.com/file/d/0B_AKPUOZlOCrSUhsTmJFZ3p3NnhvOHJwZzRFalRyVGp...
It is like using geany through a slow ssh connection.
I am experiencing the exact same issue in Geany 1.33 on Solus Budgie with GTK 3.22.30, GLib 2.56.1. My "symptoms" match Fabian's descriptions perfectly.
@NathanaelLane have you checked with all plugins disabled? And with a new config `geany -c /tmp/does_not_exist` ? What language file are you editing? How big is it?
I am not running any plugins, a fresh config doesn't change the behavior, and the behavior persists across multiple language types (java, python, openscad, css/html, etc). The source files I have tried are between 100 and 400 lines. On the other hand, plaintext/markdown/LaTeX files render responsively without issue.
The problem is that it doesn't appear to happen to any of the Geany devs, so its hard to say whats the problem.
Debian testing now ships Geany linked against GTK3 and I don't have this problem now
@FabianInostroza what are your exact versions (in help->debug messages) @NathanaelLane is on GTK3 too.
@elextr Geany 1.33, es_CL.UTF-8 GTK 3.22.29, GLib 2.56.1
Well, unless somebody else using GTK 3.22.30 has the problem don't know what it is.
@elextr do you have any suggestions of where to start if I want to try my hand at debugging?
@NathanaelLane not really, it looks like some interaction between Gnome and GTK thats possibly delaying user interaction notifications, or is delaying update notifications. Maybe some Gnome/GTK spurt will have a suggestion what to look at.
Didn't want to create a new topic since my issue is very similar. Except that I don't use GNOME.
Running the latest version of Geany on antergos with KDE Plasma. Super-often, I also experience lag (which takes about 1 second or so) which occurs during any of these actions:
switching between files; scrolling text up/down typing text; cutting/copying/pasting text; and doing anything else which requires updating (refreshing) displayed content;
In other words, it takes about 1 second (maybe slightly less) for Geany to update displayed content, which drives me crazy, since Geany is the only normal text editor I found as Notepad++ replacement (coming from Windows world).
So far, Geany is the only app on my computer which has this type of lag. Running the latest generation of Intel i5 8400 6-core CPU with integrated GPU, 8 GB of RAM, and NVMe SSD, so it's surely not performance-based issue.
@toxpal, see second post on this thread.
GTK 3.22.30, GLib 2.56.1
I wonder if this is #807 still happening?
Question to everybody who sees the problem, are you running Geany in a full screen window (you know + in the window decoration of sensible DEs)? If you are then see if it occurs when the window is not full screen and report the results.
Alright, will test it today and let you know.
Using geany **NOT** in full screen, and the issue still remains - it often takes geany some time to update displayed content when some text is typed/copied/scrolled, etc.
The problem is, it doesn't seem to occur to any of the Geany devs.
@b4n, any suggestions whet to look at?
P.S. Sometimes (like 1 time out of 20), even when working with very small file (several lines of PHP code), it takes Geany 1 second to update cursor position after pressing TAB or SPACE buttons on keyboard. It occurs in both fullscreen and not fullscreen modes.
The issue also continues for me even when the window is not in full screen.
I wonder if this is #807 still happening?
@elextr: I have never had such issues at home on my Ubuntu machine.
But at work I often have the issue that geany doesn't seem to react right after the start. But the window title etc. is updated if I click on a document tab. But the active tab is not changing. Then I close and re-start geany and everything is fine. So if this is the problem you mean, then... - it only occurs to me on windows - it only occurs on the first start of geany after booting my PC
Hmmm, I am now using a different (slower) machine to the one where I reported #807 and don't see it much at all, just very occasionally.
Given the variation of circumstances where some form of delayed or otherwise poor screen updating is seen (Linux and Windows, various versions of GTK, and slightly different manifestations) the only common item is Scintilla. Perhaps there is some variability in the order that the various update signals from GTK get to Scintilla and that is exposing a dependency on the order of things in Scintilla.
Or perhaps there is a race where as machines get faster signals happen faster and the race is lost (an update is missed) more often.
When this glitch is happening, is there any output on the console? (Start Geany with `-v` option)
Another thing would be to run Geany with GDB and see if fires off a lot of threads (GTK+ does this sometimes and it can block, I guess when they're joined). Additionally, in GDB, if you're fast enough and can interrupt it using <kbd>Ctrl</kbd>+<kbd>c</kbd> while it's stuck, the resulting backtrace would probably be useful to see what's it's doing.
A final thing to try might be to run Geany with [GtkInspector](https://wiki.gnome.org/Projects/GTK%2B/Inspector) and see if anything looks fishy with the signals as @elextr mentions.
sorry to drag up this old issue, but i'm seeing hanging even when doing something as simple switching tabs or moving around some text in geany on debian sid.
seems to happen more often in full screen or a nearly fullscreen window (i.e. not a small one) and only on xorg, **i cannot trigger it on wayland.**
nothing to do with plugins or config as disabled everything.
been using geany for years and only seen this in the last month - note that geany hasn't been updated in a year in debian, so its not a new geany bug, i guess some sort of incompatibility with gnome 3.38 or latest x11/xorg or something?
strace and gdb don't seem to show anything useful.
``` Geany 1.36, en_GB.UTF-8 GTK 3.24.23, GLib 2.66.0 ```
@sej7278 well since Geany works on Wayland, but not on X11, and since its entirely GTK that talks to those, its something to do with GTK, especially if Debian has not updated Geany. But unless
1. it happens to one of the developers
2. somebody finds a reproducer
3. somebody finds the cause
there is not much we can do.
PS You could try compiling Geany from git, it has updated Scintilla which might fix it although I don't remember any significant changes in the GTK backend.
@elextr ok thanks, I just thought I'd ask in case someone had a "oh yes that's this..." moment, but assume it's something Debian broke.
this is still happening to me, do you have any idea how to debug it so i could report it to whomever as it doesn't really seem to be a geany issue?
i've tried `strace geany -p` and noticed when the pause happens e.g. change tabs a few times; there's lots of calls to `gettimeofday()`:
``` clock_gettime(CLOCK_MONOTONIC, {tv_sec=308651, tv_nsec=541611046}) = 0 recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=10, events=POLLIN|POLLPRI}], 4, 0) = 0 (Timeout) clock_gettime(CLOCK_MONOTONIC, {tv_sec=308651, tv_nsec=541810024}) = 0 gettimeofday({tv_sec=1602928536, tv_usec=187037}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=187220}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=187499}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=187681}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=187857}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=188045}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=188198}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=190056}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=190358}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=190877}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=191167}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=191574}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=191829}, NULL) = 0 gettimeofday({tv_sec=1602928536, tv_usec=192067}, NULL) = 0 poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{iov_base="\213\7\2\0A\17\340\0016\0\2\0@\17\340\1\213\7\2\0;\17\340\0016\0\2\0:\17\340\1"..., iov_len=16356}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16356 recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable) ```
AFAICT `gettimeofday()` does not exist in the Geany codebase, so its still something in one of the libraries we use.
I wouldn't neccessarily say this is the same as #1787 since that is about updating text within a file, not swapping tabs. I re-checked and swapping tabs at full screen or nearly full screen does not happen here any more, noting that I'm not using the same machine as previously and several OS versions newer too.
The `gettimeofday()` calls might come from checking if the file changed on disk, IIRC this happens when switching tabs with some interval. The slowiness could result from files on a network filesystem.
However, this contradicts the observation that it behaves differently with Wayland and Xorg. At least I cannot see any relation between file timestamp checking and a display server. @sej7278 can you ensure that no network filesystem (SMB, Fuse, GVFS, sshfs, ...) is involved? If so, the `gettimeofday()` calls are probably not the related.
@eht16 no, these are all local nvme/ssd files not nfs. i'll do a bit more checking with wayland and see if i can trigger it.
i'm pretty sure it has to be something to do with gnome 3.38 which is trickling into debian sid, but without anything more specific than that - and it appears to only happen to geany - i can't raise any useful bug reports as they'll just blame geany.
Just built from git and have the same pausing issue even without plugins, retrying wayland next
@sej7278 which window manager are you using?
Just gnome3 so mutter
Jumping in, but… could you check e.g. downgrading GLib or GTK? It might be a pain to downgrade, but maybe make a custom GLib build and use that might be easy enough. If it's an incompatibility with one of the platform libraries maybe we could try and isolate the change that lead to that and see if we can fix this in Geany (or Scintilla).
just tried geany_1.37-1+20201101git2292c41-1_amd64.deb from nightly and can't reproduce the problem on gnome3, i assume these were built with gtk2 though as the window furniture looks odd/old.
Yes, the nightly builds are still built against GTK2 but will switch soon to GTK3 once 1.37 lands in Debian archives and GTK2 compability in Geany itself will be removed in the next version. So, GTK2 is no solution :(.
1.37 just landed in debian sid using gtk3, still got the same issue with fullscreen pauses
with geany 2.0.0 on windows 10 i observe that if i don't make any keyboard/mouse input for about 30 seconds the UI becomes unresponsive for a second whenever i make a keyboard input or hover over the toolbar buttons.
Closed #1532 as not planned.
This is so old that it probably isn't relevant anymore or fixed in the meantime.
For the Windows issue, please open a seperate issue as this most probably has another cause than on Linux.
github-comments@lists.geany.org