View Single Post
  #6   Spotlight this post!  
Unread 27-01-2014, 13:07
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: CANNOT DEPLOY CODE

Quote:
Originally Posted by LFRobotics View Post
I checked the code over and everything looks fine. What else could it be?
It's not fine, since it's clearly throwing exceptions. This is the relevant part of the stack trace:
Quote:
[cRIO] java.lang.NullPointerException
[cRIO] at edu.wpi.first.wpilibj.buttons.JoystickButton.get(J oystickButton.java:36)
[cRIO] at edu.wpi.first.wpilibj.buttons.Trigger.grab(Trigger .java:45)
[cRIO] at edu.wpi.first.wpilibj.buttons.Trigger.access$000(T rigger.java:29)
[cRIO] at edu.wpi.first.wpilibj.buttons.Trigger$1.<init>(Tri gger.java:55)
[cRIO] at edu.wpi.first.wpilibj.buttons.Trigger.whenActive(T rigger.java:53)
[cRIO] at edu.wpi.first.wpilibj.buttons.Button.whenPressed(B utton.java:32)
[cRIO] at edu.wpi.first.LFRobot2014.OI.<init>(OI.java:64)
[cRIO] at edu.wpi.first.LFRobot2014.commands.CommandBase.ini t(CommandBase.java:30)
[cRIO] at edu.wpi.first.LFRobot2014.LFRobot.robotInit(LFRobo t.java:38)
So look in LFRobot.java at line 38. There will be a reference to some variable. A null pointer exception is most often thrown when you try to access an object that you haven't instantiated yet (it'll throw an error because you're trying to act on null, or nothing). Make sure your variables are created properly.

Also, what does the stuff in the Diagnostics tab say? It often provides very useful debugging info
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote