View Single Post
  #1   Spotlight this post!  
Unread 17-01-2017, 21:33
iterevo iterevo is offline
Registered User
FRC #0967 (Iron Lions)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Marion IA
Posts: 3
iterevo is an unknown quantity at this point
java.lang.NullPointerException

We have been trying to figure out the new CAN Talon libraries given to us this season. After looking through numerous examples, we cannot get around this error:

Code:
ERROR  1  ERROR Unhandled exception: java.lang.NullPointerException at [org.usfirst.frc.team967.robot.subsystems.DriveSubsystem.arcadeDrive(DriveSubsystem.java:27), org.usfirst.frc.team967.robot.commands.TeleOp_ArcadeDrive.execute(TeleOp_ArcadeDrive.java:23), edu.wpi.first.wpilibj.command.Command.run(Command.java:243), edu.wpi.first.wpilibj.command.Scheduler.run(Scheduler.java:206), org.usfirst.frc.team967.robot.Robot.teleopPeriodic(Robot.java:109), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:130), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:247)]  edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:249) 
 Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:249): ERROR Unhandled exception: java.lang.NullPointerException at [org.usfirst.frc.team967.robot.subsystems.DriveSubsystem.arcadeDrive(DriveSubsystem.java:27), org.usfirst.frc.team967.robot.commands.TeleOp_ArcadeDrive.execute(TeleOp_ArcadeDrive.java:23), edu.wpi.first.wpilibj.command.Command.run(Command.java:243), edu.wpi.first.wpilibj.command.Scheduler.run(Scheduler.java:206), org.usfirst.frc.team967.robot.Robot.teleopPeriodic(Robot.java:109), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:130), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:247)] 
 WARNING: Robots don't quit! 
 ---> The startCompetition() method (or methods called by it) should have handled the exception above. 
 ➔ Launching «'/usr/local/frc/JRE/bin/java' '-Djava.library.path=/usr/local/frc/lib/' '-jar' '/home/lvuser/FRCUserProgram.jar'» 
 ********** Robot program starting ********** 
 NT: server: client CONNECTED: 10.9.67.144 port 56534 
 Default IterativeRobot.robotPeriodic() method... Overload me!
Here is the link to our github to view all our code: https://github.com/FRC-IronLions-967/2017SteamWorks

The robot code will build and deploy correctly, and shows no errors. However when you enable the robot, the robot code drops out after a couple seconds and the above error appears.

Thanks,
Any help is appreciated
Team 967
Reply With Quote