LabVIEW Error "Connection to Target Lost" after deploying code

We have been getting the error consistently the first time we try to run the code from robot main, and then after the first time trying to run the code, it will either work or show the error again. The error pops up after the code has finished uploading and we select “ok” on the deploy menu. It is consistent between our proto base from last year and our candy parade bot. Everything has been updated on both, and the candy bot has a new RIO as well. The code just runs 2 Falcon motors, so there is nothing complex that could be crashing it. We have tried changing IP addresses, remaking the code, reimaging the RIOs, and disabling realtime startup on the RIOs with no change. Occasionally after a successful deploy, the motors will stutter similarly to a race condition, but when deployed successfully it will run fine. The issues are consistent between the 2 robots, and 5 Falcons, so I don’t believe it to be robot or motor dependent (we have had a bad Falcon crash the robot before). If anyone has any ideas we would be very grateful, and if you need any info that I might have forgotten to include just ask!

I was just informed that they tried to run the motors in Phoenix Tuner last night after i had left and had intermittent issues as well, sometimes it would run fine, other times after a battery swap and a reconnect it simply wouldn’t run and rebooting the RIO and power cycling the robot wasn’t consistent in solving the issue.

have you checked Rio logs for things like high packet loss when the code does run? Have you tried different laptops? Have you tried deploying over a tether?

We have tried it on 3 separate laptops, and over USB tether but not ethernet, all resulting in the same response, I did not outright check the logs which I will do as soon as I can but I don’t remember seeing anything out of the ordinary at a glance since we have the error log and the graph log open on the driver station

the big thing is verifying that it’s not a networking issue and something weird is happening.

Also, one thing to try is clearing the compiled object cache and then doing ctrl + shift + run button which recompiles all VIs in memory, doing that fixed a lot of weird errors for my team.

That’s very useful to know thank you! The robots are currently being worked on so as soon as one is open ill check the logs and try that

Using that trick helped one of the robots so fingers crossed it works for the other when we can test on it. Thanks for the tip I didn’t know about that trick, we used the code from last year and updated it to new LabVIEW so i’m hoping that it was just that everything needed to be recompiled to prevent it from trying to call any old stuff or anything weird like that

hopefully that fix sticks, goodluck!