openhantek icon indicating copy to clipboard operation
openhantek copied to clipboard

crash on startup in dual-boot Linux/win7

Open suisseWalter opened this issue 6 years ago • 4 comments

I have the problem that Openhantek (2017-12 release) crashes on startup in Ubuntu 18.04. the first time I start it up there comes a windows where it shows me my device but says " upload failed" the terminal prints out:

... WROTE: 792 bytes, 10 segments, avg 79
reset CPU
2nd stage: write external memory
stop CPU
2nd stage: write on-chip memory
... WROTE: 5092 bytes, 68 segments, avg 74
reset CPU
stop CPU
can't modify CPUCS: LIBUSB_ERROR_IO 

and I can only close it. On the next start it will simply crash with the "std::runtime_error" when I replug the device the cycle starts again("upload failed")

:~$ OpenHantek 
terminate called after throwing an instance of 'std::runtime_error*'
Aborted (core dumped)

according to this post: https://github.com/OpenHantek/openhantek/issues/188 It should be fixed with the Openhantek2 branch. But I can't build/Install it. the same goes for any newer branches. another option mentioned in the Post is to change some code in the main.hh file. I changed them and then installed it again*. it didn't change anything.

because I run it my pc in a dual boot configuration I still have the Windows Hantek driver installed in windows. do I need to remove it to use Openhantek in Linux?

I'm a complete Linux newcommer therefore I don't really know how to find out more about this error. But i'm happy to try to help find the error in any way I can.

  • about the reinstall: because i am a complete noob on linux I just deleted the build directory and then went the same way as explained in the build.md file. was that correct?

Also how do I start it after the "make -j2" comand without installing it? Do I need to install it in a certain directory or is it fine the have the folder in the "~/Download" directory?

any help is really apreciated. walter

updated because I installed Ubuntu as dual boot. and gave up with virtualbox (where the problem was similar)

suisseWalter avatar Aug 06 '18 12:08 suisseWalter

I had the same problem with my 6022BL, i also dual boot, but that has nothing to do with the problem.

I solved this problem by using https://codeload.github.com/OpenHantek/openhantek/legacy.zip/master

It configures as a 6022BE, and seems to work fine (only scope not logic tested at the mo.)

edit:: should add I use Ubuntu 16.04.6 LTS. though I will test this on a 18 soon.

the steps I used..

sudo apt update && sudo apt install g++ cmake qttools5-dev qttools5-dev-tools libfftw3-dev binutils-dev libusb-1.0-0-dev libqt5opengl5-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev

open a terminal in the OpenHantek-openhantek-eb33325 folder. Then..

mkdir build cd build cmake ../ make -j sudo make install

cd openhantek

plug the scope in and run with.

./OpenHantek

good luck

Ray

RayT76 avatar Apr 11 '19 18:04 RayT76

You could try the latest version from my repo https://github.com/Ho-Ro/openhantek It has some improvements and a fully working custom FW for 6022BE and 6022BL.

Ho-Ro avatar Apr 11 '19 21:04 Ho-Ro

I may give that a go, cheers Ho-Ro

RayT76 avatar Apr 17 '19 14:04 RayT76

Hi RayT76

the steps I used.. sudo apt update && sudo apt install g++ cmake qttools5-dev qttools5-dev-tools libfftw3-dev binutils-dev libusb-1.0-0-dev libqt5opengl5-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev

open a terminal in the OpenHantek-openhantek-eb33325 folder. Then..

mkdir build cd build cmake ../ make -j sudo make install

cd openhantek

plug the scope in and run with.

./OpenHantek

For testing purpose you can omit the step sudo make install - only the udev rule must be in place (either in /etc/udev/rules.d or /lib/udev/rules.d) to enable the access rights for normal users on your computer - then you can execute the newly built file openhantek/OpenHantek. If everything works fine I would recommend to build a *.deb (as well as *.rpm and *.tar.gz) package file with sudo make package and install it via sudo apt install ./openhantek_*_amd64.deb. Or put it into ~/bin (this works at least on debian systems, create the directory if it doesn't exist already) if you want to test the new version only for yourself.

Have fun!

Ho-Ro avatar Apr 17 '19 19:04 Ho-Ro