Bug 312514 - Bad area selection on Skanlite in preview mode
Summary: Bad area selection on Skanlite in preview mode
Status: RESOLVED FIXED
Alias: None
Product: libksane
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
: 317223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-03 01:45 UTC by David
Modified: 2016-09-01 17:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.1


Attachments
Screenshot showing problem (70.24 KB, image/png)
2013-01-03 12:32 UTC, David
Details
Debug log of application startup, preview and close (244.24 KB, text/x-log)
2016-09-01 15:09 UTC, Arnaud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2013-01-03 01:45:26 UTC
When previewing the image, there is a big and annoying problem in the area selection box.
I can't select anything below aproximatelly the middle bottom of the page.
I draw the rectangle with the mouse, and it dissapears.


Reproducible: Always

Steps to Reproduce:
1.open skanlite
2.preview image
3.try to draw a rectangle to select an area to scan which be between bottom and middle of page.
4.See that there are some problems in drawing that rectangle
Comment 1 Kåre Särs 2013-01-03 10:13:30 UTC
Thanks for the report.

I need a bit more information:
-What scanner do you have?
-What sane backend is used?

Regards,
  Kåre
Comment 2 David 2013-01-03 12:32:10 UTC
I have sane-backends configured with xinetd via network. XSane works OK, so this is probably a bug in skanlite graphical UI only.
DATA:
scanimage -L
device `net:10.1.1.10:hpaio:/usb/Deskjet_2050_J510_series?serial=CN11A3P53M05D1' is a Hewlett-Packard Deskjet_2050_J510_series all-in-one

Problem seems related to zoom functions in preview mode.
I'll attach an screenshot showing a bad rectangle.
Screenshot explanation:
The right edge of rectangle is bad, but it just don't allow me to draw anything more at right, as it would have some invisible limit in that right edge.
Comment 3 David 2013-01-03 12:32:58 UTC
Created attachment 76157 [details]
Screenshot showing problem

This screenshot shows how I can't select any area beyond some point in preview mode.
Comment 4 David 2013-01-03 12:42:32 UTC
Comment on attachment 76157 [details]
Screenshot showing problem

It is not always reproducible though, sometimes I close and reopen and it lets me select the whole area I want yet sometimes, it have that "invisible limit"
Comment 5 Kåre Särs 2013-01-03 12:56:55 UTC
Hmm...

Can you try and see if the selectable area has the same shape as the scannbed?

Then running Skanlite with sane debug and attaching the log here could help:
SANE_DEBUG_NET=16 skanlite

And then post the log here.

Let's hope that we can solve it.

What KDE (kdegraphics) version are you using?

/Kåre
Comment 6 Philippe Cloutier 2013-12-09 05:58:47 UTC
test
Comment 7 Philippe Cloutier 2013-12-09 06:13:15 UTC
Sorry, I have a network connection problem.

I believe I am also experiencing this bug. I do not have any problem in the vertical sense as David describes in the Description, but I do have a problem in the horizontal sense as David describes in his first comment. I use Debian testing's KDE 4.11.3 and Skanlite 1.0 with an HP Deskjet 3050A.

The bug is hard to describe in words but the screenshot is unclear. A screencast would be best. Basically, there is indeed an "invisible limit" beyond which selection can't extend, even if the cursor moves to the right of that limit. The limit appears to be as far from the right edge of the preview zone as the left margin is far from the the left edge of the preview zone.

This affects both Skanlite and Kolourpaint at least. SANE_DEBUG_NET=16 skanlite; outputs some junk, but nothing useful. The bug causing this symptom must be the same as the one causing bug 317223. The mode chosen for the first preview which is run determines whether this bug will occur or not. Thus, there is an easy workaround - after starting Skanlite, run a dummy preview in color mode before starting to use it.
Comment 8 Kåre Särs 2013-12-09 20:42:27 UTC
Hi Filipus,

I can not reproduce the problem with my epson scanner. Can you run skanlite with the following command:

SANE_DEBUG_HPAIO=16 skanlite

I suppose you are using the hpaio backend.
Comment 9 Kåre Särs 2013-12-09 20:47:04 UTC
*** Bug 317223 has been marked as a duplicate of this bug. ***
Comment 10 Philippe Cloutier 2013-12-10 03:30:34 UTC
Kare, I did get more output with SANE_DEBUG_HPAIO. When I first did the test, the problem didn't occur. Then, I tested 5 more times, and the problem occured 5 times. The test which didn't trigger the bug was the first test after a reboot. If that's not the extra variable, it's hard to see what was different.

I then tried with a different user which must not have scanned before. The problem reproduced 3 times on 3, and whether or not the first scan was in color mode. I am starting to wonder whether I was confused in the tests I did yesterday.

$ SANE_DEBUG_HPAIO=16 skanlite
[sanei_debug] Setting debug level of hpaio to 16.
[hpaio] sane_hpaio_init(): scan/sane/hpaio.c 335
[hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 354
p11-kit: invalid config filename, will be ignored in the future: /etc/pkcs11/modules/gnome-keyring-module
p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
[hpaio] sane_hpaio_open(/usb/Deskjet_3050A_J611_series?serial=CN182482Z505PJ): scan/sane/hpaio.c 369 scan_type=7 scansrc=1
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=option-cnt)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=resolution)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=resolution)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=source)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=source)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=advanced-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=advanced-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=brightness)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=brightness)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=contrast)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=contrast)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=compression)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=compression)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=jpeg-quality)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=jpeg-quality)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=geometry-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=geometry-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-y)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-y)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-y)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-y)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=source)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=resolution)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=brightness)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=contrast)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=compression)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=jpeg-quality)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=resolution)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=source)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=advanced-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=brightness)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=contrast)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=compression)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=jpeg-quality)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=geometry-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-y)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-y)
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
"/org/freedesktop/UDisks2/drives/Samsung_SSD_840_Series_S14CNSAD302532T" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/WDC_WD800JD_60LSA0_WD_WMAM9P941928" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/ASUS____DRW_24B1ST___c_CBD0CL004301" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/Samsung_SSD_840_Series_S14CNSAD302532T" : property "DeviceNumber" does not exist 
"/org/freedesktop/UDisks2/drives/Samsung_SSD_840_Series_S14CNSAD302532T" : property "Device" does not exist 
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=mode)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=resolution)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=source)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=advanced-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=brightness)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=contrast)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=compression)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=jpeg-quality)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=geometry-group)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=tl-y)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-x)
[hpaio] scan/sane/ledm.c 464: sane_hpaio_get_option_descriptor(option=br-y)
[hpaio] scan/sane/ledm.c 821: sane_hpaio_get_parameters(): format=0, last_frame=1, lines=877, depth=8, pixels_per_line=638, bytes_per_line=638
[hpaio] scan/sane/ledm.c 834: sane_hpaio_start()
[hpaio] scan/sane/ledm.c 133: cnt=13401 index=0 input=0xa131abc inputAvail=13401 inputUsed=13401 inputNextPos=13401 output=(nil) outputAvail=0 outputUsed=0 outputThisPos=-236064768
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=(nil) outputAvail=0 outputUsed=0 outputThisPos=-236064768
[hpaio] scan/sane/ledm.c 821: sane_hpaio_get_parameters(): format=0, last_frame=1, lines=877, depth=8, pixels_per_line=637, bytes_per_line=637
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=100000 outputThisPos=0
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=100000 maxLength=100000 status=0
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=100000 outputThisPos=100000
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=100000 maxLength=100000 status=0
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=100000 outputThisPos=200000
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=100000 maxLength=100000 status=0
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=100000 outputThisPos=300000
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=100000 maxLength=100000 status=0
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=100000 outputThisPos=400000
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=100000 maxLength=100000 status=0
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=58649 outputThisPos=500000
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=58649 maxLength=100000 status=0
[hpaio] scan/sane/ledm.c 133: cnt=0 index=0 input=(nil) inputAvail=0 inputUsed=0 inputNextPos=13401 output=0xa13ab00 outputAvail=100000 outputUsed=0 outputThisPos=558649
[hpaio] scan/sane/ledm.c 1041: -sane_hpaio_read() output=0xa13ab00 bytes_read=0 maxLength=100000 status=5
[hpaio] scan/sane/ledm.c 1050: sane_hpaio_cancel()
Comment 11 Christoph Feck 2013-12-28 01:06:50 UTC
Kåre, does comment #10 provide the requested information? Please set the bug status.
Comment 12 Kåre Särs 2013-12-30 08:22:30 UTC
Unfortunately I cannot figure out what the problem is :(

I'll try to borrow a HP scanner and see if I can get this problem fixed...
Comment 13 Philippe Cloutier 2014-01-02 18:15:23 UTC
Thank you Kare. If you think that would be optimal, I will provide access to my HP Deskjet 3050A via SSH access to my personal computer, which is online 99% of the time. I am chealer on irc.oftc.net.
Comment 14 Kåre Särs 2014-01-05 11:30:13 UTC
Git commit a0081b591f2ecc9789102132b9dd70fbd1f7c0d6 by Kåre Särs.
Committed on 05/01/2014 at 11:17.
Pushed by sars into branch 'master'.

Fix preview size for some backends

Some backends don't return data until everything is scanned.

M  +3    -2    libksane/ksane_widget_private.cpp

http://commits.kde.org/libksane/a0081b591f2ecc9789102132b9dd70fbd1f7c0d6
Comment 15 Kåre Särs 2014-01-05 11:36:03 UTC
Filipus:
Thanks for your offer. I got to borrow a scanner locally :)
Comment 16 Arnaud 2016-09-01 14:50:07 UTC
Hi, I know this is an old bug, but was wondering whether it ever got resolved. Status shows "resolved fixed", but I am still experiencing the same problem with my HP Scanjet 8250, a scanner using avision drivers. It would be great to find a solution. A preview scans only roughly an A5 area on this A4 flatbed scanner.
$ skanlite -v
Qt: 4.8.7
KDE Development Platform: 4.14.16
Skanlite: 1.1

Doing a scan instead of prescan does scan the whole surface, but defeats the purpose of the program, because I want to use it the scan and split multiple hpotos on one page.
My HP Officejet 5610 (All in One) works without any problems.  How can I implement the fix?
Thanks,
Arnaud
Comment 17 Arnaud 2016-09-01 15:09:32 UTC
Created attachment 100886 [details]
Debug log of application startup, preview and close
Comment 18 Arnaud 2016-09-01 17:47:22 UTC
(In reply to Arnaud from comment #16)
> Hi, I know this is an old bug, but was wondering whether it ever got
> resolved. Status shows "resolved fixed", but I am still experiencing the
> same problem with my HP Scanjet 8250, a scanner using avision drivers. It
> would be great to find a solution. A preview scans only roughly an A5 area
> on this A4 flatbed scanner.
> $ skanlite -v
> Qt: 4.8.7
> KDE Development Platform: 4.14.16
> Skanlite: 1.1
> 
> Doing a scan instead of prescan does scan the whole surface, but defeats the
> purpose of the program, because I want to use it the scan and split multiple
> hpotos on one page.
> My HP Officejet 5610 (All in One) works without any problems.  How can I
> implement the fix?
> Thanks,
> Arnaud

I just tired Skanlite 2.0.0 under yakkety - problem is present in that version too.