roboRio Comm lost Resetting VI: DS UI.vi

I’m having a weird problem with our Java code. We’ve coded a simple robot with an Arms class. Our program errors out on a method that includes a wait() statement. However the wait() statement should not be called as we’ve commented out the method call in the teleopPeriodic(). Plus it was being called by hitting button 8 on the joystick, which we did not do.

Debug on driverstation shows that the buttons work correctly.

After the program crashes we have a window show up on the desktop stating “Resetting VI: DS UL.vi”. We can not close this window. We have no communications to the roborio. Rebooting the roborio does not bring communications back.

We are on win 8.1. 64 bit.

Any suggestions would be welcome.

Thanks

I can duplicate the robot crashing with wait due to throwing an IllegalMonitorStateException, but not the DS.

In iterative (or command) your code shouldn’t be calling a wait or Timer.delay unless it’s in it’s own thread. Otherwise it will block communication with the DS. Use a state machine instead.

It’s hard to speculate why your wait code is being called without seeing the code.

Thank you;

We did finally figure out to use a timer and timer.delay() instead. I do not remember if the last roboRio Comm lost Resetting VI: DS UI.vi occurred before we made that change though.