Usdx: PNG files are not displayed (LINUX)

Created on 16 Mar 2019  路  18Comments  路  Source: UltraStar-Deluxe/USDX

Actual behaviour

When the game is installed in Linux (Raspberry pi), some PNG files are not displayed, leaving menus unusable. I have made several tests and it seems that the problem is related to the alpha channel of the files. When the alpha channels of the PNG files are removed, the files are displayed, but this is not ideal. JPG files work fine. I have been using the game for many months without issue, but recently after a fresh installation this problem appears.
screenshot0001

Expected behaviour

Menus should appear with all their graphics.

Steps to reproduce

  1. Install USDX (README.md)
  2. Launch USDX

Details

Provide some additional information:

  • USDX version: 2017.8.0 dev
  • Operating System + version: Linux raspberrypi 4.14.98-v7+

Error.log
config.log

Most helpful comment

apt-get install libsdl2-2.0-0=2.0.5+dfsg1-2 works as well. It's only the 2.0.5+dfsg1-2+rpt1 version that is buggy. Someone should file a bug at https://bugs.launchpad.net/raspbian

But wait a few seconds for a workaround in USDX.

All 18 comments

Not much has changed in that part of the code in the last few months.
Can you test if it the problems were caused by 650e974dedd5aaa171806183aa48c25d76c86abd?

Btw., you are the first one who tells us that he has successfully used UltraStar Deluxe on a Raspberry Pi. Which RPi are you using?

Didn't work. The issue might be similar to this one #255

This must be something different because on your system some PNGs work. In #255 the library for loading PNGs was missing.

Alright, I changed NeededPixFmt := SDL_PIXELFORMAT_ABGR8888 to RGBA888 in UTexture.pas (L. 156) and now for the PNGs that were not displayed, some are now showing correctly, some with the wrong color and some are not showing.

That only swaps color components in the loaded image. Blue is swapped with green and red is swapped with the alpha channel. It does now change the color format used for the OpenGL texture. That's why the colors are wrong. But if the images are drawn now, they were already drawn before that change.

Did you maybe change the gpu_mem setting in the Raspberry Pi config.txt with your reinstallation?

No setting was changed. I tried with different versions of raspbian and it's the same thing. The only thing that I have changed is the SD card. I will try to put back my old SD card and see if this fix the problem but I really doubt that it will. The problem is probably not in the code, but I will try anyway to change ABGR8888 to BGR8888 to see if I can have something usable.

BTW. I using a raspberry Pi 3 B. And I also tried with a raspberry Pi 3 B+.

I changed my version of Raspbian and now everything is working perfectly.

I have the same problem on my raspberry pi. I use the last version (strech) up-to-date.
I see the problem on the tag "v2017.8.0".
If i remove the alpha band of all the PNG images (with the imagemagick command "convert -alpha off image.png image.png"), then everything are well displayed (without transparency of course).
So the problem is with the transparency.
Exception: the cursor is well rendered with transparency.
lib: libpng16.so.16.28.0

@batrique With which version of raspbian does it work perfectly?

I installed pi64, but it's very old and full of bugs. I was using a recent version of Raspbian for months without any problems, but when I reinstalled raspbian (the same version as before) and the game, this problem appeared. Perhaps one of the libraries has been updated in the raspbian repository and cause this problem.

it's weird because some PNGs like [sing]notes are well displayed.

@batrique, can you post the Error.log file again now that it works?

I was able to run the 2018-11-13 Raspbian image in QEMU. The problem disappears when replacing the old libSDL2 2.0.5 with the current version built from sources.

Replace and build from sources libSDL2 worked for me.

@s09bQ5 I'm trying to reproduce, but I'm not able to do it. How did you do? What command?

apt-get install libsdl2-2.0-0=2.0.5+dfsg1-2 works as well. It's only the 2.0.5+dfsg1-2+rpt1 version that is buggy. Someone should file a bug at https://bugs.launchpad.net/raspbian

But wait a few seconds for a workaround in USDX.

@s09bQ5 Thanks for the fix and the explanation !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bohning picture bohning  路  6Comments

uhrheber picture uhrheber  路  11Comments

natowi picture natowi  路  4Comments

RattleSN4K3 picture RattleSN4K3  路  12Comments

BenHamrick picture BenHamrick  路  8Comments