I have a Brother MFC-J895DW printer/scanner combo. It has a document feeder so it can scan a stack of pages (but not duplex). Because SimpleScan only receives the first page of the stack, I'm instead creating a bash script with scanadf
to automate the scanning.
Problem:
A segfault occurs as soon as scanadf
has completed scanning the stack of pages and correctly(!) stored them on disk. It does not seem to have any impact on my result, but the crash is ugly in my script.
Here is the essential command (taken from this related post):
output_file=/tmp/scan_"$scantimestamp"".pnm"
scanadf -x 210mm -y 297mm --resolution 100 -o "$output_file"_%04d
Here is the console output after correctly scanning 2 pages:
scanadf: rounded value of br-x from 210 to 209.981
scanadf: rounded value of br-y from 297 to 296.973
Scanned document /tmp/scan_20200114-101601.pnm_0001
Scanned document /tmp/scan_20200114-101601.pnm_0002
Scanned 2 pages
/home/torben/scan.sh: line 11: 28240 Segmentation fault (core dumped) scanadf -x 210mm -y 297mm --resolution 100 -o "$output_file"_%04d
I could probably ignore this (2>/dev/null
) but instead I want to understand it. Any ideas?