Magical Diary

Magical Diary

View Stats:
tetradavid Feb 17, 2013 @ 5:02pm
[BUG] crash on Linux when loading the Steam API
The symptoms are the same as in this discussion but the root cause is different. Instead of crashing because of opengl, the game crashes if the Steam client is launched.

Here is a summary of my issue from the other discussion :

I have a 64bit gentoo (kernel 3.6.11).

I launch the game with the steam client or with
~/.steam/steam/SteamApps/common/Magical\ Diary/

If the Steam client is running, I get :
Fatal Python error: (pygame parachute) Segmentation Fault
and the game crashes.
Here is the gdb backtrace :
Here is the strace output :

If the Steam client is NOT running, I get :
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll.
and the game starts. It also generates the opengl.txt file :

I can get achievements in other games (I tested it).
Last edited by Spiky Caterpillar; Feb 18, 2013 @ 12:42am
< >
Showing 1-11 of 11 comments
Spiky Caterpillar  [developer] Feb 18, 2013 @ 12:05am 
I have a new testcase up at
To use it, decompress it into the Magical Diary directory and then, with the Steam client running, run ./

If it still crashes, try copying over and running the software renderer version of MagicalDiary from the Steam client.

Both ways, if it crashes, I'll want the console output.

The sha224sum of the file is:
eb833f0281c445a5652808deedbb7a56ef0439b37f888f9a168f7de4 harness.tar.bz2
Unit3 Feb 18, 2013 @ 11:34am 
I'm getting crashes on Ubuntu 12.10 x64 with both normal and swrender versions, but not the steam init failures, just a straight up core dump. Running the test harness, I get:

~/.steam/steam/SteamApps/common/Magical Diary$ ./
Preserving Steam LD_PRELOAD
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Tests complete.

If I copy it over, and run through Steam, there's no output or anything, so I assume it's still crashing.

Note that the crashes I get happen after the little MagicalDiary splash window with the magic colour symbols, so at least that part is loading for me.

Here's the GDB backtrace I get, so it's failing to load some bundled shared lib I guess:

(gdb) run -OO
Starting program: /home/unit3/.local/Steam/SteamApps/common/Magical Diary/lib/linux-x86/python.real -OO
/home/unit3/.local/Steam/SteamApps/common/Magical Diary/lib/linux-x86/python.real: error while loading shared libraries: cannot open shared object file: No such file or directory
[Inferior 1 (process 7410) exited with code 0177]
tetradavid Feb 18, 2013 @ 12:16pm 
I get segfaults, like Unit3 :
$ ./
Preserving Steam LD_PRELOAD
./ line 3: 11530 Segmentation fault "`dirname \"$0\"`/lib/python" "-OO" "game/harness.pyo" "$@"
./ line 5: 11538 Segmentation fault "`dirname \"$0\"`/lib/python" "-OO" "game/harness.pyo" "$@"
Tests complete.

The output of the Steam client :
Game update: AppID 211340 "Magical Diary", ProcID 15567, IP
Preserving Steam LD_PRELOAD
/home/tetradavid/.local/share/Steam/SteamApps/common/Magical Diary/ line 3: 15569 Segmentation fault "`dirname \"$0\"`/lib/python" "-OO" "game/harness.pyo" "$@"
/home/tetradavid/.local/share/Steam/SteamApps/common/Magical Diary/ line 5: 15574 Segmentation fault "`dirname \"$0\"`/lib/python" "-OO" "game/harness.pyo" "$@"
Tests complete.
Game removed: AppID 211340 "Magical Diary", ProcID 15567
sorlok_reaves Feb 19, 2013 @ 12:32am 

I was directed to this ticket, as I am having the same problem. Running the test harness crashes with two segmentation faults (and on Steam there it simply fails to start anything).

I can still run "" with steam disabled to get the game started, so that's a workaround for now. But I'm happy to help run any tests harnesses, so please let me know.
Spiky Caterpillar  [developer] Feb 19, 2013 @ 6:29am 
I've got a candidate workaround in beta now. Let me know if it works!
sorlok_reaves Feb 19, 2013 @ 8:15am 
I've got the "Beta -" combo box item selected for this game, and then checked that the game updated. The game crashes exactly the same way as it did before, unfortunately.
tetradavid Feb 19, 2013 @ 10:37am 
The workaround works for me :
$ ./
Fatal Python error: (pygame parachute) Segmentation Fault
./ line 25: 16876 Aborted "`dirname \"$0\"`/lib/python" "-OO" "${}.py" "$@"
Trying again, because Steam API init failed.
Debug: Achievement integration disabled due to previous crash.
and the game starts. Same result if I launch the game from the Steam client (after removing the ~/.renpy/MagicalDiaryHorseHall/ file to emulate a first launch).
Last edited by tetradavid; Feb 19, 2013 @ 10:38am
sorlok_reaves Feb 19, 2013 @ 10:04pm 
Originally posted by tetradavid:
Same result if I launch the game from the Steam client (after removing the ~/.renpy/MagicalDiaryHorseHall/ file to emulate a first launch).

Thanks for the tip; I tried this and the game now launches from Steam just fine for me too (with the Beta build).
Spiky Caterpillar  [developer] Feb 20, 2013 @ 12:10am 
Okay, I've bumped the new build to stable, and applied the workaround to the demo as well. Hopefully this is finally fixed!

Sorlok: I'm guessing that the reason it wasn't working for you was some delay in CDN updates - there were a few hours when my client insisted the old beta was the current one even though Tetradavid could download the new beta.

If anyone is still getting crashes on startup, please paste the MountedDepots section of ~/.local/share/Steam/SteamApps/appmanifest_211340.acf (full version) or appmanifest_212140.acf (demo version) in your bug report.

If you have an entry for a depot with the ManifestGID 6762161869812380448, that is an old version.
sorlok_reaves Feb 20, 2013 @ 12:26am 
Sure, that makes sense. Thanks again for getting this fixed; you guys have an excellent support team. :)
zchronos[Linux] Jul 21, 2013 @ 1:16am 
I have the same problem (from April). And the Archievement doesn't works.

Game update: AppID 211340 "Magical Diary", ProcID 29175, IP
Fatal Python error: (pygame parachute) Segmentation Fault
/home/zchronos/.local/share/Steam/SteamApps/common/Magical Diary/ línea 26: 29178 Abortado "`dirname \"$0\"`/lib/python" "-OO" "${}.py" "$@"
Trying again, because Steam API init failed.
Debug: Achievement integration disabled due to previous crash.

My [appmanifest_211340.acf]:
"appID" "211340"
"Universe" "1"
"StateFlags" "4"
"installdir" "Magical Diary"
"LastUpdated" "1372427954"
"UpdateResult" "0"
"SizeOnDisk" "90423274"
"buildid" "45438"
"LastOwner" "0"
"BytesToDownload" "80676432"
"BytesDownloaded" "80676432"
"name" "Magical Diary"
"GameID" "211340"
"Installed" "1"
"appinstalldir" "/home/zchronos/.local/share/Steam/SteamApps/common/Magical Diary"
"Language" "english"
"211346" "348895287729721901"
"211347" "7104171854863769252"
< >
Showing 1-11 of 11 comments
Per page: 15 30 50