You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just spent 6 hours debugging why my serial device was no longer working. There were constant IO exceptions getting thrown, which were triggered by this line:
Which is stated as "(almost impossible to run into)", and even though stepping through in the debugger shows the ReadTimout as 5000 and not equaling SerialPort.InfiniteTimeout, the if condition is still passing, thus resulting in the exception, thus causing this lib to disconnect.
Moving to 1.1.2 makes the problem go away as it doesn't use BaseStream.ReadAsync.
The text was updated successfully, but these errors were encountered:
Part of what took so long was thinking it might be a hardware issue. Strangely, it worked fine on my desktop (seemingly, it wasn't immediately failing anyways), but fails on a Surface Pro 7.
I just spent 6 hours debugging why my serial device was no longer working. There were constant IO exceptions getting thrown, which were triggered by this line:
https://github.com/dotnet/runtime/blob/be6100ed084ced3b5803a6b998c112b85c1a6f64/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs#L899
Which is stated as "(almost impossible to run into)", and even though stepping through in the debugger shows the
ReadTimout
as 5000 and not equalingSerialPort.InfiniteTimeout
, the if condition is still passing, thus resulting in the exception, thus causing this lib to disconnect.Moving to 1.1.2 makes the problem go away as it doesn't use
BaseStream.ReadAsync
.The text was updated successfully, but these errors were encountered: