wpilibsuite / ntcore

NetworkTables Core Library (ARCHIVED, merged into allwpilib)
Other
39 stars 28 forks source link

NetworkTables Desktop Client and WPILib Desktop Simulation #280

Closed jonathandao0 closed 4 years ago

jonathandao0 commented 5 years ago

Trying to get a desktop client working with the 2019 desktop simulator and I get the following error message:

NT: ERROR: could not resolve roboRIO-4201-FRC.frc-field.local address (TCPConnector.cpp:99)
NT: ERROR: could not resolve roboRIO-4201-FRC.lan address (TCPConnector.cpp:99)
NT: client: DS overriding server IP to 127.0.0.1
NT: connect() to 10.42.1.2 port 1735 timed out
NT: connect() to 172.22.11.2 port 1735 timed out
NT: client: CONNECTED to server 127.0.0.1 port 1735
NT: ERROR: could not resolve roboRIO-4201-FRC.local address (TCPConnector.cpp:99)

Is it supposed to work with desktop simulation? Or was this use case not added in yet?

Simulating using the gradle simulateJava task on WPILIb version 2019.4.1 with the following simulation dependency:

simulation "edu.wpi.first.halsim:halsim_ds_socket:${wpi.wpilibVersion}:${wpi.platforms.desktop}@zip"

Desktop client uses ntcore 2019.4.1

jonathandao0 commented 4 years ago

Found my issue. My program was just crashing due to a null pointer to a instance of a NetworkTable variable right after this, but it wasn't printing the null pointer exception even tough it wasn't in a try/catch (?), so I couldn't really see the problem until I took a second look.