Skip to content

Sound playback can cause freezes when loading resources from JARs #80

Description

@saadndm

Description

On Minecraft 1.8.9 with OSL Resource Loader, playing an OGG bundled inside a mod JAR can freeze the client. It works in runClient, where resources are normal files, but fails after building the mod. (Reproduced on 1.9 and 1.12.2 and legacy fabric)

Logs right before freeze:

[21:35:28] [Thread-10/ERROR] (Minecraft) Error in class 'CodecJOrbis'
[21:35:28] [Thread-10/ERROR] (Minecraft) Unable to acquire inputstream in method 'initialize'.

threaddump.txt

From what I can see:
Paulscode interrupts its command thread to wake it. If this happens while ZipFileSystem stream is being read, it can throw an IO exception. CodecJOrbis.readBytes() catches the exception and returns null without marking the end of the stream, then CodecJOrbis.readAll() loops forever.

Maybe related to this: https://bugs.openjdk.org/browse/JDK-8316882?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions