Crash on Histogram request

Just goofin’ around, selected the histogram option over a portion of my file, and Joulescope UI crashed. Must be specific data points, because I brought it up again and kept trying to reproduce in the same general area, and could not.

Log file attached. Data file is too big to attach (~8MB), but I have it saved if you need me to PM it.

joulescope_20200326_124917_53000.log (860.5 KB)

1 Like

Hi @wired and thanks for posting the log. The crash is due to a stack overflow when the Joulecope UI plugin is processing the data. One of your previous log files, I think from when you exported a JLS from a JLS file you were viewing, had the same crash. I created Issue #67, and will investigate.

Hi @wired - I have identified and fixed this issue in the develop branch with this commit. This fix also significantly reduces the time needed to run these tools with downsampled data.

Here are the details:

The downsampled data is still being processed in 1 second chunks.
With long data collections, this means lots of chunks that are
processed quickly. The code updated the progress bar with each
chunk, and sometimes the QT event thread did not run before it
received far too many events which eventually caused the crash.

The solution is to use real wall time to limit the number of
progress updates. The new code updates every 100 ms, which
is plenty fast for a status bar.

Another potential issue was with GIL violation. The code used
QThread rather than python threads. I am unclear as to whether
this would respect the GIL. Regardless, we now use python
threads and manually specify QueuedConnection for all events.