GUI lock up - lots going on in log file

I have had the software open for a few days and was using it to check current earlier in the day, left the software running as usual and went again to check the current and the GUI had locked up. Had a quick look in the log file and looks like there’s a few things going on but the last thing in the log is that a firmware update failed. Just posting for feedback as I wouldn’t know where to start to try and reproduce.joulescope_20191115_010735_15692.log (252.4 KB)

1 Like

Hi @haly-tom - Thank you for posting this log file. I have two things to investigate:

  • On abnormal communications, is all memory freed correctly, especially the StreamBuffer?
  • Are the Joulescope firmware update conditions correctly checked in all error cases?

Here are the details from the log file:

At a few points in time, your computer has trouble keeping up with Joulescope’s data stream (times in UTC):

2019-11-18 09:38:25,209 to 2019-11-18 10:25:25, recovers.

2019-11-18 14:13:20 to 2019-11-18 14:15:32, which eventually causes Joulescope communication to error out, disconnect, and reconnect. The logs do not indicate the root cause, only what happened.

2019-11-18 14:30:57 to 2019-11-18 14:36:14 - more dropped samples
2019-11-18 14:42:02 to :2019-11-18 14:42:02 - more dropped samples
2019-11-19 09:22:23 to 2019-11-19 09:22:23 - more dropped samples
2019-11-19 10:30:47 to 2019-11-19 10:31:21 - more dropped samples
2019-11-19 11:16:53 to 2019-11-19 11:33:50 - more dropped samples
2019-11-19 12:11:28 to 2019-11-19 12:57:47 - more dropped samples

However, the real excitement begins on line 1096:

WARNING:2019-11-19 14:18:28,041:device.py:326:joulescope.usb.winusb.device:WinUsb_AbortPipe pipe_id 130: [995] The I/O operation has been aborted because of either a thread exit or an application request.

Your computer lost communication with Joulescope, errored out and attempts to reconnect. However, during reconnect, the software runs out of RAM while trying to allocate a new StreamBuffer on line 1155:

Traceback (most recent call last):
File “joulescope_ui\main.py”, line 677, in _device_open
File “site-packages\joulescope\driver.py”, line 342, in open
File “joulescope\stream_buffer.pyx”, line 863, in joulescope.stream_buffer.StreamBuffer.cinit
MemoryError

The software diligently keeps trying again and again. Eventually in this mess, the communication also errors out, seemingly causing an attempted firmware update on line 2895:

INFO:2019-11-19 14:20:17,812:device_thread.py:130:joulescope.usb.device_thread:DeviceThread.post(control_transfer_in) when thread not running
ERROR:2019-11-19 14:20:17,819:main.py:684:joulescope_ui.main:firmware update failed

Using Joulescope UI 0.6.8, I was able to deliberately interrupt Joulescope communications, and observed that the Joulescope UI did not reclaim all memory when it resumes. This behavior effectively results in a memory leak, which explains the crash that you observed. I created Issue #31 and will investigate.

1 Like

This was fixed in 0.7.0. Upgrade now!