Quote:
Originally Posted by LFRobotics
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