Closed ericfont closed 3 years ago
My initial theory is that upon switching, the Histogram isn't immediately created internally, and so then if a GLScope::paintEvent is triggered by the OS before the Histogram is created, then there is a risk that line 550 of glscope.cpp is called to drawHistogramChannelGraph, since the scope->histogram condition is true even though the vaoHistogram vector is empty.
See https://github.com/OpenHantek/OpenHantek6022/pull/241 for a simple fix.
Describe the bug Crash (assert failure in stl operator[]
__glibcxx_requires_subscript
) in GLScope::drawHistogramChannelGraph Histogram mode when switching between T-Y and X-Y view a few times.To Reproduce Steps to reproduce the behavior:
note that
channel
parameter is1
, however the graph.vaoHistogram array is empty. So it tries to access an array in memory which it shouldn't be allowed to.Expected behavior Should be able to switch between X-Y and Y-X mode if the program allows me too. Either that or program should prohibit histogram mode or disable it when switching.
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 This bug happens on main branch from before my last PR, so my PR wasn't at fault.