Long Live The Queen

Long Live The Queen

View Stats:
Problems launching the game on Debian Linux 12
I'm (finally!) revisiting my old game library, and can recall having started LLtQ 8 years ago on a (now old, dusty, and long gone) Debian 8 setup, where it worked flawlessly (as I would expect from any Ren'Py game). But today I'm having problems launching it on a current, up to date Debian 12 setup.

- Game will flash the "preload" splashscreen with the game icon, then... that's it.

- I did managed to get it to run ONCE from Steam, after disabling the Steam Overlay from the game properties. Checked it runs, exited it, tried to run it again... and nope - flashing icon splashscreen, then back to Steam client. Since then, no matter how many times I flicked the Steam Overlay option on and off, the game never launched again.

- Tried running Steam client from a console, and I found this logged on every failed launch:
"free(): invalid pointer"
...as a dude that once did a little bit of C at college, I know that this is bad news. But then this is a Ren'Py game, why the odd crash out of the blue?

- Tried switching to every single version on the betas section: old stable, alpha, both Ren'Py versions listed there... same result: free(): invalid pointer!

- But... here comes the kicker: if I manually launch the game from a console using ./LongLiveTheQueen.sh, then it runs fine, ALWAYS! But then I lose Steam features integration because the game can't find the proper AppID:
"[S_API FAIL] SteamAPI_Init() failed; no appID found.
Either launch the game from Steam, or put the file steam_appid.txt containing the correct appID in your game folder."
Sure, there is a easy fix being proposed at me, but then that means I can't launch the game from within Steam.

I haven't tried launching other Ren'Py-based games from this setup yet (i5-4570S, HD Graphics 4600, Debian 12 64-bit), as I'm currently going through many games I haven't touched in a decade or so, but of course the crashes are no fun :/

Will be glad to provide more information to assist debugging!
< >
Showing 1-3 of 3 comments
Tried on my older Sandy Bridge laptop (also running Debian 12, roughly the same package versions), and... it ran fine there!

WTF. What the hell Steam.
dilworks 2 Jun @ 7:58pm 
OK, finally managed to solve the problem, because apparently I enjoy more debugging broken software than actually playing videogames:

tl;dr version: run Steam with SDL_AUDIODRIVER=alsa

Long gory version: Turned out that there is a weird interaction between the Ren'py runtime shipped with LLtQ, the PulseAudio libs shipped with Debian (note: I don't even use PA anymore, this is 2024, Pipewire is the new hotness), the Steam Runtime libs, and the specific setup of this old Haswell box (a Dell Optiplex 9020 USFF) that causes PulseAudio to get into the badlands when asked by SDL2 (which in turn is invoked by Ren'py runtime) to initialize audio at startup. Can't really tell WHY, but it took me a few hours to actually identify the guilty here. None of this nonsense happens on my older setup, an Asus K53SD laptop (both are running 64-bit Debian 12, fully up to date including backports)

Ren'py launcher scripts have a neat $RENPY_GDB environment variable you can setup to invoke gdb and debug your game there, but this handy var is UNDOCUMENTED. The proper magical enchant you want is RENPY_GDB="gdb --args" - export that and run Steam with it from a console, then when you try to run your game, it will start GDB instead - type "run" and wait for things to go south, then "bt" will get your precious stacktrace - here is mine: https://paste.rs/Uiqoa

I guess I'll be stashing SDL_AUDIODRIVER=alsa on my initscripts somewhere (I could use "pipewire" too, but many of the Linux builds of the games in my library predate Pipewire for a decade, so...).
dilworks 26 Jun @ 7:56pm 
Just got a new computer: a Ryzen 7 5700U-powered Dell Inspiron 15 3525 laptop.

Same deal: fresh new Debian 12 setup, LLtQ crashes at start with what it seems to be a malloc() error from deep into the Ren'Py/Python's bowels. Running the whole of Steam via SDL_AUDIODRIVER=alsa fixes things.

Decided to try something else: What about passing the SDL_AUDIODRIVER var through the launch parameters for the specific game? That is, "SDL_AUDIODRIVER=alsa %command%". Surprisingly this does NOT work - the game STILL crashes at start! The entirety of the Steam environment has to be forced to run through ALSA for Ren'Py to not lose its ♥♥♥♥♥♥♥♥♥ mind!

Now I need to figure out why my 12 year old Sandy Bridge laptop can run the game just fine out of the box, but the Debian setup on that one did began life five major releases ago...
< >
Showing 1-3 of 3 comments
Per page: 1530 50