D
David
Can someone please advise me how I can track down where the error that
causes the following error message to appear is located in my code
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
The error occurs when I am testing port settings by selecting a valid serial
port then invalid port then valid port again.
The code handling this port selection writes to a log each time the port is
attempted to be opened. I suspect that the StreamWriter CLOSE method takes
time and the routine is being called again before the file is physically
closed on the disk.
Could this be an issue ? If so, w\how would I test the file is closed before
the code continues
Whether this is the actual issue in this instance, is there a way I can find
out which object is being refrred to in the error dialog ?
Thanks in advance
causes the following error message to appear is located in my code
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
The error occurs when I am testing port settings by selecting a valid serial
port then invalid port then valid port again.
The code handling this port selection writes to a log each time the port is
attempted to be opened. I suspect that the StreamWriter CLOSE method takes
time and the routine is being called again before the file is physically
closed on the disk.
Could this be an issue ? If so, w\how would I test the file is closed before
the code continues
Whether this is the actual issue in this instance, is there a way I can find
out which object is being refrred to in the error dialog ?
Thanks in advance