Thread 1 "insaned" received signal SIGSEGV, Segmentation fault.
0x00007ffff3d89d70 in std::_Function_handler<void (), genesys::StaticInit<std::vector<genesys::Genesys_USB_Device_Entry, std::allocator<genesys::Genesys_USB_Device_Entry> > >::init<>()::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /usr/lib/sane/libsane-genesys.so.1
(gdb) bt
#0 0x00007ffff3d89d70 in std::_Function_handler<void (), genesys::StaticInit<std::vector<genesys::Genesys_USB_Device_Entry, std::allocator<genesys::Genesys_USB_Device_Entry> > >::init<>()::{lambda()#1}>::_M_invoke(std::_Any_data const&) () from /usr/lib/sane/libsane-genesys.so.1
#1 0x00007ffff3d76645 in genesys::run_functions_at_backend_exit() () from /usr/lib/sane/libsane-genesys.so.1
#2 0x00007ffff3d03bb6 in genesys::sane_exit_impl() () from /usr/lib/sane/libsane-genesys.so.1
#3 0x00007ffff3d03bf7 in sane_genesys_exit () from /usr/lib/sane/libsane-genesys.so.1
#4 0x00007ffff7f9641e in sane_dll_exit () from /usr/lib/libsane.so.1
#5 0x000055555555a7a4 in InsaneDaemon::~InsaneDaemon (this=0x55555556a760 <InsaneDaemon::mInstance>, __in_chrg=<optimized out>) at src/InsaneDaemon.cpp:61
#6 0x00007ffff7ac8db7 in __run_exit_handlers () from /usr/lib/libc.so.6
#7 0x00007ffff7ac8f5e in exit () from /usr/lib/libc.so.6
#8 0x00007ffff7ab1159 in __libc_start_main () from /usr/lib/libc.so.6
#9 0x000055555555762e in _start ()
So I modified the function like this, no idea if this is correct though:
Hi...
When no scanner is attached, there is a segfault happening here: https://github.com/abusenius/insaned/blob/5a74d858d8e36a1bd337eaace01d82d9c64c573d/src/InsaneDaemon.cpp#L61
Backtrace:
So I modified the function like this, no idea if this is correct though: