Controller Issues: PS4 and Nintendo Switch Pro Controllers - Game Crashes Immediately when Disconnected
jacobpscott16 opened this issue · 2 comments
Description
Minecraft crashes unexpectedly when I disconnect either a PS4 DualShock or a Nintendo Switch Pro controller while using the MidnightControls mod. This crash also results in unsaved progress loss. The issue occurs consistently with both controllers, and only when disconnecting mid-game.
Steps to Reproduce
Launch Minecraft with the MidnightControls mod enabled.
Connect a PS4 DualShock or Nintendo Switch Pro controller.
Start a game or join a world.
Disconnect the controller mid-game.
Expected Behavior
The game should continue running without crashing and automatically switch to the default keyboard and mouse controls.
Actual Behavior
The game crashes without warning when the controller disconnects. A crash log is generated, and any unsaved progress is lost.
Mod and Version Details
Minecraft Version: 1.21.1
Fabric Loader Version: 0.16.7
Fabric API Version: 0.107.0
MidnightControls Version: 1.9.7
MidnightLib Version: 1.5.7 (bundled with MidnightControls)
System Information
OS: macOS 14.6 (MacBook Air with Apple M1)
Java Version: OpenJDK 21.0.3 (Microsoft Build)
Crash Log Excerpt
Here’s the main error from the log. Full logs can be shared if needed (attached at end)
java.lang.IllegalStateException: Cannot get payload sender when not in game!
Additional Notes
The crash occurs with both a PS4 DualShock and a Nintendo Switch Pro controller.
Confirmed using the most recent MidnightControls mod version available.