Skip to content

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

@Lachrymogenic

Description

@Lachrymogenic

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)

simplescreenrecorder-2024-05-20_20.26.22.mp4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething that shouldn't happen.Help wantedAn issue requiring extra attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions