dayjaby / zebra-scanner

Read barcodes in python with zebra barcode scanner
MIT License
24 stars 18 forks source link

Segfault fix from MikaelBox #26

Closed lff5 closed 1 year ago

lff5 commented 1 year ago

Fix by MikaelBox from https://github.com/dayjaby/zebra-scanner/issues/22 issue. Tested on Raspberry Pi4 Bullseye, Python 3.9.2. pybind11 version does not matter (tested both with latest v2.10.1 and pybind11 v2.5.0) Edit: I removed scanner.dict from the code because it gave an error. So maybe pybind11 version still matters. Segfault still happens at disconnect, but its usable for my purposes now.

dayjaby commented 1 year ago

Merging this despite the potential memory leak introduced by this.