b3dgs / lionheart-remake

Java remake of Lionheart amiga game
https://lionheart.b3dgs.com
GNU General Public License v3.0
78 stars 7 forks source link

Black screen / no window on Linux #260

Closed DavidNemeskey closed 3 years ago

DavidNemeskey commented 3 years ago

Actual Behavior

If I start the game in full-screen mode, I get a black screen. In windowed mode, the window is created (so I can exit the game with Alt+F4), but it does not appear on the screen. In either case, the music starts playing, so it is most likely a graphics / windowing bug.

Steps to Reproduce the Problem

  1. Start the game

Specifications

Further system information

Operating System: KDE neon 5.22 KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.3 Kernel Version: 5.11.0-37-generic (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-3635QM CPU @ 2.40GHz Memory: 15.5 GiB of RAM Graphics Processor: Mesa DRI Intel® HD Graphics 4000

DjThunder commented 3 years ago

Can you have a look at log file? (/tmp/lionengine-x.log) I only tested with Debian 10 inside a VM.

I also have an integrated graphic on another computer, so I will check if it is an issue with it.

DavidNemeskey commented 3 years ago

BTW a potentially very important information that I forgot to add. When running the starting script, I get this error message:

XTRACTED LOC /tmp/16768588890523061225.tmp
NATIVE METHOD: loading from  "/tmp/16768588890523061225.tmp"
             result 74  Failed loading udev_device_get_action: /tmp/jnigen/375939362/libsdl2gdx64.so: undefined symbol: _udev_device_get_action

I have tried installing libudev-dev, libsdl2-dev and libsdl1.2-dev (following advices from various sites), but the error persists.

DjThunder commented 3 years ago

This is for gamepad support, but it is not a problem, as it works. Can you try with scaled to 1 and 4/3 ratio in windowed?

DavidNemeskey commented 3 years ago

I experience the same with those settings. Also, I tried it with another java version (Oracle 1.8), and same issue.

DjThunder commented 3 years ago

Maybe driver issue with intregrated. I will try to reproduce it, but not before this weekend unfortunately. Just for fun, you can try with a debian inside a vm...

Edit: you can also try with 1.0.0 version

DavidNemeskey commented 3 years ago

Well, KDE Neon is Ubuntu, which is Debian, so...

But actually, I played around with the scaling and ratio options and found that I can actually see the image 50% of the time with 2-4 scaling. It's not completely random, feels I have more success with 2x scaling. Also it feels I could go up from 2 to 3x or 4x, but 4x really seems random, and once it fails to load like that I have to go down to 2x; 3x won't do it. It is possible that I see patterns where there aren't any, but this is what I experienced. :smile:

DjThunder commented 3 years ago

Sounds to be related to page flipping and screen buffering. Try with vsync (game speed will be invalid if cant sync on)

What about refresh rate?

DavidNemeskey commented 3 years ago

I have had that on since the beginning, but the issue is present with or without it.

DjThunder commented 3 years ago

And if you change Hz to 50 or 60, or 100? (Windowed of course, fullscreen depends on you device capabilities)

DavidNemeskey commented 3 years ago

Nope. Also, setting zoom to 100 or switching rastering off didn't help either.

DavidNemeskey commented 3 years ago

The log is not really helpful, unfortunately, I see nothing that differentiates between the times I got picture and the times I did not. Then again, it's only INFO messages, and I am not sure I can switch to the debug level.

Also, I tried version 1.0.0 and that actually seems to work every time. So the error might only be in 1.1.0.

DjThunder commented 3 years ago

Ah good point. Thanks for your time, I will investigate as soon as possible to make it work.

DjThunder commented 3 years ago

Can you try to redownload it: link ? I will try to provide an official hotfix 1.1.1 for linux if enough time, else, will be included in next release.

DavidNemeskey commented 3 years ago

Sorry, the zip seems to be corrupted, I can only unzip a few files and get bad zipfile offset for the rest:

Archive:  lionheart_remake_1.1.0_linux64.zip
   creating: lionheart_remake_linux64/
   creating: lionheart_remake_linux64/data/
lionheart_remake_linux64/data/splash.png:  mismatching "local" filename (lionheart_remake_linux64/data/lionheart-pc-1.1.0.jar),
         continuing with "central" filename version
  inflating: lionheart_remake_linux64/data/splash.png  
  error:  invalid compressed data to inflate
file #4:  bad zipfile offset (local header sig):  5356
...
DjThunder commented 3 years ago

Ok, I reuploaded it, and checked its integrity. Fine on my side. Can you retry ? (sorry)

DavidNemeskey commented 3 years ago

@DjThunder, I can confirm that the new version works. Thanks!

DjThunder commented 3 years ago

Fixed by: https://github.com/b3dgs/lionengine/commit/c861b3989c46a37d27d49eea716213fdf094fb93