OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
867 stars 152 forks source link

crash on device disconnect #339

Closed hramrach closed 1 year ago

hramrach commented 1 year ago

Describe the bug crash when device is disconnected.

To Reproduce Run OpenHantek, plug in device, wait for data display, unplug device.

Expected behavior No crash - clean shutdown or wait for device reconnect.

Screenshots

OpenHantek6022 (3.3.1)
Graphic: 4.2 (Compatibility Profile) Mesa 22.2.4 - GLSL version 1.20
bulkReadMulti: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "Input/Output Error"
controlWrite: Getting sample data failed:  "No such device (it may have been disconnected)"
OpenHantek6022 controlWrite: stop sampling failed:  "No such device (it may have been disconnected)"
controlWrite: stop sampling failed:  "No such device (it may have been disconnected)"
has stopped after 2 s
malloc(): unaligned tcache chunk detected
Aborted (core dumped)

Computer environment (please complete the following information):

Scope device (please complete the following information):

Ho-Ro commented 1 year ago

WONTFIX Please check #337

hramrach commented 1 year ago

It potentially uses up disk space when it crashes rather than exiting cleanly.

Ho-Ro commented 1 year ago

Please elaborate.

hramrach commented 1 year ago

Aborted (core dumped)

That means the core is stored somewhere.

Ho-Ro commented 1 year ago

Ok, understood. Debian does not dump the core, so there should also be a solution for openSUSE.

hramrach commented 1 year ago

The universal solution is for the program to not crash in the first place.

Ho-Ro commented 1 year ago

The best solution would be to keep the USB connection untouched. If you cannot ensure this, either do not use the program or modify it according to your needs. EOD