Unable to select scan area in preview window

Bug #370818 reported by Matt Zimmerman
104
This bug affects 17 people
Affects Status Importance Assigned to Milestone
xsane
New
Undecided
Unassigned
xsane (Debian)
Fix Released
Unknown
xsane (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Low
Aisano

Bug Description

Binary package hint: xsane

Since sometime during the Jaunty cycle, xsane has started malfunctioning for me. I can easily scan a correct preview image, but when I try to select the scan area using the mouse, I am unable to drag the edges of the window. If I try to select the scan area from scratch, the lower right corner never moves, making it impossible to change the lower or right edge.

This is a bit difficult to explain, so I'm attaching a video demonstrating what happens when I drag-select with the mouse.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: xsane 0.996-1ubuntu2
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: xsane
Uname: Linux 2.6.28-11-generic x86_64

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Alexander Ilyashov (ilyashov) wrote :

I can confirm this bug in Ubuntu Jaunty 32 bit edition

Revision history for this message
Mike Stotko (mike-stotko) wrote :

I also experience that bug in Jaunty 32-bit

Matt Zimmerman (mdz)
Changed in xsane (Ubuntu):
importance: Undecided → High
status: New → Triaged
importance: High → Medium
tags: added: regression-release
Revision history for this message
Chris (bridgeriver) wrote :

Mine (Jaunty amd64, same version as the original poster) has severe drawing problems: most of the display is simply not there.

Note that the brown color is intentional (I made a dark brown color scheme with the Appearance settings).

Revision history for this message
Michele Giacomoli (michele-giacomoli) wrote :

I have the same problem in Karmik 32 bit edition

Revision history for this message
Michele Giacomoli (michele-giacomoli) wrote :

I reinstalled Karmic from Beta and the problem is fixed

Revision history for this message
Lester (lester-dev) wrote :

I can confirm this bug is present in Karmic release. I have canon mp160 mfu. I'm wondering, has this bug to do anything with canon driver?

Revision history for this message
Marc Quinton (mquinton) wrote :

I have this problem with karmic ; never seen that problem before.

Revision history for this message
Marc Quinton (mquinton) wrote :

this bug seems to be présent from jaunty, and is still here with karmic. This is not an amd64 bug.

tags: added: jaunty karmy
removed: amd64
tags: added: karmic
removed: karmy
Revision history for this message
lucge (luc-loiseau) wrote :

Same problem on Intel machine:
- OK with Ubuntu Jaunty
- problem appear on Ubuntu Karmic
- same problem when compiling xsane from source on Ubuntu Karmic
- OK with fedora 12 (same gnome version)

Revision history for this message
Sergio Callegari (callegar) wrote :

Same problem on Karmic.
Also at times when I start xsane the preview window does not automatically appear and when I make it appear using the window menu it comes out garbled.

Revision history for this message
foxinsocks (shrowder) wrote :

"...when I try to select the scan area using the mouse, I am unable to drag the edges of the window"

Not surprisingly, this is also a problem with LinuxMint 8 (based on Karmic). But it was an annoying surprise when I upgraded from Mint 7 last night. This was not a problem with Mint 7 so I decided to re-install 7. However, I got too smart :-(
and rather than re-install Mint 7 Universal, and then have to add all the codecs etc, I downloaded and installed LinuxMint 7 Main CD. I did an upgrade so the system was up-to-date and I now have the same issue in Mint 7.

This is a show-stopper for me; I use the scanner every day

Looks like I'll have to start again with Mint 7 Universal and then be selective with MintUpdate. Grrrr!!

Revision history for this message
Darren Hopkinson (d-hopkinson-94) wrote :

Same problem in Ubuntu Karmic using a CanoScan N1240U.
I didn't experience this problem with Ubuntu Jaunty, and Fedora 12 is also not affected.

Revision history for this message
steelsteel (dokkodo-san) wrote :

Perhaps this would help a little:

I have an Ubuntu 9.10 running - and the error concerning the selection in the xsane scan preview is NOT present!
Scanner is an Canon N676U.
I upgraded since 8.10 -> 9.04 -> 9.10. (64bit version, still the old ext3 fs under the system.)

On other hardware (eeebox, asus / old dell desktop, dell / revo3600, acer / notebook latitude C640, dell) i fresh installed Linux Mint 8. And the error IS present. (Scanner is Canon LIDE 30, a very compatible one, too. btw: 32bit version).

Perhaps this would help anyone to solve this problem, before 10.04 is out ;)!
Greetings from north-bavaria!

(same bug: https://bugs.launchpad.net/linuxmint/+bug/498548)

Revision history for this message
Mr. Wep (subscribe-volny) wrote :

I can confirm this, but for me it only seems to affect Karmic 64bit. It works fine on Karmic 32bit as well as Hardy 32bit. I tested both an Epson Perfection V700 and a HP scanjet 4470c, there does not seem to be any difference. I also tried the 0.995 version of xsane in the 64bit Karmic but to no avail.
Please say if you want me to attach any logs etc.

Revision history for this message
Francisco de la Peña (francisco-dlp) wrote :

Same problem in Jaunty 32/64 and Karmic 32/64 using an Agfa snapscan1236u. It worked before Jaunty.

Revision history for this message
koma (koen-koma) wrote :

same problem
setup : Karmic with connection to HP ScanJet G3110 over the network (saned)

Revision history for this message
Darren Hopkinson (d-hopkinson-94) wrote :

Same problem in Ubuntu Lucid beta (CanoScan N1240U).

Revision history for this message
lucge (luc-loiseau) wrote :

Problem solved with Lucid beta (HP Photosmart C4180)

Revision history for this message
Marc Quinton (mquinton) wrote :

problem unsolved with Lucid beta 1 and HP Scanjet 2200.

tags: added: lucid
Revision history for this message
Matt Zimmerman (mdz) wrote :

If this bug affects you as well, please just click the "Does this bug affect you?" link at the top to let us know. There is no need to add any further comments confirming the existence of this bug.

Meanwhile, check out the new Simple Scan application in Lucid, which may offer a substitute for many people.

Revision history for this message
Francois Thibault (thibaulf88) wrote :

Somehow, this issue seems related with nvidia driver. Using "nv" driver instead of "nvidia" seems to affect the area selection issue. Glx module must also be removed.
I'm running Lucid 32 bits.

In /etc/X11/xorg.conf
Section "Module"
# Load "glx"
EndSection

Section "Device"
 Identifier "Configured Video Device"
# Driver "nvidia"
 Driver "nv"
 Option "NoLogo" "True"
EndSection

Not sure if we could call it "workaround", but it works for me (nv driver is enough for me).

Revision history for this message
Aisano (info-ais-sanmarino) wrote :

I am having this problem on my new notebook running Ubuntu 10.04, and I did a little source code reading. At least on my hardware the problem is caused by the processing of mouse move events, where the event state mask happens to have the 0x2000 bit set. This bit is not defined in the "gdktypes.h" header, and I do not know what it means. But it causes the comparison to the mouse button bit masks in "xsane-preview.c" to fail, so the scan rectangle is never drawn or updated.

A look at the code revealed that there seems to be a little misunderstanding: Though the "GdkEventMotion.state" value is a bit mask it is AND-ed with constants such as GDK_Num_Lock or GDK_Caps_Lock, which are not bit masks but enumerated values. What the author probably meant was ignoring any modifiers (such as Shift or Ctrl) except for the bare mouse buttons. This is easily achieved by AND-ing the state value with the OR-ed mouse button constants (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK).

I am adding a patch for xsane-preview.c, which solves the problem on my platform and looks like "doing the right thing", so it should not harm anybody even if the problem should have different causes on different platforms.

Revision history for this message
Aisano (info-ais-sanmarino) wrote :

TEST CASE:
Obviously the test is significant only on systems affected by the problem. So If you cannot define the scan rectangle in the preview by dragging your mouse then
1. Install the fix
2. Start xsane
3. Open the preview window (unless it's open already)
4. Left-press your mouse in the preview window and drag your mouse; a dashed rectangle should appear between your mouse pointer and the spot where you clicked.
5. Release the left mouse button, press the middle or right mouse button within the dashed rectangle and drag your mouse; the dashed rectangle should follow it (as far as the preview window permits).

Changed in xsane (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Mike Stotko (mike-stotko) wrote :

short, concise description of the actual problem and the patch works for me. Excellent work. Thanks !

Revision history for this message
Marc Quinton (mquinton) wrote :

then for this patch, it works fine for me on Ubuntu Lucid.

Here is instructions to build it on Lucid. Build process should be the same on any version of Debian and Ubuntu, except package version number.

# get header to build xsane package
sudo apt-get build-dep xsane

# create a working directory
mkdir -p $HOME/tmp/xsane && cd $HOME/tmp/xsane

# get xsane sources
apt-get source xsane

# get Aisano xsane patch
wget 'http://launchpadlibrarian.net/48345142/xsane-preview.c.patch'

# apply patch
patch xsane-0.996/src/xsane-preview.c xsane-preview.c.patch

# build xsane as a package
(cd xsane-0.996/ && dpkg-buildpackage -rfakeroot -uc -b)

# remove existing installed package
sudo dpkg -r xsane xsane-common

# install new built package
cd $HOME/tmp/xsane && sudo dpkg -i xsane_0.996-2ubuntu1.1_i386.deb xsane-common_0.996-2ubuntu1.1_all.deb

# restore ubuntu package if needed (if this one does not work).
sudo dpkg -r xsane xsane-common
sudo apt-get install xsane xsane-common

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Seb128 -

Could you (or someone you assign to) please review this patch and sponsor as appropriate? Thanks.

Cheers, Rick

Changed in xsane (Ubuntu):
assignee: nobody → Sebastien Bacher (seb128)
Revision history for this message
Wilf Hull (fornhamfred) wrote : Patch

Attempted to apply the patch to Mint 8 but only resulted in removing Xsane.

This is the terminal output.

Mint8 wilf # # get header to build xsane package
Mint8 wilf # sudo apt-get build-dep xsane
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
Mint8 wilf #
Mint8 wilf # # create a working directory
Mint8 wilf # mkdir -p $HOME/tmp/xsane && cd $HOME/tmp/xsane
Mint8 xsane #
Mint8 xsane # # get xsane sources
Mint8 xsane # apt-get source xsane
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: You must put some 'source' URIs in your sources.list
Mint8 xsane #
Mint8 xsane # # get Aisano xsane patch
Mint8 xsane # wget
'http://launchpadlibrarian.net/48345142/xsane-preview.c.patch'
--2010-05-18 19:27:41--
http://launchpadlibrarian.net/48345142/xsane-preview.c.patch
Resolving launchpadlibrarian.net... 91.189.89.228, 91.189.89.229
Connecting to launchpadlibrarian.net|91.189.89.228|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1071 (1.0K) [text/plain]
Saving to: `xsane-preview.c.patch.4'

100%[======================================>] 1,071 --.-K/s in
0s

2010-05-18 19:27:41 (78.8 MB/s) - `xsane-preview.c.patch.4' saved
[1071/1071]

Mint8 xsane #
Mint8 xsane # # apply patch
Mint8 xsane # patch xsane-0.996/src/xsane-preview.c xsane-preview.c.patch
patch: **** Can't find file xsane-0.996/src/xsane-preview.c : No such
file or directory
Mint8 xsane #
Mint8 xsane # # build xsane as a package
Mint8 xsane # (cd xsane-0.996/ && dpkg-buildpackage -rfakeroot -uc -b)
bash: cd: xsane-0.996/: No such file or directory
Mint8 xsane #
Mint8 xsane # # remove existing installed package
Mint8 xsane # sudo dpkg -r xsane xsane-common
(Reading database ... 160137 files and directories currently installed.)
Removing xsane ...
Removing xsane-common ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for desktop-file-utils ...
Mint8 xsane #
Mint8 xsane # # install new built package
Mint8 xsane # cd $HOME/tmp/xsane && sudo dpkg -i
xsane_0.996-2ubuntu1.1_i386.deb xsane-common_0.996-2ubuntu1.1_all.deb

Regards

Wilf Hull

Revision history for this message
Aisano (info-ais-sanmarino) wrote :

Wilf Hull, the key to your problem lies in this error message:

"E: You must put some 'source' URIs in your sources.list"

It seems that your system defines no source locations to download from. As a result, the source code for the xsane application could not be fetched and built. Removing the old xsane was successful, as you noticed.

I do not know Mint8. On my system the "sources.list" file is in /etc/apt. I suggest you check that file.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your work there, the change seems correct, would somebody interested by doing a debdiff for a stable update (see https://wiki.ubuntu.com/StableReleaseUpdates)? It would be useful to send the change to Debian and upstream too if you can. I will review the debdiff and upload if somebody is wanting to work on it

Revision history for this message
Aisano (info-ais-sanmarino) wrote :

With Seb128's help I prepared the debdiff. Un grand merci to him for his guidance and patient help.

Changed in xsane (Ubuntu Lucid):
assignee: nobody → Aisano (info-ais-sanmarino)
importance: Undecided → Low
status: New → Fix Committed
Changed in xsane (Ubuntu):
assignee: Sebastien Bacher (seb128) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your work on this, I've slightly updated your change to rebase it on the current version and store it in the debian directory rather than changing the upstream source and subscribed ubuntu-sru now which is the team reviewing stable updates

Revision history for this message
Sebastien Bacher (seb128) wrote :

I've also added a comment on the debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311199 which seems a similar issue, they might be interested by taking the change

Changed in xsane (Debian):
status: Unknown → New
Revision history for this message
John Dong (jdong) wrote :

ACK from SRU team for the debdiff in #31

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted xsane into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Aisano (info-ais-sanmarino) wrote :

I just upgraded, and the fixed version works for me and does not exhibit the problematic behaviour. (Since I provided the patch this does not mean much, except that the build process seems to be perfect. :-)

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xsane - 0.996-2ubuntu3

---------------
xsane (0.996-2ubuntu3) lucid-proposed; urgency=low

  * lp: #370818: Fixed a problem in mouse event processing that interfered
    with selecting the scan rectangle in the preview window.
 -- Reinhard Foessmeier "Aisano" <email address hidden> Thu, 20 May 2010 21:02:28 +0200

Changed in xsane (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to maverick.

Changed in xsane (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Robin (robin48gx) wrote :

This is so annoying. I develop a film, get the negatives ready, put them in the scanner, and WTF I cannot select the negatives for high res scanning.
THIS IS SO BASIC.
How can this not be tested or noticed for so long?
Got a silverfast spy in the distributuion chain ?

Changed in xsane (Debian):
status: New → Fix Released
Revision history for this message
ZeroBit (vamknam) wrote :

$ xsane --version
xsane-0.999

The same problem. Is there any solution?

Revision history for this message
Guraknugen (guraknugen) wrote :

Same problem here occasionally on Manjaro.
~ $ xsane --version
xsane-0.999

What's the version of the fixed version?

Revision history for this message
Aisano (info-ais-sanmarino) wrote : Malnova adreso: [Bug 370818] Re: Unable to select scan area in preview window

Ĉi tiu adreso ne plu funkcias pro troa spamado. Bonvolu uzi la adreson "informo…" anstataŭ "info…". Dankon pro via kompreno.

Questo indirizzo non funziona più. Servirsi per favore del nuovo indirizzo "informo…" (invece di "info…"). Grazie.

Diese Adresse ist nicht mehr aktiv. Bitte verwenden Sie statt "info…" die neue Adresse "informo…". Danke für Ihr Verständnis

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.