Skip to content
This repository has been archived by the owner on Aug 21, 2021. It is now read-only.

The port `' does not exist. #4

Open
delp opened this issue Feb 18, 2018 · 1 comment
Open

The port `' does not exist. #4

delp opened this issue Feb 18, 2018 · 1 comment

Comments

@delp
Copy link

delp commented Feb 18, 2018

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
Copy link
Author

delp commented Feb 18, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant