wpilibsuite / wpilibsuite/SystemcoreTesting

Simulation crashes with real driver station enabled

Open
#248 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

WPILib
Dominant language
Java
Stars
186
Forks
24
Avg merge
8h 27m
Merged PRs (30d)
9

Description

This is on WPILib alpha 5 and FirstDriverStation alpha 3 on macOS ARM and the OpMode Robot template.

When starting a simulation with Sim GUI and Use Real DriverStation checked, the simulation crashes in two ways depending on whether the driver station is already running or is started later.

If the simulation is started with the driver station already running:

HAL Extensions: Attempting to load: libhalsim_gui
Simulator GUI Initializing.
Simulator GUI Initialized!
HAL Extensions: Successfully loaded extension
HAL Extensions: Attempting to load: libhalsim_ds_socket
DriverStationSocket Initializing.
DriverStationSocket Initialized!
HAL Extensions: Successfully loaded extension
********** Robot program starting **********
NT: Listening on port 5810
NT: mDNS announcing as service 'robot' on port 5810
objc[96238]: Attempt to use unknown class 0x8bb5b1c20.
[1]    96238 abort      /usr/bin/env    /Users/kevin/wpilib/2027_alpha5/jdk/bin/java   first.Main

And when the driver station is started after the simulation is started:

HAL Extensions: Attempting to load: libhalsim_gui
Simulator GUI Initializing.
Simulator GUI Initialized!
HAL Extensions: Successfully loaded extension
HAL Extensions: Attempting to load: libhalsim_ds_socket
DriverStationSocket Initializing.
DriverStationSocket Initialized!
HAL Extensions: Successfully loaded extension
********** Robot program starting **********
NT: Listening on port 5810
NT: mDNS announcing as service 'robot' on port 5810
********** Robot program startup complete **********
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000192165820, pid=97030, tid=259
#
# JRE version: OpenJDK Runtime Environment Temurin-25.0.2+10 (25.0.2+10) (build 25.0.2+10-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-25.0.2+10 (25.0.2+10-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# C  [libobjc.A.dylib+0x9820]  objc_msgSend+0x20
#
# 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:
# /Users/kevin/code/robotics/Alpha2027/hs_err_pid97030.log
[thread 68611 also had an error]
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[1]    97030 abort      /usr/bin/env    /Users/kevin/wpilib/2027_alpha5/jdk/bin/java   first.Main

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with the OpMode Robot template, Sim GUI, and Use Real DriverStation enabled on macOS ARM, testing both driver-station startup orders. Start by comparing the two reported native crash logs, including the hs_err_pid97030.log report and the libhalsim_ds_socket output. Done means simulation remains running in both cases without an Objective-C abort or SIGSEGV.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, macos
Domain
desktop, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.