We’re using code based on the CTRE Swerve Example by jasondaming, our Swerve and PathPlanner code is the same as in the example. Starting yesterday, whenever we try to deploy the robot code, it quits unexpectedly. As far as we can tell, the main problem message is:
Unhandled exception: java.lang.RuntimeException: Cannot invoke “com.pathplanner.lib.path.PathPlannerPath.getEventMarkers()” because “this.originalPath” is null
Then, at the end of the log, it says the Java Runtime Environment detected a fatal error.
a fatal error has been detected by the Java Runtime Environment: #SIGSEGV (0xb) at pc=0xb6e6cfc0, pid=2831, tid=2835 #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]
I’ve never run into this error before, as far as I can tell via Google it’s usually a response to something trying to access things it can’t, but I don’t even know how we could accidentally write something that overreaches that far. The entire error log is here, I don’t know what to do from here. Any help would be really appreciated, we can revert to an old version of our code but I’d rather get this problem solved if possible.
The JVM crash at the end is vestigial. There is a bug in the Java runtime on the rio where when an exception occurs that shuts down the JVM it crashes the JVM while attempting to shut down.
The actual error in your code is the exception.
Unhandled exception: java.lang.RuntimeException: Cannot invoke “com.pathplanner.lib.path.PathPlannerPath.getEventMarkers()” because “this.originalPath” is null
You’re calling a function on originalPath() somewhere that is null. The full stack trace will show you where.
Theres also a 2nd exception happening in your code.
java.io.FileNotFoundException: /home/lvuser/deploy/pathplanner/paths/Example Path.path (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/java.io.FileReader.<init>(Unknown Source)
at com.pathplanner.lib.path.PathPlannerPath.fromPathFile(PathPlannerPath.java:288)
Both of these are either code issues on your side, or in the case of the 2nd one a missing file that is expected. Are you sure that file is getting deployed.
Ok thank you, we don’t have a file of that name, which I didn’t think would be an issue since we don’t use one named that, but I guess it is. We’re looking through our code currently trying to find where we might have that issue with originalPath(), but all we really have for PathPlanner so far is the autonomous configuartion in our drivetrain, and setting up an AutoBuilder/AutoChooser. We’ll keep looking, thank you for your help