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
858 stars 152 forks source link

Fixes #363, refs #365. Splitted HorizontalDock::timebaseChanged handler. #372

Closed nseam closed 1 year ago

nseam commented 1 year ago

Windows 11-targeted fix as it probably works on other platforms.

Splitted HorizontalDock::timebaseChanged event handler from doing operations on dsoControl and dsoWidget in the same callback. Now there are two callback and each uses the QWidget it operates on.

Now we can change horizontal time-base:

image

image

image

Without the fix we encounter such issue:

image

Ho-Ro commented 1 year ago

A big thank you to @nseam! I checked this issue so many times but didn't see the wood for the trees. Your easy solution is highly appreciated! Please check also if the win binary from the latest unstable release is working correctly. It is built with the MinGW compiler suite while your setup uses MSVC++ - but it shouldn't make such a difference.

nseam commented 1 year ago

I've checked the binaries and it is no longer crashing, yippie!

I knew that is has something to do with accessing widget that was not a part of connect()'s target. Looks like Qt stops other threads from writing only to connect()'s target's QWidget, so we need to split event handlers if wants to write to other widgets.

I will later (just for test) try to pass parent widget as the target to connect() so, if Qt locks all the widget's hierarchy down, will allow us to access both widgets in the same handler. I will get back with info if that worked.

Thanks @Ho-Ro for maintaining the software! My 6022 just arrived so I will try the software in this evening!

Just a note: when I was clicking all the buttons in Demo mode some exception occurred, but didn't yet found which one did that. However, if something will error, I will try to fix it and make a PR.

I'm also curious how many people uses this software :-)

Ho-Ro commented 1 year ago

I'm also curious how many people uses this software :-)

Some statistics

GitHub release (latest by date) GitHub Release Date Downloads of latest release

Distribution across the individual OSs:

OpenHantek/OpenHantek6022/releases/latest                       updated   dl
openhantek-3.3.2.2-1.armv7l.rpm                    2023-03-08T17:52:22Z   95
openhantek-3.3.2.2-1.x86_64.rpm                    2023-03-08T17:36:51Z  239
openhantek_3.3.2.2-1_armv7l.tar.gz                 2023-03-08T17:52:29Z   55
openhantek_3.3.2.2-1_freebsd_amd64.tar.gz          2023-03-08T17:52:03Z   19
openhantek_3.3.2.2-1_osx_x86_64.dmg                2023-03-08T17:39:27Z  293
openhantek_3.3.2.2-1_osx_x86_64.tar.gz             2023-03-08T17:39:28Z   42
openhantek_3.3.2.2-1_win_x64.zip                   2023-03-08T17:37:52Z 1913
openhantek_3.3.2.2-1_x86_64.tar.gz                 2023-03-08T17:36:51Z  201
openhantek_3.3.2.2_amd64.deb                       2023-03-08T17:36:51Z  901
openhantek_3.3.2.2_armhf.deb                       2023-03-08T17:52:36Z  167