View Single Post
  #8   Spotlight this post!  
Unread 27-01-2014, 13:57
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

Then keep going up the stack trace. See how the next item is in CommandBase.java line 30. Then after that, OI.java line 64 (I stand corrected, Ian above me got the right file first).

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)
But anyway, the stack trace you see tells you where the exception occurred and the chain of current method calls. Read some more about them. So in your example, the exception was encountered in JoystickButton.java line 36 (the top element in the trace), which was being called from Trigger.java line 45, which was called from the same file, line 59, etc. You follow the trace down until you find the first one of your files (in this case, OI.java) and check the line given.
__________________
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