GNOME Bugzilla – Bug 644351
Gimp misses some strokes especially when drawing fast
Last modified: 2013-06-23 17:20:11 UTC
(marked version 2.6, but the problem exists in git master too) as I *guess*, gimp registers input events in a gueue and draws them later, the problem is for slower brushes or when drawing fast (or especially the combination :D) - after buffer (queue) is filled up, gimp stops listening for new events (maybe it stops listening while drawing still repainting?). Not sure if this is really the internal workings of gimp, but it describes the problem best. also see this link as I entered bug there 1st: https://bugs.launchpad.net/ubuntu/+source/gimp/+bug/731088 Marked as severity "major", because it makes work with tablet unusable. the warnings I got after strokes where missing: -------------------------- This is a development version of GIMP. Debug messages may appear here. (gimp-2.7:13413): GLib-GObject-WARNING **: value "-2147483648" of type `gint' is invalid or out of range for property `cache-size' of type `gint' (gimp-2.7:13413): Gimp-Display-CRITICAL **: gimp_display_shell_keyboard_ungrab: assertion `shell->keyboard_grabbed == TRUE' failed (gimp-2.7:13413): Gimp-Display-CRITICAL **: gimp_display_shell_pointer_ungrab: assertion `shell->pointer_grabbed == TRUE' failed (gimp-2.7:13413): Gimp-Display-CRITICAL **: gimp_display_shell_keyboard_ungrab: assertion `shell->keyboard_grabbed == TRUE' failed (gimp-2.7:13413): Gimp-Display-CRITICAL **: gimp_display_shell_pointer_ungrab: assertion `shell->pointer_grabbed == TRUE' failed (gimp-2.7:13413): Gimp-Display-CRITICAL **: gimp_display_shell_keyboard_ungrab: assertion `shell->keyboard_grabbed == TRUE' failed (gimp-2.7:13413): Gimp-Display-CRITICAL **: gimp_display_shell_pointer_ungrab: assertion `shell->pointer_grabbed == TRUE' failed --------------------------
The warnings in master were only there one day or so, and are fixed now.
Scratch that last statmeent, I see the warnings too.
It seems that when we miss a stroke, we miss the *entire* stroke, not just some events. Sprinkling some debug printf in gimp_display_shell_tool_events() shows that we never get a BUTTON_PRESS event for the missing strokes, and it only seems to happen under heavy painting load with a large brush on a large image. Also, it's not related to the tablet, just easier to trigger than with the mouse. Whatever is fishy here, I don't see where we could possibly do something that would block button press events, I suspect they get lost somewhere inside GTK+. (Changing bug title, because tablet painting slowness is tracked in another bug).
The gtk3-port branch also seems to miss strokes, but doesn't warn whatsoever, so I guess the events are "at least" swallowed consistently in GTK+ 3.x (button press *and* button release).
*** Bug 649204 has been marked as a duplicate of this bug. ***
*** Bug 649085 has been marked as a duplicate of this bug. ***
I originaly submitted bug 64085, but as it's been marked as a duplicate of this bug I'll post here. I've just been messing around, and noticed that turning on the "KDE/Qt event loop" setting in the CompizConfig settings manager vastly improves performance with my tablet, both in Gimp 2.6.11 and 2.7.3. Before only about 60 to 70% of strokes would register when painting quickly, now it's pretty much rock solid. I'm a bit of a non-technical user, so I'm not sure if that's relevant/not something I should have submitted in the first place. Anyway, hope it's useful.
Well I'm suffering this in Ubuntu 11.04 on both an old and a newly built PC that's has an Intel I5 2500k CPU with 8Gb memory so I can't believe it can be performance related. I tried the KDE/Qt event setting suggestion and I can't say it made any difference for me.
Fixed in master: commit 01f92a3b486bbc2b8aac1771e613e07cb36d7f43 Author: Michael Natterer <mitch@gimp.org> Date: Fri Dec 9 20:20:02 2011 +0100 app: get rid of server grabs for almost all canvas interaction Because it's generally the right thing to do, and server grabs broke badly with input devices / client side windows. gimpdisplayshell-grab.c: change logic to only server-grab if an event is passed to the pointer grab/ungrab functions, but always use gtk_grab_add/remove() which is sufficient in most cases. gimpdisplayshell-tool-events.c: have the grab functions grab the server only for space-bar scrolling and do all tool interaction, including ruler clicks, with gtk_grab_add/remove(). Refactor things a bit to also use the grab API for button-2 scrolling. gimpdeviceinfo-coords.c: transform the event's coords to the canvas' coordinate system, they might come from a ruler now. This fixes the following bugs: Bug 645315 - gimp_display_shell_pointer_grab: gdk_pointer_grab failed... Bug 644351 - Gimp misses some strokes especially when drawing fast Bug 645747 - Gimp is now unusable on xfce4 app/display/gimpdisplayshell-grab.c | 84 +++++++++++++--------------- app/display/gimpdisplayshell-tool-events.c | 80 ++++++++++++--------------- app/display/gimpdisplayshell.h | 2 + app/widgets/gimpdeviceinfo-coords.c | 25 ++++++++ 4 files changed, 100 insertions(+), 91 deletions(-)
*** Bug 654322 has been marked as a duplicate of this bug. ***