Bug 141079

Summary: kooka ignores some scanners
Product: [openSUSE] openSUSE 11.1 Reporter: Johannes Meixner <jsmeix>
Component: KDE3Assignee: E-mail List <kde-maintainers>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: jsmeix, martin
Version: FactoryKeywords: should_go_upstream
Target Milestone: ---   
Hardware: i386   
OS: Linux   
URL: https://bugs.kde.org/show_bug.cgi?id=139932
Whiteboard:
Found By: Development Services Priority: 1000
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Johannes Meixner 2005-12-28 11:57:34 UTC
kooka does not recognize all scanners which are
recognized by "scanimage -L".

I have an Epson Perfection 2480 Photo
and I got a customer report who has the same model
and Peter has an Epson Perfection 2850 Photo.

Regardless which backend I use (snapscan or epkowa),
the Perfection 2480 is listed by "scanimage -L"
and I can use it with the frontends xscanimage and xsane
but kooka ignores the device (i.e. it does not show it
to be selected by the user).

It does not help to specify the SANE device ID on the commandline:
kooka -d epkowa:libusb:005:002
and
kooka -d snapscan:libusb:005:002
result the (misleading) error message in kooka:
-------------------------------------------------------------------
Problem: No Scanner was found

Your system does not provide a SANE (Scanner Access Now Easy)
installation, which is required by the KDE scan support.

Please install and configure SANE correctly on your system.

...
-------------------------------------------------------------------
The first line of the error message is o.k.
but the rest is wrong and misleading.

What is strange is that kooka works ok. for my other scanners.
Therefore the frontend kooka seems to be somehow model dependent
but I have no idea how a frontend can depend on the scanner model
at all because it should only "see" what the backends show.
Comment 1 Johannes Meixner 2006-05-23 08:27:39 UTC
One more customer with the same problem:
---------------------------------------------------------------------
Date: Mon, 22 May 2006 14:30:43 -0500
From: Jadic Family <jadic@sbcglobal.net>
To: sane-devel@lists.alioth.debian.org
Subject: [sane-devel] Epson Perfection 3170 Photo

I just upgraded to SUSE Linux 10.1 from 9.3.
The YAST setup went fine and the scanner works with the Iscan
package/ epkowa driver.
I have however trouble acessing the scanner with KDE applications
like Kooka and Gwenview. They report that there is no scanner
setup in SANE. (...?)
Could anyone give me a hand here?
PS: in SUSE 9.3 everything was working just fine...
---------------------------------------------------------------------

I changed the product from Suse Linux 10.0 to Suse Linux 10.1
Comment 2 Klaas Freitag 2006-05-23 08:51:28 UTC
Johannes, do you have a scanner to reproduce that?
Comment 3 Johannes Meixner 2006-05-23 09:10:56 UTC
Of course, see the initial comment: "I have an Epson Perfection 2480 Photo".
I reproduced it with Suse Linux 10.0 but not yet with 10.1.
Please wait a moment...
Comment 4 Johannes Meixner 2006-05-23 09:51:50 UTC
Tried to reproduce again with my Epson Perfection 2480 Photo
using Suse Linux 10.0 and the snapscan backend but this time it works.
I don't remember under which exact circumstrances it didn't work
when I made my initial comment.

I set it to NEEDINFO to me - hopefully I can reproduce it with 10.1
Comment 5 Metric US 2006-05-23 16:16:16 UTC
Not only Kooka but also Gwenview does not recognise the scanner.
It actually works with Iscan without a glitch.
I will try scanimage and xsane and report back.
Comment 6 Klaas Freitag 2006-05-24 07:31:38 UTC
Gwenview and Kooka both use the same code so it's not wondering that both do not work. It's a bug in libkscan.
Comment 9 Martin Pley 2008-02-09 11:39:19 UTC
A scanner of a customer also had this problem (it's a Epson Perfection V350). So I took some time to investigate why this happens. 

While stepping through the lines of kooka/libkscan I noticed that sane_get_devices from libsane doesn't return any devices at all. So I copied the lines for detection from the constructor of KScanDevice to my new, empty main.cpp. I was a little surprised that my program was able to detected the scanner. Next Step: using libkscan directly from my main.cpp: also worked. Then: Looking at the CXXFLAGS: seemed to be very similar. I was confused. I also tried some different configure switches for kooka, for instance "--disable-final" - without success.

One day later I tried "--disable-new-ldfalgs" (remembering that I also had problems with this switch a few month ago). Suddenly kooka was able to use the V350.
So this bug is actually not a bug in libkscan, but it's a linker problem.
Comment 10 Johannes Meixner 2008-10-08 05:13:02 UTC
Many thanks for the analysis!

I am no expert regarding the linker.
What I do not understand is why it failed only a few times for me.
When it is somehow wrong linked, shouldn't it never work at all?

I assume it is still present for our current product (openSUSE 11.1).
I reassign it to the kdegraphics3-scan RPM package maintainers
so that they can have a look whether or not the issue is really
present for our current product.
Comment 11 JP Rosevear 2008-10-24 19:22:21 UTC
Found https://bugs.kde.org/show_bug.cgi?id=139932 which looks to be the same thing.

Deleting ~/.kde/share/config/kookarc is a suggestion