Java code - No robot code crash

In the last few days weve come across this error while deploying our code (java):
We are using 2910 swerve as our drive base (modules and code).

some notes related to the issue:

  • We cant see any device on the phoenix tuner
  • While disabling the said subsystem the robot is fine.
  • We checked wiring (using multimeter on each end) and its checks out fine. moreover, the wiring hasnt changed since the last time the code worked for us.
  • As far as we know a canbus device that isnt connected shouldnt crash the robot.
  • Our drive system has worked in the past and “suddenly” this started to happen.

We are using falcon 500 with ctre mag encoders in our swerveDrive.
We would appreciate if somone has any idea to the cause of the issue or further tests that we should run.

love, team 7039 :smiley:

Is your code on github (or similar) where we can see it? This will happen in the library when the devices that are specified can’t be found.

Not being able to see anything in Phoenix Tuner is a red flag. You probably have issues with your can bus. I would recommend hooking up just a couple of devices and incrementally expanding that to find any issues.

Weve actually just now figured out the encoder that is the reason to the crash,
when we change it in the code to build the module with a different encoder id everything is fine and we can even see all the devices on the tuner.
Is it possible that the encoder is faulty and it crashes the code?

Unfortunately this is not the case with the SDS library, as seen from the above stack trace. I disagree with this design decision, but to change it you’ll need to modify the library.

Didn’t know that, thank you.
That means for whatever reason the encoder is faulty → we cant init it which leads to the code crashing.
This could happen with motors as well?
And one more thing, if we disconnect talon/spark etc. We get a warning on the DS instead of crashing and rio boot fine. Is that a correct statement?

The 1.1.0 release appears to now report an error to the DS rather then throw an exception.

2 Likes