Unhandled Exception when processing SideOfPier after tracking off
Issue #11
closed
Problem reported by Martin Crane which appears to be triggered particularly by SGP due to its aggressive polling strategy. The sequence of events seems to be:
- Driver was connected to the IH and started going through its initialization routine. Amongst other things, it correctly reads the firmware version 1.732.
- The last thing in that routine is to turn tracking off (
:EX0#
sent 17:38:13.5667) - SGP requested the Side of Pier (
:GSP#
sent 17:38:13.6137) - The IH emits some “axis state change” event messages -
:X00#
received twice at 17:38:13.6977 and 17:38:13.7637 - The IH emits a single
#
character that doesn’t seem to belong to any other response (received at 17:38:13.7697)
Times in the description relate to the attached log file.
The exception thrown is IndexOutOfRangeException
which is likely due to the code attempting to index into an empty string.
Comments (4)
-
reporter -
reporter - changed status to resolved
Resolved. File for alpha-testing
@mcrane can you install and test this?
-
Thanks Tim but the link doesn't allow me access to the driver file.
Could you email me the file or pop into the OneDrive folder I shared with you.
Many thanks & regards Martin
-
reporter - changed status to closed
- Log in to comment
Possible fix is to use the
DelimitedMessageStrings()
extension method instead of theTerminatedStrings()
method. The former matches start and end delimiters while the latter only matches end delimiters. This would ensure that only well-formed responses with both a header and footer are accepted.