bugMyPaint - Bugs: bug #19896, Occasional lines drawn to (0,0),...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #19896: Occasional lines drawn to (0,0), (x,0) or (0, y) during freehand drawing (was: Ghost lines on newest Ubuntu)

Submitted by:  Magnesus <magnesus>
Submitted on:  Wed 04 Jul 2012 08:12:48 PM UTC  
 
Severity: 4 - ImportantPriority: 5 - Normal
Status: ConfirmedPrivacy: Public
Assigned to: Andrew Chadwick <achadwick>Open/Closed: Open
Release: Planned Release: None
Operating System: Ubuntu 12.04

(Jump to the original submission Jump to the original submission)

Fri 15 Feb 2013 04:39:53 PM UTC, comment #12:

Also reported with the combination

  • DigiPro WP5540 5" x 4" USB Graphics tablet
  • Linux Mint 14 (KDE Version)
  • xserver-xorg-input-wizardpen_0.7.3-0jaunty5_amd64.deb

here, with screenshot:

http://forum.intilinux.com/mypaint-help-and-tips/(digipro-tablet-linux-mint)-mypaint-makes-random-lines-to-top-left-of-screen/

In this case it's always to (0,0), and manually disabling buttons doesn't fix it.

Perhaps filtering out events with zero coordinates prior to passing them onto the active drawing mode would make a difference.

Enough confirmation now, I think.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Fri 15 Feb 2013 04:33:23 PM UTC, comment #11:

I've noticed something like this a while back with an Intuos5 and Debian wheezy/testing (with little bits from unstable). Pressing (or weirdly, with this tablet's partly-capacitative hardware, brushing over) the Pad buttons occasionally resets the pointer position of the associated Pen device to (0,0) until another Pen input is received. As a somewhat odd but simple workaround, rebinding the Pad buttons to keypresses with xsetwacom works in xfce4, as does using Gnome3 or Cinnamon instead :)

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun 29 Jul 2012 08:13:08 PM UTC, comment #10:

I did the workaround immediately after posting the debug results because I saw that returning in that function probably prevents MyPaint from using that coordinates (although it must be "or" not "and" because sometimes only one coordinate misbehaves). Tt's working great. :)

I disconnected my mouse for testing, but it didn't help. I have synaptics pad and wireless keyboard (that came with mouse that I don't use) - I'll try to disable both later.

I agree that it's best if I just hack the file and nothing is changed in MyPaint, because it could make problems for others that don't have this issue. Thanks for all the help and reading all my sometimes nervous comments (I was just working on a game graphics when the problem occured and it was driving me crazy). You are doing a great work with MyPaint - it became my favourite program recently. :)

Magnesus <magnesus>
Sun 29 Jul 2012 06:41:10 PM UTC, comment #9:

I saw something like that once with the wacom touchpad strip, whenever you touch it accidentally. Have you tried to plug out and/or disable all mice-like devices, like touchpads or scroll stripes? Try triggering all of them to see if they cause the bug.

If you just want a workaround, hack something like

if event.x_root == 0 and event.y_root == 0: return

into the code. Obviously this will result in a glitch when somebody with a non-broken tablet driver really paints at that coordinate. Those kind of bugs are really GTK+ or tablet driver bugs 99% of the time. If you want to find a proper fix you have to hunt the problem down yourself on your system, chances that somebody else will figure it out are small. In MyPaint we can only make dirty workarounds.

Martin Renold <martinxyz>
Project Administrator
Sun 29 Jul 2012 12:06:26 PM UTC, comment #8:

Version o MyPaint: 1.0.0+git20120121.b8338d5-1ppa1~natty1
Video: it's similar but in my case much, much less frequent.
Debug data:

DEBUG: ex=973.056 ey=512.352 p=0.81640625 xt=None yt=None ax=373.05600000000004 ay=424.352
DEBUG: ex=969.984 ey=511.77599999999995 p=0.896484375 xt=None yt=None ax=369.98400000000004 ay=423.77599999999995
DEBUG: ex=966.144 ey=511.48799999999994 p=0.904296875 xt=None yt=None ax=366.144 ay=423.48799999999994
DEBUG: ex=0.0 ey=0.0 p=0.904296875 xt=None yt=None ax=-600.0 ay=-88.0
DEBUG: ex=0.0 ey=0.0 p=None xt=None yt=None ax=-600.0 ay=-88.0
device change: Core Pointer <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=959.616 ey=514.3679999999999 p=0.98828125 xt=None yt=None ax=359.616 ay=426.36799999999994
device change: ACECAD USB Graphics Tablet <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=958.464 ey=516.6719999999999 p=0.94921875 xt=None yt=None ax=358.46400000000006 ay=428.6719999999999
DEBUG: ex=957.312 ey=518.976 p=0.98046875 xt=None yt=None ax=357.312 ay=430.976
DEBUG: ex=956.16 ey=521.28 p=0.94140625 xt=None yt=None ax=356.15999999999997 ay=433.28

Another one:
DEBUG: ex=973.056 ey=512.352 p=0.81640625 xt=None yt=None ax=373.05600000000004 ay=424.352
DEBUG: ex=969.984 ey=511.77599999999995 p=0.896484375 xt=None yt=None ax=369.98400000000004 ay=423.77599999999995
DEBUG: ex=966.144 ey=511.48799999999994 p=0.904296875 xt=None yt=None ax=366.144 ay=423.48799999999994
DEBUG: ex=0.0 ey=0.0 p=0.904296875 xt=None yt=None ax=-600.0 ay=-88.0
DEBUG: ex=0.0 ey=0.0 p=None xt=None yt=None ax=-600.0 ay=-88.0
device change: Core Pointer <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=959.616 ey=514.3679999999999 p=0.98828125 xt=None yt=None ax=359.616 ay=426.36799999999994
device change: ACECAD USB Graphics Tablet <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=958.464 ey=516.6719999999999 p=0.94921875 xt=None yt=None ax=358.46400000000006 ay=428.6719999999999
DEBUG: ex=957.312 ey=518.976 p=0.98046875 xt=None yt=None ax=357.312 ay=430.976
DEBUG: ex=956.16 ey=521.28 p=0.94140625 xt=None yt=None ax=356.15999999999997 ay=433.28

And again:
DEBUG: ex=787.2 ey=615.4559999999999 p=0.837890625 xt=None yt=None ax=187.20000000000005 ay=527.4559999999999
DEBUG: ex=787.2 ey=606.24 p=0.837890625 xt=None yt=None ax=187.20000000000005 ay=518.24
DEBUG: ex=0.0 ey=0.0 p=0.888671875 xt=None yt=None ax=-600.0 ay=-88.0
DEBUG: ex=0.0 ey=0.0 p=None xt=None yt=None ax=-600.0 ay=-88.0
device change: Core Pointer <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=0.0 ey=0.0 p=0.875 xt=None yt=None ax=-600.0 ay=-88.0
device change: ACECAD USB Graphics Tablet <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=787.968 ey=576.5759999999999 p=0.91796875 xt=None yt=None ax=187.96799999999996 ay=488.5759999999999

There is always the "device change" info in terminal when it happens apparently.

I'll definitely test any fixes you might have. I don't know Python much, but I might learn a little.
Disconnecting mouse and using only tablet didn't help, still an error:

DEBUG: ex=1027.584 ey=427.67999999999995 p=0.36328125 xt=None yt=None ax=427.58400000000006 ay=339.67999999999995
DEBUG: ex=0.0 ey=0.0 p=0.349609375 xt=None yt=None ax=-600.0 ay=-88.0
DEBUG: ex=0.0 ey=0.0 p=None xt=None yt=None ax=-600.0 ay=-88.0
device change: Core Pointer <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=1034.88 ey=434.88 p=0.396484375 xt=None yt=None ax=434.8800000000001 ay=346.88
device change: ACECAD USB Graphics Tablet <enum GDK_SOURCE_MOUSE of type GdkInputSource>
DEBUG: ex=1035.648 ey=442.36799999999994 p=0.5078125 xt=None yt=None ax=435.6479999999999 ay=354.36799999999994

Magnesus <magnesus>
Fri 27 Jul 2012 10:29:05 AM UTC, comment #7:

There seems to be a consensus on the GIMP bug for it (https://bugzilla.gnome.org/show_bug.cgi?id=661872) that this is something to gdk_device_get_history(). MyPaint does not use this function anywhere. It's possible that there's two bugs here.

Whatever it is, this is fundamentally not a MyPaint bug. A workaround might be nice, but we have to support silly things like using the edge of the screen as a ruler (with the mouse, admittedly).

Please can you tell me what verson of MyPaint you are using? If git, please give the first 8 or so characters of the commit hash.

Please also confirm that it acts like http://youtu.be/9rDf6_FwKEY

Whichever version you're using, I'd like to make a filter for this if it can be done sensibly. By sensibly I mean, I need to know whether the (x=0) or (y=0) or (x=y=0) motion events are happening in isolation, and/or if there's anything else on the event we can use to distinguish glitch from non-glitch.

So... as yet another request, sorry...! Please can you temporarily insert the following block of debugging code into the start of motion_notify_cb() in gui/tileddrawwidget.py and run MyPaint from the terminal? I want to see a trace of the events we receive which highlights one or several of these glitches: it's best done as an attachment or as a pastebin. Please don't go near the screen edges when you scribble - draw only in the centre of your screen :)

If you use a packaged MyPaint, this is installed in /usr/share/mypaint/gui/tileddrawwidget.py and you will need to edit it with the following command

If you can paste the "DEBUG:" lines of the generated nonsense (I'm expecting ey=0.0 or ex=0.0 when it happens), that would be most useful. If necessary, capture the output to a logfile:

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Fri 27 Jul 2012 08:30:12 AM UTC, comment #6:

Please fix it because MyPaint is unsuable as it is right now. I have to use undo every few seconds (!) because of ghost lines. Maybe make an option to filter random 0 coordinates or add option to block strokes that have x=0 or y=0?

Magnesus <magnesus>
Fri 27 Jul 2012 08:21:32 AM UTC, comment #5:

Correction, here: https://bugs.launchpad.net/ubuntu/+source/gimp/+bug/863154

Magnesus <magnesus>
Fri 27 Jul 2012 08:19:18 AM UTC, comment #4:

https://bugs.launchpad.net/mypaint/+bug/868864 - here is the bug for GIMP

Magnesus <magnesus>
Sat 21 Jul 2012 11:54:33 AM UTC, comment #3:
  • Correction: Othe = Other

The tablet worked just fine until some update to Ubuntu. The problem is not limited to MyPaint. I tested it on other computer with Ubuntu 10.10 and older MyPaint and noticed no problems - so it's not a hardware problem.

Magnesus <magnesus>
Sat 21 Jul 2012 11:45:28 AM UTC, comment #2:

I'm using Pentagram QuadPen - the problem occurs on both Wacom and Acecad drivers (the tablets works with most tablet drivers) on Ubuntu 12.04. Othe tablet I tested worked fine so I'm not sure right now if it's a driver problem or a hardware defect.

Magnesus <magnesus>
Fri 20 Jul 2012 11:06:41 PM UTC, comment #1:

Just so we know, what specific model of Wacom (or similar (?)) tablet are you using, and what Ubuntu version? It would be useful to know what version of MyPaint you're using too :)

Classifying a "random jump to (0, 0)" in code sounds like an... interesting... challenge, given that it might be part of a legitimate pen stroke. Would we really be able to rule out events like that in fullscreen mode? We probably can in windowed mode, maybe, and that could be a workaround. More details about the GIMP fix such as details of a commit or a pointer to a source file would be most welcome.

Would you be up for testing a fix for this if we decide to have a look?

FWIW, I'm using a Bamboo MTE-450-A, and Xubuntu 12.04. No problems with ghost lines here.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Wed 04 Jul 2012 08:12:48 PM UTC, original submission:

When drawing with a Wacom (or similar) tablet from time to time random lines appear - beginning from a point with one or both coordinates 0 resulting in random ghost lines from top left corner, top of the image or left of the image. It requires using undo a lot while drawing.
The problem is probably caused by drivers, xorg or sth - but it should be very easy to workaround in MyPaint (there is a fix for GIMP already that patches this) - by ignoring such random jumps to 0,0 or 0,y, x,0. Changing the pressure curve for the tablet doesn't change anything - apparently pressure is not zeroed with x and/or y.

Magnesus <magnesus>

 

Attached Files
file #16207:  test.jpg added by magnesus (374kB - image/jpeg - shows the problem and how severe it is)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by magnesus (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Feb 2013 04:42:28 PM UTCachadwickAssigned toNone=>achadwick
    Fri 15 Feb 2013 04:39:53 PM UTCachadwickSeverity3 - Normal=>4 - Important
      StatusNeed Info=>Confirmed
      SummaryOccasional lines drawn to (0,0), (x,0) or (y,0) during freehand drawing (was Ghost lines on newest Ubuntu)=>Occasional lines drawn to (0,0), (x,0) or (0, y) during freehand drawing (was: Ghost lines on newest Ubuntu)
    Fri 15 Feb 2013 04:33:23 PM UTCachadwickSummaryGhost lines on newest Ubuntu=>Occasional lines drawn to (0,0), (x,0) or (y,0) during freehand drawing (was Ghost lines on newest Ubuntu)
    Fri 27 Jul 2012 10:29:05 AM UTCachadwickOperating SystemUbuntu=>Ubuntu 12.04
    Fri 27 Jul 2012 08:40:36 AM UTCmagnesusAttached File-=>Added test.jpg, #16207
    Fri 20 Jul 2012 11:06:41 PM UTCachadwickStatusNone=>Need Info
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup