Closed merrik closed 2 years ago
Thank you for your concise bug report.
I was able to locate the epsonscan2 source code, and will have a look at it. From the description of your device on the Epson site however it seems the device has a wireless option, so you can use it wirelessly from your Mac with Epson's MacOS drivers.
If you omit the debug option when running airsaned, does the segfault still happen?
Thanks for a quick response! Let me know if I can provide you anything useful.
Yes, I turned on debug because airsane crashed when I tried to scan anything over network.
It has wireless option but that's not convenient
I had a look at the code that initializes the "transfer-format" option in epsonscan2 but could not identify any irregularities. If you comment out the code that writes options to the log, in sanecpp/sanecpp.cpp line 507, do you still get a segfault?
Looking at the epsonscan2 source code again, I found that the "transfer-format" option is handled as a boolean value when initialized but treated as a string value afterwards. I'm not sure how that would result in a segfault when reading the value from AirSane, but it may well explain your problem. In that case, the fix from my last post would be appropriate (comment out line 507 in sanecpp/sanecpp.cpp, recompile, and install).
Thanks! Commented out line 507 and scanning from webpage works perfectly now
As for mac os standard utility, preview is fine but when I press start scan, it fails, calls exit and finally crashes
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:08:55 +0300] "GET /eSCL/ScannerStatus" 200 2600 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
document format requested: image/jpeg
document format used: image/png
using color gamma of 0.555555
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:08:55 +0300] "POST /eSCL/ScanJobs" 201 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:08:55 +0300] "GET /eSCL/ScannerStatus" 200 3031 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
sane_init(nullptr, nullptr)
sane_open(epsonscan2:L3150 Series:esci2:usb:ES016E:4419) -> 0x7f909803c030
[mode] := "Color"
[source] := "Flatbed" -> reload options
[resolution] := 600dpi -> reload options
[tl-x] := 0mm
[tl-y] := 1mm
[br-x] := 210mm
[br-y] := 297mm
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:09:56 +0300] "GET /eSCL/ScannerStatus" 200 3043 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:09:56 +0300] "GET /eSCL/ScanJobs/730e2bc0-075b-53e2-acea-3ef91c474a1e/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
...
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:38 +0300] "GET /eSCL/ScanJobs/730e2bc0-075b-53e2-acea-3ef91c474a1e/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
sane_cancel(0x7f909803c030)
sane_close(0x7f909803c030)
sane_open(epsonscan2:L3150 Series:esci2:usb:ES016E:4419) -> SANE_Status Error during device I/O
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:38 +0300] "GET /eSCL/ScanJobs/730e2bc0-075b-53e2-acea-3ef91c474a1e/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:39 +0300] "GET /eSCL/ScanJobs/730e2bc0-075b-53e2-acea-3ef91c474a1e/NextDocument" 404 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:39 +0300] "GET /eSCL/ScannerStatus" 200 3052 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:39 +0300] "GET /eSCL/ScannerStatus" 200 3052 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:39 +0300] "DELETE /eSCL/ScanJobs/730e2bc0-075b-53e2-acea-3ef91c474a1e" 200 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:20:10:39 +0300] "GET /eSCL/ScannerStatus" 200 3052 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
sane_exit()
sane_cancel(0)
Segmentation fault
It is rather strange that the web interface works but Apple's AirScanScanner does not. It might be that AirScanScanner uses incompatible scan settings, though I would expect an invalid parameter error then, rather than an I/O error.
Anyway, I modified AirSane such that the reported segfault should not occur any more.
Thank you a lot for your help!
I tried different scanning options, airsane crashes when scan called from apple's utility with the following options: colored and 600dpi colored and 1200dpi b&w and 1200 dpi Same options work just fine from web interface
Maybe there is a difference in bit depth between the web interface, and Apple AirScanScanner?
How can I check that? Looks like airsane crashes after image was successfully scanned and during result retrieving. Can that be related to file size?
I was referring to the "Number of Colors/Grays" setting in Apple Image Capture.
AirSane does not buffer the entire image, rather it sends scanline per scanline as obtained from SANE. If your scanner finishes scanning before AirSane is doing anything, this will be true to the epsonscan2 backend buffering the image internally.
Interesting, I don't have an options 'Number of colors" in AIC. But I tried scanning with same options but just a small part of an image and it went fine. But when I changed selection to the whole page the result was the same crash
...
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:33 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:34 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:34 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:35 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:35 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:36 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:36 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:37 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
sane_cancel(0x7f7e9c022700)
sane_close(0x7f7e9c022700)
sane_open(epsonscan2:L3150 Series:esci2:usb:ES016E:4419) -> SANE_Status Error during device I/O
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:37 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 503 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:38 +0300] "GET /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b/NextDocument" 404 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:38 +0300] "GET /eSCL/ScannerStatus" 200 2614 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:38 +0300] "GET /eSCL/ScannerStatus" 200 2614 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:38 +0300] "DELETE /eSCL/ScanJobs/e8376a2c-c9b8-51b7-89a4-794b73d91f6b" 200 0 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
[fe80::cf0:c3f2:f3c4:9ae7] - - [31/Oct/2020:23:25:38 +0300] "GET /eSCL/ScannerStatus" 200 2614 "" "AirScanScanner/58CFNetwork/1206Darwin/20.1.0"
Interesting, I don't have an options 'Number of colors" in AIC.
The option is a drop-down menu at the second position from top.
Judging from implementation of the "transfer-format" option, the epsonscan2 backend is definitely buggy. This may adversely affect your AirSane experience. I have not heard from similar experiences with AirSane, so I have no further suggestions to make, sorry.
I have Epson L3150 scanner and I struggle to make it network shared. I can use scanimage to scan manually but couldn't get AirSane working because of Segmentation fault. Scanner is discoverable and web interface returns valid options. I managed to access scanner with SwingSane, scan starts but images are empty.
scanimage
works perfectly fineLooks like sane's backends do not support epsonscan2 at all?
sudo -u saned scanimage -d 'epsonscan2:L3150 Series:esci2:usb:ES016E:4419' -A
returns