[C++] Eclipse deploying errors (FrcUserProgram) FIXED

Hello everyone. Im a programer for the team 2080. I keep running into an error when I try to deploy my code to roborio. We ran across this problem before, and we made a new project and it seemed to fix it. But thats not the case anymore.

It has something to do with the: FRCUSERPROGRAM file.

We have tried:

  • Reimaging the roborio.
  • Re writing our code.
  • Switching Workspaces.
  • Updating Eclipse
  • Reinstalling Plugins

Anyways. Its really frustrating because this same issue keeps coming up somehow.

Here is what the console says when I Deploy:

Trying to override old definition of task classloader
[echo] Trying Target: roboRIO-2080.local
[echo] roboRIO found via mDNS
[echo] roboRIO image version validated
[sshexec] Connecting to roboRIO-2080.local:22
[sshexec] cmd : rm /home/lvuser/FRCUserProgram
[sshexec] rm: can’t remove ‘/home/lvuser/FRCUserProgram’: No such file or directory
[sshexec] Remote command failed with exit status 1
[echo] [athena-deploy] Copying code over.
[scp] Connecting to roboRIO-2080.local:22
[scp] done.
[sshexec] Connecting to roboRIO-2080.local:22
[sshexec] cmd : killall netconsole-host
[sshexec] killall: netconsole-host: no process killed
[sshexec] Remote command failed with exit status 1
[scp] Connecting to roboRIO-2080.local:22
[scp] done.
[scp] Connecting to roboRIO-2080.local:22
[scp] done.
[echo] [athena-deploy] Starting program.
[sshexec] Connecting to roboRIO-2080.local:22
[sshexec] cmd : . /etc/profile.d/natinst-path.sh; chmod a+x /home/lvuser/FRCUserProgram; /usr/local/frc/bin/frcKillRobot.sh -t -r;
[sshexec] no process in pidfile ‘/var/run/natinst/FRC_UserProgram.pid’ found; none killed
Total time: 13 seconds

**Any help will be greatly appreciated! **

Looks to me like it is working fine (the key is the “BUILD SUCCESSFUL” down at the bottom–individual steps may mention errors, but some of those don’t actually need to succeed). Have you tried actually enabling and running the code from the driver’s station?

The issue is. That sometimes it will build & it will run in the driver station with the error in place.

Other times it doesn’t. It will say that it deploys, but when you go to the driver station it will say “No Robot Code”. It just makes the whole process so much more complicated with this error.

Like I said in OP. We came across this error before, and we fixed it somehow. But now its showing up again, and we would like to figure out how to fix it permanently. I appreciate your input!

We kept getting this error for the longest of times and I think the problem was us being silly with pointers. I’m not saying that’s the case with you, but it could very well be a problem with your code.

One of the tricky things about FRC programming is that the “no robot code” indicator is sometimes a misnomer. I would say it is highly likely that your code deployed and ran … and crashed. I have seen this many times with my students.

What to do? RIO_LOG - is your friend… You should have a tab at the bottom area in Eclipse which is rio_log. Select it, clear it, and then re-deploy - and watch what happens. You will likely get useful information about the crash.

What if that doesn’t work? Use the DEBUGGER - Screensteps will take you through it step by step, but the basic concept is instead of “run-as -> Deploy” you’ll instead use “Debug-As -> Deploy” and after a few gyrations in trying to get it running the first time (I remember there being some popup dialogs and seemingly errors the first couple times), then the gdb debugger will run your program and if you’re crashing, it’ll break right where the crash is occurring. It’s very cool. :slight_smile:

Good luck and let us know!


Thanks for your response Bob! We have looked at the rio_logs before and really couldn’t find any useful information to guide us how to fix this issue. Or maybe I just dont know how to interpret it right.

We have tried debugging it many times, and that doesn’t fix the problem either.

**On the other hand. This seemed to fix our issue. At the top of our code(under the robot class), we had this line: **

double Distance = enc.GetDistance();

Because we thought we had to have this included to get the encoder distance for our lift system.

But after we removed it. We no longer had any errors relating to the FrcUserProgram.

Im not really sure why this fixed our problem. We occasionally still get the error “Remote command failed with exit status 1”

But the code deploys right. So we simply just ignore it. Thanks for everyones input! We greatly appreciate it!

i managed to fix this, i just opened an example program, opened it on the workspace on the file manager, grabbed the FrcUserProgram from the folder debug, and pasted it on the debug folder of the project i wanted to fix, then i restarted eclipse

We actually did that before. We made a copy of a fresh FrcUserProgram from the example code like you said, and pasted it into our original project. It fixed the issue, but a few days later it popped up again. We actually fixed the issue for now if you read the post before yours. Thanks for your help!

I think your enc.GetDistance() was likely executed BEFORE RobotInit() if it was part of the class definition or otherwise misplaced. Make sure your code that utilizes WPILib classes does not execute before RobotInit(). I think it’s safe to ‘new’ class objects in the constructor of your Robot(), but making calls like GetDistance can’t be done before RobotInit() because there are other initialization items that WPI does which happen behind the scenes.