Closed LubuntuSharp closed 4 years ago
Sorry to say, but I've never got this error, so I don't know how to debug it :(
I saw that you use 32bit and a quite old gcc
, I use gcc version 8.3.0 (Debian 8.3.0-6)
from debian stable 64bit, but also clang
works fine for me when initialised in directory build
with CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ..
, maybe worth a try ...
I do not use clang
as default, because I want to be as close as possible to the majority of other linux users compiling with gcc
, while macOSX defaults to clang
.
The line add_compile_options( -D_GLIBCXX_ASSERTIONS )
in top level CMakeLists.txt adds some range checking for C++ arrays, vectors, and strings, but there's no comparable setting for the nasty malloc/free issues.
If it really is a "freeing already free memory" bug very early in the program run, it's probably due to the USB handling, since all GUI stuff uses the STL or Qt high level language structures like vector<>, which can also fail, but their crash dump should point to their lib section (?)
You could try the latest build, I've added some robustness against race conditions regarding buffer size changes, but these issues were triggered with very fast repetitive user interactions (e.g. switching CH2 on/off/on/off...) during normal run with a visible trace on the screen.
My easy and classic "debugging" workflow was to spread printf(...)
or qDebug() << ...
lines all over the source code, you will detect a lot of them commented out.
Also uncommenting // #define DEBUG
enables the output of timestampDebug(...)
and produces a lot of info about (high level) USB communication.
What I also did to hunt down sporadic crashes was to build and debug directly from qtcreator (in top level type qtcreator CMakeLists.txt
), setting interesting variables as volatile
prevents their content from being optimised away.
Good luck :)
Solved by upgrading QT to 5.11.1 (from 5.5.1, which from what I learned had issues with memory management); btw, now I can enjoy a much more detailed image of the signal on the scope :-) So this item can be closed, Thanks a lot for your support and for this great and useful software! Regards,
Describe the bug An exception comes out (stack trace attached stacktrace.log )
To Reproduce This comes out quite quickly after startup; I tried to use valgrind to find out the cause but under valgrind the program can run for as long as half an hour without exceptions
System info:
Scope device (please complete the following information):
Additional context I run with --useGLES option