Log in

View Full Version : Problem uploading code


Jtbillick
14-03-2015, 10:33
When I upload my program to the practice bot, I am getting an error and I'm not sure how to fix it. This is my first year programming so any tips would be appreciated. This is the error in the Riolog:
➔ Launching «'/usr/local/frc/JRE/bin/java' '-jar' '/home/lvuser/FRCUserProgram.jar'»
➔ Launching «'/usr/local/frc/JRE/bin/java' '-jar' '/home/lvuser/FRCUserProgram.jar'»
ERROR Unhandled exception: java.lang.IllegalArgumentException: Subsystem must not be null. at [edu.wpi.first.wpilibj.command.Command.requires(Com mand.java:173), org.usfirst.frc.team4780.robot.commands.Elevate.<init>(Elevate.java:28), org.usfirst.frc.team4780.robot.commands.ElevateUp.<init>(ElevateUp.java:15), org.usfirst.frc.team4780.robot.OI.<init>(OI.java:59), org.usfirst.frc.team4780.robot.Robot.robotInit(Rob ot.java:38), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:76), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:234)]ERROR Unhandled exception: java.lang.IllegalArgumentException: Subsystem must not be null. at [edu.wpi.first.wpilibj.command.Command.requires(Com mand.java:173), org.usfirst.frc.team4780.robot.commands.Elevate.<init>(Elevate.java:28), org.usfirst.frc.team4780.robot.commands.ElevateUp.<init>(ElevateUp.java:15), org.usfirst.frc.team4780.robot.OI.<init>(OI.java:59), org.usfirst.frc.team4780.robot.Robot.robotInit(Rob ot.java:38), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:76), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:234)]

WARNING: Robots don't quit!
---> The startCompetition() method (or methods called by it) should have handled the exception above.
WARNING: Robots don't quit!
---> The startCompetition() method (or methods called by it) should have handled the exception above.

notmattlythgoe
14-03-2015, 10:36
Please post your Robot class. Make sure to use code tags.

legts
14-03-2015, 11:57
I have gotten this exact type of error before. Where it is naming a specific file and line (ex Elevate.java:28) it means there is an error in the file Elevate.java at line 28. You have to go through the error log and check the errors to see which lines in which files have errors. Then you need to fix them. PM me if you need more help.

Jtbillick
14-03-2015, 23:02
thanks for the help. I fixed this issue by going into Robot.java and putting the elevator object before OI.