I had a completely working, fully-debugged PyQt5 application which 1) accepted streaming real-time data from a USB peripheral, 2) allowed data recording and 3) saved recorded data to disk. I’m running on top of Ubuntu Linux 17.10.
This application is now broken. The Linux operating system is not connecting to the USB peripheral dependably. Kernel updates may be involved. The problem is complicated, and I discuss it here if you are interested in the details. I’m trying to fix this problem. In the mean time, I need to collect data from the device.
My original application allowed full-duplex communications over the USB. So in the original application, when I wanted to open a QFileDialog to save data to disk, I first issued a command to instruct the peripheral to stop transmitting. It has been a long time since I wrote this program and I don’t remember whether this was truly necessary to avoid a crash, it just seemed like a smart thing to do.
When the OS fails to cooperate, I can no longer do this. I only have half-duplex communication. The peripheral must start automatically and must keep running.
My program works as before, right up to the point where I save data. I open the QFileDialog, I name the file and save it. The file actually does save to disk, but after that the segmentation fault occurs.
I am trying to devise a work-around for this situation. Any suggestions are appreciated! Thanks.