We are not able to deploy code to the roborio. Our visual studio code is version 1.84.0 Our Roborio has the 2024_v2.1 (which I think is the most up to date?) Code built no errors, but I got the following error in the driver station log which I don’t understand:
Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:380): 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:387): The startCompetition() method (or methods called by it) should have handled the exception above.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb6e8ffc0, pid=4362, tid=4366
#
# JRE version: OpenJDK Runtime Environment (17.0.9.7) (build 17.0.9.7-frc+0-2024-17.0.9u7-1)
# Java VM: OpenJDK Client VM (17.0.9.7-frc+0-2024-17.0.9u7-1, mixed mode, emulated-client, serial gc, linux-arm)
# Problematic frame:
# C [libc.so.6+0x6bfc0]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid4362.log
I understand that, and I read the page on WPILib on reading stack traces, and I’m not sure where the “RobotBase.runRobot(RobotBase.jav)” file would be in my code. Also the code built but I couldn’t deploy it. It worked on the 2023 version as well, and I had to change some SparkMAX declarations when I updated to 2024…. I will post the code tomorrow and see if that helps. I thought the error was in either updating our WPIlib or imaging the RIO.
A link to your code would help, yes, but what you pasted above didn’t have the lines above that line, which will point to where in your code is throwing the exception.
Ahh, I have a CAN device error on a SPARKMAX, but I’m not sure where I’ve created a second instance of it. I did try an if-then statement with a beam break that we’ve added to this code for our test board. Here is a link to our code:
You only posted your source files, not the whole project, so it’s a lot harder for someone to help. For example, your build.gradle and vendordeps you are using aren’t available with just the source.
You also didn’t provide the full stack trace, so we’re left to guess what it means that you have a CAN device error.
I don’t see anything obviously wrong, but maybe I would if there was more information.