minicraft-plus-revived icon indicating copy to clipboard operation
minicraft-plus-revived copied to clipboard

Crash regarding xcb on Linux, Java 11+. Also Sound is buggy and doesn't work sometimes.

Open Lachrymogenic opened this issue 9 months ago • 19 comments

Describe the bug The game runs with no audio on OpenJDK Java 8, so I upgraded to 11, 17 and 21 and the game kept crashing with the exact same error message, that message being:

[Game Handler] WARN: Game tried to exit display, but no menu is open.
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: ../../src/xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

I am using OpenJDK. I downloaded an official Java 8 binary from java.com and the game now works completely fine however, in pavucontrol the volume slider for the game is flickering. Heres a video (Java version here is Java(TM) SE Runtime Environment (build 1.8.0_411-b09) ):

strange.webm

I genuinely find this to be so weird, even the recording software is not picking up the sound correctly.

To Reproduce I have no idea if it is reproducable, it could be an issue with my machine but then again, what am I supposed to do about it? Other java applications like Minecraft work flawlessly on OpenJDK Java 8 and other versions like OpenJDK Java 17. So I'm pretty sure something is wrong with the game itself or it was not meant for anything except Java 8. If that's the case, I have no idea why sound isn't working on Java 8. Here's a video of sound not working on OpenJDK Runtime Environment (build 1.8.0_402-8u402-ga-2ubuntu1~20.04-b06)

https://github.com/MinicraftPlus/minicraft-plus-revived/assets/160751404/c7488105-d3f9-492e-b01c-bdf20d16e14c

Albeit this is a bad example because I didn't play any example audio from a browser or something, so the video just has no audio, but you can see from the pavucontrol that the java stream is not producing any audio. Expected behavior No crash. (and for sound to work)

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.6 LTS x86_64
  • Game version: 2.2.0

Additional Comments: I personally don't know why this happens, even tried building on my own machine and same thing occurs. Sound works but stutters in Java 11+ and crashes with that error.

Lachrymogenic avatar May 20 '24 19:05 Lachrymogenic