> public SerialPort ComPort; > public scan1 oScan; > > oScan = new scan1(); > > ComPort = new SerialPort(port, baud); > > ComPort.Parity = Parity.None; > ComPort.StopBits = StopBits.One; > ComPort.DataBits = 8; > ComPort.Handshake = Handshake.None; > ComPort.DataReceived += OnSerialDataReceived; > > public void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args) > { > > string data = this.ComPort.ReadExisting(); > > oScan.updateScan(data); > > } >Which line in OnSerialDataReceived throws an exception? If it is the ReadExisting line then it appears that the only thing that can throw an exception is if the serial port is closed. What does the updateScan scan method do?