[Resolved]"Code: -1029. HAL: Resource already allocated" but resource is not duplicated else where in code

So issue that our team is having is that on line 38 of our Drive.java subsystem (which is used for shifters of our Drive train) is causing a “Code: -1029. HAL: Resource already allocated” error.

We have looked at other threads about this error and its solution is to find a duplication of a assigned PWM or Motor controller.

But…

We have looked through our code and could not find any duplication of of our Shifters DoubleSolenoid anywhere else in the code.

We don’t know what we should do now.

Help.

Main GitHub Page for our code this year
Drive.java subsystem that is causing problems

Entire error response :

ERROR 1 Unhandled exception instantiating robot edu.wpi.first.hal.SolenoidJNI edu.wpi.first.hal.util.UncleanStatusException: Code: -1029. HAL: Resource already allocated frc.robot.subsystems.Drive.(Drive.java:45)

1 Like

Your Climber subsystem is creating solenoids on the same ports (1 and 2) as your drive subsystem. That’s why.

:man_facepalming: Thanks