vedderb / bldc-tool

A Qt program to control and debug my BLDC-controller
247 stars 220 forks source link

[windows] bldc-tool hangs after reboot or firmware upload #9

Open pabloxid opened 8 years ago

pabloxid commented 8 years ago

Using bldc-tool under Windows, every time I upload new firmware to the board, the program freezes. It also happens when pressing "reboot" button. Whenever USB device is shutted off while the connection with bldc-tool was established, then bldc-tool hangs.

vedderb commented 8 years ago

This is not the case under Linux, where the error from the serial port is reported properly on disconnect so that the port can be closed. I don't have any windows computer and I never use windows, so I have never used or tested the windows build of bldc tool. Maybe someone who has windows and some qt experience can help out here.

pabloxid commented 8 years ago

I did some research on this. Apparently, qt under Windows has problems with USB virtual serial ports. When an error occurs, the handler MainWindow::serialPortError() tries to make a mSerialPort->close() but that generates a new error, and the program goes into an infinite loop. If I comment out that line, the program fails to connect again, but don't freezes.

2016-01-22 4:49 GMT-02:00 Benjamin Vedder notifications@github.com:

This is not the case under Linux, where the error from the serial port is reported properly on disconnect so that the port can be closed. I don't have any windows computer and I never use windows, so I have never used or tested the windows build of bldc tool. Maybe someone who has windows and some qt experience can help out here.

— Reply to this email directly or view it on GitHub https://github.com/vedderb/bldc-tool/issues/9#issuecomment-173827365.