Bug 294073 - libksane in 4.8.0 and recent git stop scanning with "Invalid Arguement"
Summary: libksane in 4.8.0 and recent git stop scanning with "Invalid Arguement"
Status: RESOLVED FIXED
Alias: None
Product: libksane
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-14 14:29 UTC by Gregor Horst
Modified: 2012-02-15 20:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch - Bug 294073 - disables polling of options in KSaneWidgetPrivate::setBusy() (587 bytes, patch)
2012-02-14 14:32 UTC, Gregor Horst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Horst 2012-02-14 14:29:19 UTC
Version:           unspecified (using Devel) 
OS:                Linux

After moving from KDE 4.7.4 to 4.8.0 libksane stops scanning on my Cannon LiDE 210 shortly after a new scan or preview scan is started. Sometimes it shows an error dialog "Invalid Argument". Sometimes the same message shows up on the terminal and the GUI is blocked.

The problem seems to be the new polling mode for buttons and other stuff. With disabled polling for the time the scanner is busy, all works fine. (See attached patch)

Reproducible: Always

Steps to Reproduce:
1. Use Cannon LiDE 210 scanner
2. Start any application using libksane
3. Press the scan or preview scan button


Expected Results:  
...
Comment 1 Gregor Horst 2012-02-14 14:32:04 UTC
Created attachment 68792 [details]
Patch - Bug 294073 - disables polling of options in KSaneWidgetPrivate::setBusy()
Comment 2 Kåre Särs 2012-02-15 07:57:34 UTC
Thanks!

Please apply if you want to do it your self. I had not thought about the polling while a scan is active. I think we would be good to add a check before re-enabling the polling in setBusy() if the poll-list is empty:

    if (m_pollList.size() > 0) {
        m_optionPollTmr.start();
    }

Have you tried if the error occurs with master or 4.8 head?

That _could_ already fix part of the problem, but your patch needs to be added anyway ;)

Thanks again!

  Kåre
Comment 3 Gregor Horst 2012-02-15 08:26:29 UTC
> Please apply if you want to do it your self. 
I don't have a git-account.

The check for an empty poll-list should be added.

> Have you tried if the error occurs with master or 4.8 head?
I've tried the precompiled version of opensuse and the selfcompiled from master. The problem occured in both cases.
Comment 4 Kåre Särs 2012-02-15 08:53:32 UTC
Thanks for your patches! I'll apply them when I get home.
Comment 5 Kåre Särs 2012-02-15 20:25:33 UTC
Git commit 0a02ff4a4602f09bae25f3a8e9b971b32bbee2ca by Kåre Särs.
Committed on 15/02/2012 at 20:24.
Pushed by sars into branch 'origin/KDE/4.8'.

Apply Gregor Horst's patch to stop polling while a scan is ongoing

M  +4    -0    libksane/ksane_widget_private.cpp

http://commits.kde.org/libksane/0a02ff4a4602f09bae25f3a8e9b971b32bbee2ca