Bug 276752

Summary: Import from scanner stops before scan has finished
Product: [Frameworks and Libraries] libksane Reporter: Mark Fraser <mfraz74+kde>
Component: generalAssignee: Kåre Särs <kare.sars>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.2
Sentry Crash Report:
Attachments: Skanlite debug output
Digikam debug output

Description Mark Fraser 2011-06-29 15:24:28 UTC
Version:           0.6.2 (using KDE 4.6.4) 
OS:                Linux

If I try to scan a photo with digikam 2.0.0rc in Kubuntu 11.04, it will get to about 40% and then start scanning again stopping at 40% again. The save window then pops up. When I open the image, only part of the photo has been scanned.

Reproducible: Always

Steps to Reproduce:
Open digikam, goto Import > Import from scanner. Click preview and then click scan.

Actual Results:  
Scan stops at around 40%, starts again and then stops at 40%.

Expected Results:  
Whole image is scanned.

OS: Linux (i686) release 2.6.38-8-generic
Compiler: cc
Comment 1 Kåre Särs 2011-06-29 15:48:25 UTC
Hi,

Can you specify what scanner and what backend you are using?

A debug log would also help.

Debug printouts can be generated with:

$ SANE_DEBUG_<... backend ...>=16 digikam

You could also try to scan with skanlite or scangui. The following example is for an epson scanner using the epson2 backend.

$ SANE_DEBUG_EPSON2=16 skanlite

/Kåre
Comment 2 Mark Fraser 2011-06-29 15:53:43 UTC
The scanner is part of an HP C309g all-in-one printer, and has been set up using HPLIP-GUI. Have tried scanning using XSane and that works fine.

Could you give me some more help in how to create a debug print out?
Comment 3 Kåre Särs 2011-06-29 18:31:25 UTC
Skanlite and scangui uses the same library as the plugin digicam uses so they should behave the same.

So the command in a terminal would be:
SANE_DEBUG_HPAIO=16 skanlite

Then copy the output into a text file and attach it to this bug report.
Comment 4 Mark Fraser 2011-06-29 20:47:48 UTC
Created attachment 61457 [details]
Skanlite debug output
Comment 5 Mark Fraser 2011-06-29 20:48:22 UTC
Created attachment 61458 [details]
Digikam debug output
Comment 6 Mark Fraser 2011-06-29 20:50:02 UTC
Skanlite, when run does produce the desired scan, but it looks like it only does the proper scan after it is told where to save the file. Digikam, doesn't produce the desired scan and only the top portion of the image is saved.
Comment 7 Kåre Särs 2011-06-30 20:20:07 UTC
Hi,

It is a bit strange that Skanlite does not have the same behavior... Scangui uses the same plugin as digikam and would be closer. It could be some option that Skanlite sets/modifies that the kipi-plugin does not...

The amount of log was a bit overwhelming :)

Could you experiment with a bit lower debug number and insert comments for example where the scan stops and where you clicked on scan and preview?

This is probably a hpaio problem but it could be good to verify that libksane does not do something stupid :)

Thanks,
  Kåre
Comment 8 Kåre Särs 2011-06-30 20:23:04 UTC
Hi gain :)

Can you elaborate on "but it looks like it only does the proper scan after it is told where to save the file"?

I'm not sure what you meant with that.
Comment 9 Mark Fraser 2011-06-30 20:42:53 UTC
(In reply to comment #8)
> Hi gain :)
> 
> Can you elaborate on "but it looks like it only does the proper scan after it
> is told where to save the file"?
> 
> I'm not sure what you meant with that.

It had 2 attempts at scanning the photo, the save box popped up, I told it where to save the file and then it scanned the whole image again.
Comment 10 Kåre Särs 2013-02-11 20:40:34 UTC
The broken scan progress has been fixed in KDE 4.8.2

The double scanning probably came from strange automatic selection. There has also been improved automatic selections in 4.8.2