qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

QZ Tray "freezes" after sending data through serial connection #170

Closed klabarge closed 8 years ago

klabarge commented 8 years ago

Tested on Windows 10, QZ Tray 1.9.6

The "Send Port Cmd" function on the demo page seems to (for lack of a better word) "freeze" QZ Tray.

Steps:

  1. Select a serial port and click Open Port
  2. Click Send Port Cmd (hit allow access 4 times)
  3. Select Close Port or other functions such as "Use Default Printer"
    • Observe activity in the console with no errors, but clicking these buttons does not result in the expected anonymous request dialogue
  4. Reload the page
    • The serial port that was opened is still open. Using "Close Port" does not properly close the connection. QZ Tray must be restarted to successfully release this connection.
    • Additionally, data cannot be sent to the serial port until QZ Tray is restarted.
tresf commented 8 years ago

Reproduced, but only with the com0com virtual serial port driver.

When I plugged in my USB->Serial adapter, this didn't occur. I believe com0com is hanging the software at port.readBytes(...) which should timeout after 1.5 seconds, but instead hangs QZ Tray about 75% of the time (this didn't happen the first time for me for some reason).

Since this bug only affects the com0com driver currently, I'm closing as wont-fix. If this crops back up with a real serial device, please feel free to reopen this bug report. :+1:

It is my instinct that this bug will surface when testing 2.0 branch when testing against com0com as well so as long as it's getting stuck on a blocking action such as port.readBytes(...). We may have to alter our testing methods/drivers to accommodate.