segfault when testing hp scanjet 5550c scanner hardware
When I run the make test_hw
command, I get a segfault (see backtrace bellow). The error is triggered by the sane_control_option call
My setup:
- GNU/Debian Sid
- libsane 1.0.27
- the scanner (hp scanjet 5550c) is connected to my router and accessed through the
net
backend - output of
scanimage -A
:
All options specific to device `net:192.168.1.1:hp5590:libusb:004:002':
-l 0..215.889mm (in steps of 0.0999908) [0]
Top-left x position of scan area.
-t 0..297.699mm (in steps of 0.0999908) [0]
Top-left y position of scan area.
-x 0..215.889mm (in steps of 0.0999908) [215.889]
Width of scan-area.
-y 0..297.699mm (in steps of 0.0999908) [297.699]
Height of scan-area.
--mode Color|Gray|Lineart [Lineart]
Selects the scan mode (e.g., lineart, monochrome, or color).
--source Flatbed|ADF|ADF Duplex [Flatbed]
Selects the scan source (such as a document-feeder).
--resolution 100|200|300|600|1200|2400dpi [100]
Sets the resolution of the scanned image.
--extend-lamp-timeout[=(yes|no)] [no]
Extends lamp timeout (from 15 minutes to 1 hour)
--wait-for-button[=(yes|no)] [no]
Waits for button before scanning
--preview[=(yes|no)] [no]
Request a preview-quality scan.
Backtrace obtained by commenting out lines 20-21 of the test_hw.py
file:
$ make test_hw
rm -rf test_hw_out
. ./activate_test_env.sh && subprojects/libinsane-gobject/tests/test_hw.py test_hw_out
make[1] : on entre dans le répertoire « /home/thomas/code/openpaperwork/upstream/libinsane »
(cd build && ninja)
ninja: no work to do.
make[1] : on quitte le répertoire « /home/thomas/code/openpaperwork/upstream/libinsane »
Will write the scan result into test_hw_out/
debug: ../subprojects/libinsane-gobject/src/libinsane-api.c:L81(libinsane_api_init): Initializing
debug: ../subprojects/libinsane-gobject/src/libinsane-api.c:L100(libinsane_api_new_safebet): enter
info: ../subprojects/libinsane/src/safebet.c:L152(lis_safebet): Initializing base implementations ...
info: ../subprojects/libinsane/src/safebet.c:L188(lis_safebet): 1 base implementations initialized
info: ../subprojects/libinsane/src/safebet.c:L190(lis_safebet): Initializing workarounds & normalizers ...
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_WORKAROUND_CHECK_CAPABILITIES=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_SOURCE_NODES=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_MIN_ONE_SOURCE=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_ALL_OPTS_ON_ALL_SOURCES=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_SOURCE_NAMES=1
debug: ../subprojects/libinsane/src/normalizers/source_names.c:L123(compile_regexes): Compiling regexes ...
debug: ../subprojects/libinsane/src/normalizers/source_names.c:L142(compile_regexes): Regexes compiled successfully
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_OPT_ALIASES=0
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_WORKAROUND_OPT_VALUES=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_WORKAROUND_OPT_NAMES=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_BMP2RAW=0
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_RAW24=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_RESOLUTION=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_SOURCE_TYPES=1
debug: ../subprojects/libinsane/src/normalizers/source_types.c:L34(compile_regexes): Compiling regexes ...
debug: ../subprojects/libinsane/src/normalizers/source_types.c:L53(compile_regexes): Regexes compiled successfully
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_WORKAROUND_ONE_PAGE_FLATBED=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_CLEAN_DEV_DESCS=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_NORMALIZER_SAFE_DEFAULTS=1
info: ../subprojects/libinsane/src/safebet.c:L194(lis_safebet): LIBINSANE_WORKAROUND_DEDICATED_THREAD=1
info: ../subprojects/libinsane/src/safebet.c:L206(lis_safebet): 14 workarounds & normalizers initialized
debug: ../subprojects/libinsane-gobject/src/libinsane-api.c:L111(libinsane_api_new_safebet): leave
Looking for devices ...
Looking for scan devices ...
debug: ../subprojects/libinsane-gobject/src/libinsane-api.c:L175(libinsane_api_list_devices): enter
info: ../subprojects/libinsane-gobject/src/libinsane-api.c:L175(libinsane_api_list_devices): enter
debug: ../subprojects/libinsane/src/multiplexer.c:L128(lis_multi_list_devices): Getting devices from API 0
debug: ../subprojects/libinsane/src/bases/sane.c:L191(ensure_sane_is_init): sane_init() ...
debug: ../subprojects/libinsane/src/bases/sane.c:L193(ensure_sane_is_init): sane_init(): 0x0, Success
info: ../subprojects/libinsane/src/bases/sane.c:L201(ensure_sane_is_init): Sane version code: 0x100001B
debug: ../subprojects/libinsane/src/bases/sane.c:L300(lis_sane_list_devices): sane_get_devices() ...
debug: ../subprojects/libinsane/src/bases/sane.c:L302(lis_sane_list_devices): sane_get_devices(): 0x0, Success
debug: ../subprojects/libinsane/src/multiplexer.c:L138(lis_multi_list_devices): Got 1 devices from API 0
debug: ../subprojects/libinsane-gobject/src/device_descriptor.c:L56(libinsane_device_descriptor_new_from_libinsane): [gobject] enter
debug: ../subprojects/libinsane-gobject/src/device_descriptor.c:L46(libinsane_device_descriptor_init): [gobject] Initializing
debug: ../subprojects/libinsane-gobject/src/device_descriptor.c:L67(libinsane_device_descriptor_new_from_libinsane): [gobject] leave
debug: ../subprojects/libinsane-gobject/src/libinsane-api.c:L201(libinsane_api_list_devices): leave
Found 1 devices
[sane:net:192.168.1.1:hp5590:libusb:004:002] : [HP 4500C/5550C (Workgroup scanner ; sane:net:192.168.1.1:hp5590:libusb:004:002)]
debug: ../subprojects/libinsane-gobject/src/device_descriptor.c:L26(libinsane_device_descriptor_finalize): [gobject] Finalizing
Will use device sane:net:192.168.1.1:hp5590:libusb:004:002
debug: ../subprojects/libinsane-gobject/src/libinsane-api.c:L217(libinsane_api_get_device): enter
debug: ../subprojects/libinsane/src/bases/sane.c:L371(lis_sane_get_device): sane_open() ...
debug: ../subprojects/libinsane/src/bases/sane.c:L373(lis_sane_get_device): sane_open(): 0x0, Success
debug: ../subprojects/libinsane/src/normalizers/source_names.c:L170(item_filter): Source 'net:192.168.1.1:hp5590:libusb:004:002': root -> no name normalization
debug: ../subprojects/libinsane/src/normalizers/source_types.c:L84(item_filter): Item 'net:192.168.1.1:hp5590:libusb:004:002': root -> type = LIS_ITEM_DEVICE
debug: ../subprojects/libinsane/src/normalizers/safe_defaults.c:L230(item_filter): normalizers_safe_defaults->item_filter(): Getting options for item 'net:192.168.1.1:hp5590:libusb:004:002' (1)...
debug: ../subprojects/libinsane/src/bases/sane.c:L796(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_control_option(NUMBER OF OPTIONS): 11
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(1) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->tl-x(1) (Top-left x, Top-left x position of scan area.)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(2) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->tl-y(2) (Top-left y, Top-left y position of scan area.)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(3) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->br-x(3) (Bottom-right x, Bottom-right x position of scan area.)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(4) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->br-y(4) (Bottom-right y, Bottom-right y position of scan area.)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(5) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->mode(5) (Scan mode, Selects the scan mode (e.g., lineart, monochrome, or color).)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(6) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->source(6) (Scan source, Selects the scan source (such as a document-feeder).)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(7) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->resolution(7) (Scan resolution, Sets the resolution of the scanned image.)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(8) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->extend-lamp-timeout(8) (Extend lamp timeout, Extends lamp timeout (from 15 minutes to 1 hour))
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(9) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->wait-for-button(9) (Wait for button, Waits for button before scanning)
debug: ../subprojects/libinsane/src/bases/sane.c:L810(lis_sane_item_get_options): net:192.168.1.1:hp5590:libusb:004:002->sane_get_option_descriptor(10) ...
debug: ../subprojects/libinsane/src/bases/sane.c:L825(lis_sane_item_get_options): Option: net:192.168.1.1:hp5590:libusb:004:002->preview(10) (Preview, Request a preview-quality scan.)
debug: ../subprojects/libinsane/src/workarounds/opt_values.c:L77(get_opt_mapping): Mapping found for option 'mode'
debug: ../subprojects/libinsane/src/workarounds/opt_values.c:L77(get_opt_mapping): Mapping found for option 'mode'
debug: ../subprojects/libinsane/src/workarounds/opt_values.c:L77(get_opt_mapping): Mapping found for option 'mode'
debug: ../subprojects/libinsane/src/workarounds/opt_values.c:L77(get_opt_mapping): Mapping found for option 'source'
debug: ../subprojects/libinsane/src/workarounds/opt_values.c:L77(get_opt_mapping): Mapping found for option 'source'
debug: ../subprojects/libinsane/src/workarounds/opt_values.c:L77(get_opt_mapping): Mapping found for option 'source'
info: ../subprojects/libinsane/src/normalizers/resolution.c:L187(opt_desc_filter): No change to do on option 'resolution'
info: ../subprojects/libinsane/src/normalizers/safe_defaults.c:L98(set_str): Setting option 'mode' to 'Color'
debug: ../subprojects/libinsane/src/bases/sane.c:L1025(lis_sane_opt_set_value): net:192.168.1.1:hp5590:libusb:004:002->mode->sane_control_option(SET_VALUE) ...
Segmentation fault
make: *** [Makefile:47: test_hw] Error 139