View Single Post
  Spotlight this post!  
Unread 24-01-2014, 19:52
ianlo ianlo is offline
Ian Lo
FRC #0610
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Toronto
Posts: 1
ianlo is an unknown quantity at this point
Re: CANNOT DEPLOY CODE

Hi LFRobotics,
The key here is the java.lang.NullPointerException that the program prints out in your new code. What the NullPointerException means is that you're using a variable that hasn't been initialized yet or if you're trying to get something that doesn't exist. In this case, a button seems to be the issue. Looking back through the stack trace of the error, it seems to occur at edu.wpi.first.LFRobot2014.OI.<init>(OI.java:64). I would look through your OI file and check line 64. That is the line where it runs into an error. You'll notice that the NullPointerException segment of the output doesn't occur in your "Old code" as well so something that was changed on that line isn't quite working properly.

I can't speak directly to what the issue is since I've only used Joystick.getRawButton() rather than Button.whenPressed(), but I think it's likely that your Button hasn't been initialized properly.

Ian
Reply With Quote