ThierryHFR / scangearmp2

This project is a sane backend for the canon's scanner, based on the source code of scangearmp2.
Other
78 stars 17 forks source link

scangearmp2 crashes on openSuse #16

Closed rhabacker closed 5 years ago

rhabacker commented 5 years ago

Running compiled scangearmp2 from this git repo on openSUSE 13.2 crashes with the following backtrace.

Program received signal SIGSEGV, Segmentation fault.

0 0x00007ffff4b1e294 in pthread_mutex_lock () from /lib64/libpthread.so.0

1 0x00007ffff557d0ec in ?? () from /usr/lib64/libusb-1.0.so.0

2 0x00007ffff5583d88 in ?? () from /usr/lib64/libusb-1.0.so.0

3 0x00007ffff55841cf in ?? () from /usr/lib64/libusb-1.0.so.0

4 0x00007ffff557d2fb in libusb_get_device_list () from /usr/lib64/libusb-1.0.so.0

5 0x00000000004081c8 in cmt_libusb_init () at canon_mfp_tools.c:399

6 0x0000000000406dc6 in CIJSC_init (cnnl_callback=cnnl_callback@entry=0x0) at canon_mfp_io.c:462

7 0x00000000004065bc in main (argc=1, argv=0x7fffffffdc68) at main.c:203

rhabacker commented 5 years ago

The reason for the crash is that when calling libusb_get_device_list() at https://github.com/Ordissimo/scangearmp2/blob/master/scangearmp2/src/canon_mfp_tools.c#L397 the predefined usb context g_context is not used.

ThierryHFR commented 5 years ago

Nice work