Paperwork crashes on scanning, I/O Error in Libinsane

Good evening,

after installing Paperwork on a different laptop, also running Arch Linux, it starts well, I can import existing png or jpg files, but I can’t scan. It starts the scan, but the live preview stays a blank page until the whole program crashes.

I startet paperwork from the commandline in order to get the error message. This seems to be the relevant part:

[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/bases/sane.c:L520(lis_sane_item_get_scan_parameters): brother4:net1;dev0->sane_get_parameters() returned: format=1, height=2322, width=1648, bytes_per_line=4944, depth=8
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/bases/sane.c:L550(lis_sane_item_get_scan_parameters): Image format: 0
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/bases/sane.c:L551(lis_sane_item_get_scan_parameters): Image WxH: 1648x2322
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/bases/sane.c:L552(lis_sane_item_get_scan_parameters): Image size: 11479968
[INFO ] [paperwork_gtk.mainwindow.docview.scanview] Scan size: 1648x2322
[INFO ] [paperwork_gtk.mainwindow.docview] Going to page 0 (nb pages=1)
[INFO ] [paperwork_gtk.mainwindow.docview] Going to page 0 (nb pages=1)
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] ======== PID 65840 - SEGMENTATION FAULT ========
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] ======== START OF BACKTRACE ========
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca40b00]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa5a125c710]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/sane/[0x7fa58de25fba]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/sane/[0x7fa58de24d62]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/sane/[0x7fa58de1408c]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/sane/[0x7fa58de1c6c4]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca45264]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca324e2]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca436eb]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca4754f]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca47ade]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59ca3fbb1]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa59f5cb7a8]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa5a11524f6]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa5a114ef5e]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] /usr/lib/[0x7fa5a1151b73]
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] ======== END OF BACKTRACE ========
read() failed: fd=10, r=0, got=0, expected=8; 0, Erfolg[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/workarounds/dedicated_process/protocol.c:L315(lis_protocol_log_read): poll() failed on fd 0-12: 0x10
[ERROR ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/workarounds/dedicated_process/master.c:L317(remote_call): session_scan_read() failed: 0x40000006, I/O Error
[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/workarounds/dedicated_process/protocol.c:L315(lis_protocol_log_read): poll() failed on fd 1-14: 0x10
write() failed: fd=9, w=-1, written=8, expected=0; 32, Datenübergabe unterbrochen (broken pipe)[INFO ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/workarounds/dedicated_process/master.c:L197(log_thread): Stopping log thread because: 0x40000006, I/O Error
[ERROR ] [paperwork_backend.docscan.libinsane] [LibInsane] …/libinsane-1.0.10/subprojects/libinsane/src/workarounds/dedicated_process/master.c:L306(remote_call): scan_session_cancel() failed: 0x40000006, I/O Error
Speicherzugriffsfehler (Speicherabzug geschrieben)

Details concerning my system:

ti@flipdelle:~$ uname -a
Linux flipdelle 6.6.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 11 Dec 2023 11:48:23 +0000 x86_64 GNU/Linux
ti@flipdelle:~$ pacman -Q paperwork
paperwork 2.2.1-2

What can I do to solve the problem?

Thanks + best regards,


Does it work with other applications like simple-scan for instance ?

Best regards,

I can scan any document with xsane and then import it with paperwork. But on my other PC, I didn’t have to do it in two steps with two different programs, I could just launch paperwork and do the scan there.

Here is what I have installed for the scanner:

ti@flipdelle:~$ trizen -Qs sane
local/brscan4 0.4.11_1-2
SANE drivers from Brother for compatible models
local/libinsane 1.0.10-1
Library to access scanners
local/sane 1.2.1-5
Scanner Access Now Easy
local/xsane 0.999-6
A GTK-based X11 frontend for SANE and plugin for Gimp.

Best regards


Can you try setting the environment variable export LIBINSANE_WORKAROUND_DEDICATED_PROCESS=0, restart Paperwork and retry please ?

Best regards,

Thank you for your suggestion.
I pasted

into the command line and then startet


with the same result - it crashed upon scanning a document. The scanner did something and when I expected the live preview to show the top third of the page, the program disappeared.

Here is the output on the commandline:

PrivateBin: STOUT of paperwork-gtk

Any ideas?

Best regards

If you look in ~/.local/share/paperwork2/openpaperwork/logs/, you should have more detailed logs than those you got on stderr. Those logs should include C stacktraces at the end. Can you send me those logs please ? (either by email or here, as you prefer).

Thank you for your answer. I found the logs and sent them to you by mail. But I didn’t find any stacktraces in them (nor do I know what to do with them). Hopefully you find what you need.