BleuBleu/FamiStudio

Version 4.1.2 fails to launch on Linux Mint 21.2

spamegg1 opened this issue ยท 30 comments

/var/lib/flatpak/exports/share/applications/org.famistudio.FamiStudio.desktop
Launching app with Popen: /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=famistudio.sh org.famistudio.FamiStudio
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  27 (RenderCreateCursor)
  Serial number of failed request:  250
  Current serial number in output stream:  263

Were the previous versions working?

This is a fresh install, no previous versions I'm afraid. Other Flatpak apps work fine.

Does the standalone Linux version from famistudio.org work?

Let me try.

dotnet Famistudio.dll gives the exact same error.

Ok, so its more of a linux mint issue than flatpak. I dont have a VM with mint at the moment, ill leave the issue open. Maybe someone will be able to diagnose this issue eventually.

Error seems to be coming from xrandr if that helps. I also tested on Ubuntu Studio 22.04 and it works fine over there.

Yes i test on ubuntu here, so i know that works. I dont know what xrandr is. Well need help from Linux nerds i guess.

I was wrong, it's a glx error. Not sure what glx is myself either, but I think it's a way for OpenGL applications to draw stuff to an X server.

Tried it in a Mint 21.2 VM and got "Error initializing OpenGL" but I think that's because of the VM's limited graphics capabilities.

What kind of video card do you have?
EDIT : I'm able to run here on ubuntu in VMWare with 3d graphics acceleration enabled.

 โžœ inxi -G
Graphics:
  Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: amdgpu,ati
    unloaded: fbdev,modesetting,vesa gpu: amdgpu resolution: 1920x1080~60Hz
  OpenGL: renderer: AMD Radeon Vega 11 Graphics (raven LLVM 15.0.7 DRM 3.42
  5.15.0-79-generic)
    v: 4.6 Mesa 23.0.4-0ubuntu1~22.04.1

Can you try with version 4.2.0 and report back. I didnt fix anything specifically related to this (im not sure what the issue is) but who knows.

Still same on 4.2.0 (with dotnet 7.0.117)

dotnet ./FamiStudio.dll 
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  27 (RenderCreateCursor)
  Serial number of failed request:  253
  Current serial number in output stream:  274
[ble: exit 1]

Sorry to hear. Linux is very hard to troubleshoot, there are too many variables. Ill leave this open in case someone comes up with a solution.

There was something similar going on recently due to a GLFW update, but that caused an intermittent BadCursor crash, not a failure to create the cursor entirely. It also says you're using Ubuntu, which hasn't had that update yet either.

It might still be something related to GLFW nonetheless though. Make sure you have installed libglfw3, and make sure libglfw3-wayland isn't installed. If it still doesn't work, create a libglfw.so symlink in the FamiStudio.dll directory, pointing to the system installed one. Seems to be /usr/lib/x86_64-linux-gnu/libglfw.so.3.3 on Ubuntu.

@GreatGlobox I installed libglfw3 but it did not provide a libglfw.so file. locate libglfw, locate libglfw.so, locate libglfw3 and locate libglfw3.so all return nothing.

Maybe the package itself is broken / missing files.

Try dpkg -L libglfw3 and see if that returns anything.

EDIT: It should find libglfw.so.3.3 iirc. Create the symlink in the FamiStudio directory pointing to this file. If that still fails, I'll try test it on Mint tomorrow if I get a chance.

dpkg indeed found the file.

I copy-pasted the file directly into the FamiStudio directory, still the same error.

Make sure you name it to libglfw.so if doing that, because FamiStudio is only looking for that literal exact name. Symlinking with ln -s so that libglfw.so in your FamiStudio directory points to the libglfw.so.3.3 file might have been better to make absolutely sure.

sudo ln -sfv /path/to/libglfw.so.3.3 /path/to/FamiStudio/libglfw.so

Make sure you name it to libglfw.so if doing that

There is already a file with that name, it comes with the FamiStudio zip file.

Screenshot from 2024-04-26 00-22-04

I removed the file that comes with FamiStudio zip file, renamed the 3.3 file, still same error.

Interesting. Someone else had this issue before too whatever causes it. I'll try it on Mint when I get time to see if I can replicate the issue and maybe find a solution.

Which environment are you using in Mint by the way? Just to help rule things out.

Which environment are you using in Mint by the way? Just to help rule things out.

Environment?
I use it at home on my PC.

No I mean which Desktop Environment. MATE, Cinnamon, Xcfe, etc.

Oh it's Cinnamon 6.0.4, Mint 21.3

I setup a VM with Mint 21.3 Cinnamon and installed FamiStudio through the flatpak without doing anything else. It just ran fine out of the box, so this is strange.

I traced your error back to libXrender by looking at the source code from X11 libs. The most likely reason would be that it's failing to find your display for some reason.

When you attempt to launch the program, do you see it trying to display a window even temporarily before crashing, or do you just instantly get the BadMatch error without ever seeing a window? Also, have you changed anything with any Xorg config files, such as files in the /etc/X11 directory?

When you attempt to launch the program, do you see it trying to display a window even temporarily before crashing

Yes. Super duper briefly though. Almost unnoticeable.

Also, have you changed anything with any Xorg config files, such as files in the /etc/X11 directory?

No. It's just Cinnamon default.

It's really strange then how it works for me if I just install Mint and install the flatpak.

I'm wondering if it will just work for you after GLFW gets updated to 3.4 on Mint, as it sounds like the error is being caused by X trying to create a cursor. The xcursor code won't be used in a FamiStudio hotfix coming soon, if the system happens to have GLFW 3.4 or above.

Arch has already updated to 3.4 a few weeks back, but Ubuntu (which also means Mint) is still on 3.3. Might be worth trying it out when your package manager gets the new version. Still, it's unusual how it doesn't happen to me on a fresh install.

There's probably something specifically wrong with my system.