fastVR-sdk icon indicating copy to clipboard operation
fastVR-sdk copied to clipboard

The port `' does not exist.

Open delp opened this issue 7 years ago • 1 comments

User reported runtime error:

OS: Windows 10 Board: Arduino Mega 2560

**Two errors in Unity
**IOException: The port `' does not exist.
System.IO.Ports.WinSerialStream.ReportIOError (System.String optional_arg)
System.IO.Ports.WinSerialStream..ctor (System.String port_name, Int32 baud_rate, Int32 data_bits, Parity parity, StopBits sb, Boolean dtr_enable, Boolean rts_enable, Handshake hs, Int32 read_timeout, Int32 write_timeout, Int32 read_buffer_size, Int32 write_buffer_size)
(wrapper remoting-invoke-with-check) System.IO.Ports.WinSerialStream:.ctor (string,int,int,System.IO.Ports.Parity,System.IO.Ports.StopBits,bool,bool,System.IO.Ports.Handshake,int,int,int,int)
System.IO.Ports.SerialPort.Open ()
(wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:Open ()
wrmhlThread.openFlow () (at Assets/fastVR-sdk/Scripts/WRMHL/Thread/Common/wrmhlThread.cs:74)
wrmhl.connect () (at Assets/fastVR-sdk/Scripts/WRMHL/Manager/wrmhl.cs:53)
Relativ_player.Start () (at Assets/fastVR-sdk/Scripts/Relativ_player.cs:44)
-------------------------------------------------------------------------------------------------------------
NullReferenceException: Object reference not set to an instance of an object
wrmhlThread.readQueueThread () (at Assets/fastVR-sdk/Scripts/WRMHL/Thread/Common/wrmhlThread.cs:94)
wrmhl.readQueue () (at Assets/fastVR-sdk/Scripts/WRMHL/Manager/wrmhl.cs:66)
Relativ_player.Update () (at Assets/fastVR-sdk/Scripts/Relativ_player.cs:49)****

delp avatar Feb 18 '18 21:02 delp

Relativ_setup.getPort() Is failing to return a meaningful port it seems. (String empty?)

This kind of runtime error is going to be hard to diagnose unless we implement some kind of logging for the project.

Meaning, open some simple text file, to which meaningful functions write their status to that file, explaining their current status, values of important variables, if errors were encountered...etc.

For C#, it looks like System.Diagnostics.Trace would be useful here? Not very familiar w/ the language

delp avatar Feb 18 '18 21:02 delp