Can't run sim with advantege kit

We are trying to sim our code with AdvantageKit but we started having problems 2 days ago. The code builds but when we try to simulate it, the sim just flashes up and then crashes with this error:

HAL Extensions: Attempting to load: halsim_gui
Simulator GUI Initializing.
Simulator GUI Initialized!
HAL Extensions: Successfully loaded extension
HAL Extensions: Attempting to load: halsim_ds_socket
DriverStationSocket Initializing.
DriverStationSocket Initialized!
HAL Extensions: Successfully loaded extension
********** Robot program starting **********
NT: Listening on NT3 port 1735, NT4 port 5810
Error at frc.robot.Subsystems.gyro.Gyro.(Gyro.java:15): Unhandled exception: java.lang.Error: Unresolved compilation problems:
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type
GyroIOInputsAutoLogged cannot be resolved to a type

    at frc.robot.Subsystems.gyro.Gyro.<init>(Gyro.java:15)
    at frc.robot.RobotContainer.<init>(RobotContainer.java:98)
    at frc.robot.Robot.robotInit(Robot.java:94)
    at org.littletonrobotics.junction.LoggedRobot.startCompetition(LoggedRobot.java:79)
    at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:365)
    at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$0(RobotBase.java:433)
    at java.base/java.lang.Thread.run(Thread.java:833)

Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:379): The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See Reading Stacktraces — FIRST Robotics Competition documentation for more information.
Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:386): The startCompetition() method (or methods called by it) should have handled the exception above.

We have tried updaring VSCode and all the libraries but nothing seems to work. The problem only happens on one of our programming computers, not all of them. We have tried replacing the local repo but that has not fixed the issue.

Does anyone have any ideas what the cause may be or how we can fix it?

Being able to see your code would help. Hard to diagnose a stack trace without being able to see the line that’s causing the issue, especially with something like AdvantageKit that can throw incorrect “cannot be resolved to a type” when it’s something else in your code that’s not quite working.

Is your gyro reading a Rotation2d object? If so, have you initialized it? If not, it may be a null and would crash the code as a result.

https://github.com/DoF-6413/Crescendo/tree/Dev this is our github,thanks for your help

I built it on my end and it works perfectly fine, is this the same code that you’re running?

yes it is, for some reason it stops doing that in other computers,I try to do it with the same laptop yesterday and today and the error just stop showing up for some reason that idk. but thanks for your help

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.