2024 CANSparkMax causing program to crash

Ever since updating our software and device firmware to 2024 our code has been crashing on startup. We have narrowed the crash to initializing a CANSparkMax Object. Whenever we create a CANSparkMax Object our code does not run. We have tried re-updating the CANSparkMax firmware and the 2024 software. The robot code light in the drivers station will turn green if we never create a CANSparkMax but a robot without the ability to move would not be very useful. We would appreciate any ideas on how to fix our problem.

If the code is crashing, you should get some kind of output. Check the log viewer built into the driver station app (gear on top left of message window), or RioLog (automatically opens in vscode when you deploy code).

If you need help interpreting the output, please share it here.

We have been getting two outputs one that says “java terminate called without an active exception” and then right before that is says that the CANSparkMax firmware is too old even though the CANSparkMax is updated to the latest firmware.

if i remember correctly, when you firmware update spark maxes, they cannot be powered from the PDP/PDH, only through the usbc cable. it could be possible that the spark maxes havent been updated properly

Thanks. We’ll try that during our next meeting

We have updated each motor controller individually via the USBC cable but the program is still reporting that the firmware is too old.

We found a solution there was a firmware version that was on github but was not on the website.

When asking for help with things and talking about versions, please be sure to mention specific version numbers. If you say “latest”, that could mean a number of things depending on context. Specifically, the firmware versions are downloaded through the REV Hardware Client. If you have an outdated version on there and aren’t connected to the internet, it could easily say you have the latest because it doesn’t know any better. Using specific version numbers would prompt someone else to comment “version 123 is out of date, I have version 234”.

Also, I’m curious what version you found on github (and which github…)

1 Like

we found version 24.0.1 on this github

That gets installed with RHC 1.6.3. What version of the RHC did you have? It should prompt you to update when opening it if you’re on an older version. It will also show updated firmware versions on the downloads tab if newer versions are available. There shouldn’t be any reason to manually download firmware files from anyway.

We had the latest version of the hardware client (1.6.3) but it kept telling us that the latest version of the firmware was 1.6.3, When we installed it on the motor controllers it did not work and the link that the hardware client gave us also said that the latest version was 1.6.3. Our controllers work now with the 24.0.1 version.