RoboRIO: Fatal JRE error

* ********** Robot program starting **********
* NT: server: client CONNECTED: 10.11.4.217 port 52062
* #
* # A fatal error has been detected by the Java Runtime Environment:
* #
* # SIGSEGV (0xb) at pc=0xb6d9acdc, pid=3236, tid=3239
* #
* # JRE version: OpenJDK Runtime Environment (11.0.1.13) (build 11.0.1.13-frc+0-2019-11.0.1u13-1)
* # Java VM: OpenJDK Client VM (11.0.1.13-frc+0-2019-11.0.1u13-1, mixed mode, serial gc, linux-)
* # Problematic frame:
* # C [libc.so.6+0x33cdc]
* #
* # 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_pid3236.log
* #
* # If you would like to submit a bug report, please visit:
* # http://bugreport.java.com/bugreport/crash.jsp
* # The crash happened outside the Java Virtual Machine in native code.
* # See problematic frame for where to report the bug.
* #

We have gotten this error on two of our roboRIOs so far this season. It happens whenever we try to deploy code to the robot and repeats 1-5 times in a row. Reimaging and reformating the roboRIO does not seem to fix this error in any way. Any ideas on what to do?

When it happens again, can you SSH into the roborio and grab the /tmp/hs_err* file that the error report says it generated. That has much more information on what actually caused the failure. The message you’re posing does not give a lot of information to help.

You’re also on WPILib 2019.3.2 or 2019.4.1, right?

I am fairly certain that I updated to WPILib version 3.2. But I can check again. In the meantime, here is the error log. I might also update to 4.1 right now and see if that resolves the issue.

Ok, your error is in Pathfinder. Did you update pathfinder to the latest version? It should be 2019.2.19. That will make the error throw a Java exception instead of a SegFault, but that still won’t solve the underlying issue. The issue is your CSV files are not deployed to the robot? Are they located in the src/deploy folder of your project?

The CSV files are located in the /src/main/deploy/ directory. However our Pathfinder version is outdated. I will update the library and get back to you shortly.

Sorry for the delay. Now I get an IO Exception when trying to read from the CSV files.

error: unreported exception IOException; must be caught or declared to be thrown

This is our code for reading the files, however, after connecting to the RoboRIO over ssh, i could not navigate to the deploy directory.

leftCSV = new File("/home/lvuser/deploy/left_pf1.csv");
rightCSV = new File("/home/lvuser/deploy/right_pf1.csv");

leftTrajectory = Pathfinder.readFromCSV(leftCSV);
rightTrajectory = Pathfinder.readFromCSV(rightCSV);

The IO Exception is correct, as its failing to find the files.

In your build.gradle, do you still have the following block? Thats what deploys the files.

        // Built in artifact to deploy arbitrary files to the roboRIO.
        fileTreeArtifact('frcStaticFileDeploy') {
            // The directory below is the local directory to deploy
            files = fileTree(dir: 'src/main/deploy')
            // Deploy to RoboRIO target, into /home/lvuser/deploy
            targets << "roborio"
            directory = '/home/lvuser/deploy'
        }

Also, if you are using pathweaver, you should be putting paths in src/main/deploy/paths, and using PathfinderFRC.getTrajectory("left"); to get the directory, rather then manually using the Files, It makes thing much easier.

We do still have the StaticFileDeploy artifact in our build.gradle file

Now the issue is not the deployment of the files to the roboRIO, but the ability to read the files from the deploy directory. When I am connected over ssh to the roboRIO, I can read the csv files by executing

cat /home/lvuser/deploy/left_pf1.csv

and it prints out the contents of the csv file. However the program still throws an IO exception.

The IO Exception is happening during compilation. Since its Java, it requires you to catch and handle the IO exception, or throw it again. This was a change made in the newest pathfinder update in order to make the failure to load the file easier to track for users.

So in this situation, how would I handle the exception? With a try/catch statement?

1 Like

Yes, wrap the call with a try/catch statement.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.