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
868 stars 153 forks source link

crash on upgrade from 3.1.3 to unstable 202001109 #128

Closed vizkoze closed 4 years ago

vizkoze commented 4 years ago

Describe the bug Updating on ubuntu budgie 20.04 with dpkg -i over existing install crashes the program.

To Reproduce IMPORTANT: Always unplug and replug the scope if used before with a different application, e.g. sigrok or the original Hantek software. Did it several times

Steps to reproduce the behavior:

  1. '.download latest openhantek_20200930-16a52e8_amd64.deb file form github.'
  2. sudo dpkg -i openhantek_20200930-16a52e8_amd64.deb
  3. open program, crash on program Downgrade to latest stable version restores program in working state. (I always update over existing install and worked in the past)

Expected behavior No crash on update

Screenshots If applicable, add screenshots or a video to help explain your problem.

Computer environment (please complete the following information):

Scope device (please complete the following information):

Additional context When starting from commandline this error appears: qt5ct: using qt5ct plugin qt5ct: D-Bus global menu: no /usr/include/c++/7/bits/stl_vector.h:815: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::const_reference = const double&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. Aborted (core dumped)

Ho-Ro commented 4 years ago

Thx for reporting! Please delete the config file and try again. Or even better, select trigger source CH1 or CH2 (without smooth) in stable and upgrade again. I will also check accordingly.

vizkoze commented 4 years ago

I tried closing the stable program with trigger source to CH1 (without smooth) and upgrading but that crashed the program like before. Renaming the config file to OpenHantek6022.conf.backup and restarting the program fixed the issue. (didn't have to reinstall the latest unstable version. A new configfile was generated with default settings. Would you like a copy of my old config file to see what could be wrong? I guess re-applying all my settings will be the next thing to do. edit: Did some digging around and my old configfile stipulates: trigger\smooth=false while the new configfile changes trigger\smooth=0 or 1 or 2 (HF, normal, LF) i guess that could be the problem

Ho-Ro commented 4 years ago

Yes, that was an incompatible change - I did implement a config file version value long time ago but forgot to increment its value :(

// increment this value after incompatible config changes
#define CONFIG_VERSION 1

A new unstable will come soon - stay tuned!