![]() |
Unexpected Error when Running Robot Code
Hello,
After trying to clean up my code utilizing an IO class with static instances of all my objects, I am running into a few problems. When I upload the robot code and enable, I get this error in the driver station: Code:
ERROR Unhandled exception: java.lang.ExceptionInInitializerError at [org.usfirst.frc.team4159.robot.IO.<clinit>(IO.java:15), org.usfirst.frc.team4159.robot.Robot.teleopInit(Robot.java:58), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:142), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:234)]Code:
package org.usfirst.frc.team4159.robot;Is there something I am doing wrong here? All the people I am asking are saying that it looks fine. Thanks in advance! |
Re: Unexpected Error when Running Robot Code
Below the stack trace for the ExceptionInInitalizerError you should find another stack trace which will tell you the real error. There should be a line that had "caused by:" or something like that in it.
Posting that, along with the code for OctoDrive, would help. It looks like there is something wrong in the OctoDrive constructor. |
Re: Unexpected Error when Running Robot Code
We actually figured out the problem with our IO class, which was something that could was not indicated in the stacktrace error. The static blocks were not running properly when we wanted to, so we made a quick fix...
Code:
private static DriveWheels wheelSet = new DriveWheels(0, 1, 2, 3); //Drivetrain DeclarationsThanks for your help! |
| All times are GMT -5. The time now is 10:26. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi