Jorge-SunSpirit / Doki-Doki-Takeover

It's the takeover you've been waiting for
Apache License 2.0
75 stars 88 forks source link

Bug Report: Libitina crashes in several places on Linux #30

Closed simply-silver closed 1 year ago

simply-silver commented 1 year ago

Bug Description

When playing Libitina on Linux, the song will hard crash shortly after beginning, but before the song itself properly starts. Error below:

Error : [openfl.display.Shader] ERROR: Error compiling fragment shader
0:11(12): warning: extension `GL_NV_non_square_matrices' unsupported in fragment shader
0:302(9): error: syntax error, unexpected NEW_IDENTIFIER, expecting ',' or ';'

-- Complete dump of vertex shader file removed for brevity, it seemed to be a shader for a glitch effect.

I see it's a shader issue, so I disable shaders in the settings. This bypasses the initial crash and allows the song itself to be played. Some errors pop up in the console at this point, but it doesn't seem to affect the game just yet.

[00007f6fe0c1eec0] main decoder error: Timestamp conversion failed (delay 1000000, buffering 100000, bound 9000000)
[00007f6fe0c1eec0] main decoder error: Could not convert timestamp 16174633018 for FFmpeg
[h264 @ 0x7f6fe0cc23c0] get_buffer() failed
[h264 @ 0x7f6fe0cc23c0] thread_get_buffer() failed
[h264 @ 0x7f6fe0cc23c0] decode_slice_header error
[h264 @ 0x7f6fe0cc23c0] no frame!

However, once the song finishes, the game will crash once more, this time with a proper error popup instead of closing immediately.

hxcodec/vlc/VLCBitmap.hx (line 248)
PlayState.hx (line 2662)
flixel/FlxGame.hx (line 629)
flixel/FlxGame.hx (line 729)
flixel/FlxGame.hx (line 682)
flixel/FlxGame.hx (line 556)
openfl/events/EventDispatcher.hx (line 402)
openfl/display/DisplayObject.hx (line 1399)

Uncaught Error: Null Object Reference
Please report this error to the GitHub page: https://github.com/Jorge-SunSpirit/Doki-Doki-Takeover

> Crash Handler written by: sqirra-rng

System Details

ActualMandM commented 1 year ago

Interesting, the shader compilation error also happened on the Steam Deck (even when running via Proton). I might try merging the openfl shader PR into DDTO again and see if I have any luck this time around.

Looking into the VLCBitmap error though, I wonder if this is a hxCodec issue, as it's crashing where I put in code to clean up the VideoSprite.

For now you can enable Low End mode for Libitina (which uses FlxSprite instead of VideoSprite) or try compiling with the VideoSprite cleanup in PlayState's destroy function commented out/removed.

simply-silver commented 1 year ago

Low End mode works as a temporary solution on my machine as well, I'll attempt the other solution sometime tomorrow when I have the time

ActualMandM commented 1 year ago

Fixed as of v3.0.4.