Controlify

Controlify

609k Downloads

[Bug] JVM crash when replugging controller after launch

shrobbyy opened this issue ยท 3 comments

commented

Current Behaviour

Game doesn't detect controller when launching the game with it plugged in. Replugging it crashes the JVM.

Expected Behaviour

The controller would work right away after launching the game with it plugged in.

Screenshots

No response

Reproduction Steps

  1. Launch the game with a controller connected
  2. Realize the mod doesn't detect it
  3. Replug the USB cable and the game will freeze and crash the JRE

Logs

[13:08:46] [Render thread/INFO]: Initializing Controlify...
[13:08:46] [Render thread/INFO]: Loading Controlify config...
[13:08:46] [Render thread/INFO]: Initialised SDL4j 3.693c75e
[13:08:46] [Render thread/INFO]: Finishing Controlify init...
[13:08:46] [Render thread/INFO]: Successfully loaded 324 gamepad mapping entries!
[13:08:46] [Render thread/INFO]: SDL3 screen keyboard supported: false
[13:08:46] [Render thread/INFO]: Global driver: Keyboard = 'SDL3.supported=false'
[13:08:50] [Render thread/WARN]: Controller removed but not found: 1
[13:08:55] [Render thread/INFO]: Using SDL to identify controller type.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000075adb26c98a4, pid=74423, tid=74427
#
# JRE version: OpenJDK Runtime Environment (17.0.11+9) (build 17.0.11+9)
# Java VM: OpenJDK 64-Bit Server VM (17.0.11+9, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x2c98a4]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/nico-b/.local/share/PrismLauncher/instances/Legacy4J/.minecraft/core.74423)
#
# An error report file with more information is saved as:
# /home/nico-b/.local/share/PrismLauncher/instances/Legacy4J/.minecraft/hs_err_pid74423.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Process crashed with exitcode 6.

Mod Version

2.0.0-beta5+1.20.4

Controller

issues

Bluetooth

  • Yes

Operating System

Linux/SteamOS

ARM

  • Yes

Additional Information

Opening mod menu and multiplayer also crashes the JVM in rare occasions.

Just to make sure...

  • I have made sure I am using the latest version of Controlify for the latest version of Minecraft.
  • I have made sure there are no other issues describing the same problem on the issue tracker.
commented

Here are some log files for this specific case, the controller/game was left to run afk and after a while the controller disconnected automatically causing a crash.

hs_err_pid55144.log

[15:01:40] [Render thread/INFO]: Controller disconnected: 'Xbox Controller'#SDL-1-HID[VID=0x045e, PID=0x0b20] (Xbox Controller)
[15:01:40] [Render thread/INFO]: Saving Controlify config...
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc82944203, pid=55144, tid=21544
#
# JRE version: Java(TM) SE Runtime Environment (17.0.8+9) (build 17.0.8+9-LTS-211)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.8+9-LTS-211, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# V  [jvm.dll+0x6a4203]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Alex\Documents\Minecraft\MultiMC\instances\1.20.4-Shaders\.minecraft\hs_err_pid55144.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Proces is gecrasht met afsluitcode -1073740791 (0xffffffffc0000409).
Hieronder vindt u een analyse van de afsluitcode. DEZE IS MOGELIJK INCORRECT EN MOET MET EEN KORREL ZOUT WORDEN GENOMEN!
Systeem afsluitcode naam: STATUS_STACK_BUFFER_OVERRUN
Systeem afsluitcode omschrijving: Er is een bufferoverschrijdingsfout opgetreden voor stack-buffer in deze toepassing. Via deze overschrijdingsfout kan een kwaadwillige gebruiker de controle over deze toepassing verkrijgen.

Merk op dat doorgaans zowel de afsluitcode als de beschrijving onvoldoende zijn om problemen te diagnosticeren!
Altijd het volledige logbestand uploaden en niet alleen de afsluitcode.```

commented

I have a similair issue sometimes, experiencing random crashes while using a controller (and never without) although I do always play on a LAN world while using the controller, if that could be any other reason for it..

Typical behaviour I have also noticed:

  • If a controller was never connected to the PC yet, launching minecraft and playing for a while before connecting the controller typically results in a JVM crash
  • If a controller (bluetooth) goes into sleep after a while, reconnecting it after a while may result in a config reset/triggering the recalibartion screen which wont react to the controller at all

Jvm crashes feel a bit like a fluke, not that easily reproduced and sometimes go right for a long time and then crash several times on a single afternoon (most noticeable returning pattern was the #1, which causes me to make sure the controller has connected to the PC before starting minecraft)

commented

Can confirm. Just pressing the reset button on my controller caused a crash. (Makes sense, as that's essentially a USB power cycle, also could haven with mode switching shenanigans.)

Controllify was attempting to show the calibration screen for a non-existent null controller.