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/MagicalDiary.sh

If the Steam client is running, I get :
Fatal Python error: (pygame parachute) Segmentation Fault
and the game crashes.
Here is the gdb backtrace : http://pastie.org/private/z8xpvddyey3lnknuesnzg
Here is the strace output : http://www.mediafire.com/?a90n4al9mb740v4

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 : http://pastie.org/private/rool5vclowz4jx4jbzbwq


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 http://spikycaterpillar.com/magical_diary/tmp/harness.tar.bz2
To use it, decompress it into the Magical Diary directory and then, with the Steam client running, run ./harness1.sh.

If it still crashes, try copying harness1.sh over MagicalDiary-swrender.sh 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$ ./harness1.sh
Preserving Steam LD_PRELOAD
Segmentation fault (core dumped)
Segmentation fault (core dumped)
Tests complete.

If I copy it over MagicalDiary-swrender.sh, 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 MagicalDiary.py
Starting program: /home/unit3/.local/Steam/SteamApps/common/Magical Diary/lib/linux-x86/python.real -OO MagicalDiary.py
/home/unit3/.local/Steam/SteamApps/common/Magical Diary/lib/linux-x86/python.real: error while loading shared libraries: libpython2.6.so.1.0: 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 :
$ ./harness1.sh
Preserving Steam LD_PRELOAD
./harness1.sh: line 3: 11530 Segmentation fault "`dirname \"$0\"`/lib/python" "-OO" "game/harness.pyo" "$@"
./harness1.sh: 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 0.0.0.0:0
Preserving Steam LD_PRELOAD
/home/tetradavid/.local/share/Steam/SteamApps/common/Magical Diary/MagicalDiary-swrender.sh: line 3: 15569 Segmentation fault "`dirname \"$0\"`/lib/python" "-OO" "game/harness.pyo" "$@"
/home/tetradavid/.local/share/Steam/SteamApps/common/Magical Diary/MagicalDiary-swrender.sh: 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 
Hello,

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 "MagicalDiary.sh" 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 :
$ ./MagicalDiary.sh
Fatal Python error: (pygame parachute) Segmentation Fault
./MagicalDiary.sh: line 25: 16876 Aborted "`dirname \"$0\"`/lib/python" "-OO" "${0%.sh}.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/steamapi.fail 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/steamapi.fail 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.

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


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