No Robot Code

Yesterday morning everything with our robot code was working fine, then it stopped working. The RoboRIO is giving us a red Comm light which means it is connected but there is no robot code. We tried replacing the RoboRio, but that didn’t work. I re-imaged the RoboRIO, re-uploaded the correct java 8 version, and all the firmware is up to date. Robot code builds and deploys successfully by the DS still says no code. I tried commenting out autonomous, camera, gyro and smarthDashboard code but came to no success. I also searched online and tried the joystick in port 5 trick and all my eclipse is up to date but still no Robot code. I also tired creating a small one motor command-based robot project but that did not work either. Additionally I tried editing the build properties themselves but to no avail. The only thing that seems to work and I get a green light for is the getting-started default code. I wanna be able to get my complex code up and running ASAP.

This was happening to us, and I finally figured out our problem, maybe this can help you.

First, if you are not seeing the console output, use the rioLog plugin

We saw these messages:
ž” Launching «’/usr/local/frc/JRE/bin/java’ ‘-jar’ '/home/lvuser/FRCUserProgram.jar’»
Error at edu.wpi.first.wpilibj.RobotBase.main( ERROR Unhandled exception instantiating robot org.usfirst.frc.team192.robot.Robot java.lang.ClassNotFoundException: org.usfirst.frc.team192.robot.Robot at$,$, Method),, java.lang.ClassLoader.loadClass(, sun.misc.Launcher$AppClassLoader.loadClass(, java.lang.ClassLoader.loadClass(

This was a clue for us, because 192 was our prototype robot. Even though the package for our final robot was 191, I forgot to change it in the file, which looks like this:

Project specific information

#Uncomment and point at user libraries to include them in the build. Do not put libraries in the \wpilib\java folder, this folder is completely overwritten on plugin update.

I changed the 192 to 191 and voila, robot code.

I am betting that you are getting a runtime exception that is crashing your program; this results in “No Robot Code” on the Driver Station. In the Riolog (in Eclipse), is there an error message that prints? If so, try reading the stack trace that you see there and find the error. If you don’t find an error in the Riolog or have trouble locating the problem after reading the stack trace, can you post your code? It will help us help you.