Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-flatbed does not work in installed version #35

Closed
jab11 opened this issue Apr 8, 2021 · 6 comments
Closed

-flatbed does not work in installed version #35

jab11 opened this issue Apr 8, 2021 · 6 comments
Assignees

Comments

@jab11
Copy link

jab11 commented Apr 8, 2021

my scanner is Brother MFC-L2730DW series
I'm running scanline -batch -flatbed docs but I'm getting an error:

Searching for available scanners
Waiting up to 10.0 seconds to find scanners
Found scanner: Brother MFC-L2730DW series
Opening session with scanner
didOpenSessionWithError: [no error]
deviceDidBecomeReady
didSelectFunctionalUnit:  error: [no error]
Configuring scanner
Configuring Flatbed
Starting scan...
didEncounterError: An error occurred during scanning.
Failed to scan document.
Done

scanning from the document feeder works fine.

I downloaded the xcode project and ran the same command and that seems to work fine with -flatbed, is there a difference from the installed version ?

@jab11
Copy link
Author

jab11 commented Apr 16, 2021

more info:
running the project from xcode works with -flatbed
exporting the project and running from commandline fails when using -flatbed, but works without it

@KaarlisCaune
Copy link

I'm using Epson V370 (no document feeder), and experiencing the same issue.

  • Running in xcode with -flatbed works
  • Running exported build with -flatbed errors with didEncounterError: An error occurred during scanning. Failed to scan document.

@klep
Copy link
Owner

klep commented Jul 30, 2021

@KaarlisCaune , when you say "exported build", do you mean a build that you made in XCode? Or the pre-built binary in git?

@klep
Copy link
Owner

klep commented Aug 14, 2021

Quick update -- I was able to repro this issue using the .dmg image linked in the README. Not sure yet if that binary is from a bad build or if it's something else. In the interim, please make a build from Xcode and grab the generated binary instead of using what's linked from the README

@klep klep pinned this issue Aug 14, 2021
@klep klep self-assigned this Aug 14, 2021
@klep
Copy link
Owner

klep commented Aug 14, 2021

Looks like this is a difference between what happens when checking non-optionals for nil in Debug vs. Release builds. The didSelect functionalUnit delegate method can give you a non-optional that's nil (which is a API bug) but in Release, checking it against nil will always return false (an optimization I suppose since it never should be nil). I've got a fix coming that instead checks its address against 0x0.

@klep
Copy link
Owner

klep commented Aug 14, 2021

@klep klep closed this as completed Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants