Bug 6273 - Limbo for Linux segfaults
Status: ASSIGNED
Alias: None
Product: LIMBO
Classification: Unclassified
Component: Everything
Version: unspecified
Hardware: PC Linux
: P3 major
Assignee: Ryan C. Gordon
QA Contact: Ryan C. Gordon
URL:
Depends on:
Blocks:
 
Reported: 2014-07-19 11:06 EDT by Heiko Baums
Modified: 2014-10-17 21:06:48 EDT
3 users (show)

See Also:


Attachments
strace of limbo process when it hangs (1.75 KB, text/plain)
2014-07-21 23:47 EDT, Diego Viola
limbo strace (740.61 KB, text/plain)
2014-07-22 04:38 EDT, Heiko Baums
Output of `USE="abi_x86_32" emerge -pv libsdl2` (194.93 KB, application/octet-stream)
2014-07-25 19:28 EDT, Heiko Baums

Description Heiko Baums 2014-07-19 11:06:57 EDT
The new Linux version of Limbo (Limbo-Linux-2014-06-18.sh) segfaults on Gentoo ~amd64.

I think I should have the necessary multilib dependencies installed. Since there's no ebuild for the multilib version of libsdl2 in the portage tree I used the library provided by the source package Limbo-Linux-2014-06-18.sh.

The screen first gets black for a few milliseconds and then I get the segfault error message.
Comment 1 Fletch Hasues 2014-07-20 07:57:46 EDT
Gentoo amd4 user as well.  I'm seeing similar issues in that the game launches, has a black screen, but I get sound.  If I press esc, I hear an option sound as well.

Investigating the binary, I noticed this:
 $ ldd limbo
        linux-gate.so.1 (0xf7731000)
        libGL.so.1 => /usr/lib32/libGL.so.1 (0xf75dd000)

        libSDL2-2.0.so.0 => not found

        libsteam_api.so =>
/home/user/files/progs/linux/Steam/SteamApps/common/Limbo/libsteam_api.so
(0xf75cb000)
        libstdc++.so.6 =>
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32/libstdc++.so.6 (0xf74dd000)
        libm.so.6 => /lib32/libm.so.6 (0xf749a000)
        libgcc_s.so.1 =>
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32/libgcc_s.so.1 (0xf747e000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf7463000)
        libc.so.6 => /lib32/libc.so.6 (0xf72b5000)
        libnvidia-tls.so.337.25 => /usr/lib32/libnvidia-tls.so.337.25
(0xf72af000)
        libnvidia-glcore.so.337.25 =>
/usr/lib32/libnvidia-glcore.so.337.25 (0xf4d62000)
        libX11.so.6 => /usr/lib32/libX11.so.6 (0xf4c2c000)
        libXext.so.6 => /usr/lib32/libXext.so.6 (0xf4c1a000)
        libdl.so.2 => /lib32/libdl.so.2 (0xf4c15000)
        /lib/ld-linux.so.2 (0xf7732000)
        libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf4bf2000)
        libXau.so.6 => /usr/lib32/libXau.so.6 (0xf4bee000)
        libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf4be7000)

At this point, it seems all that is needed is for Playdead/icculus to include the version of the library that was used in building Limbo to be included in its Steam release.  I'm basing this that other games are doing this?

$ find . -name libSDL*

./files/progs/linux/Steam/ubuntu12_32/libSDL2-2.0.so.0
./files/progs/linux/Steam/SteamApps/common/Monaco/lib/libSDL2-2.0.so.0
./files/progs/linux/Steam/SteamApps/common/Bastion/Linux/lib/libSDL-1.2.so.0
./files/progs/linux/Steam/SteamApps/common/Dungeon
Defenders/UDKGame/Binaries/libSDL2-2.0.so.0
./files/progs/linux/Steam/SteamApps/common/Portal/bin/libSDL2-2.0.so.0
./files/progs/linux/Steam/SteamApps/common/Team Fortress 2
Beta/bin/libSDL2-2.0.so.0
./files/progs/linux/Steam/SteamApps/common/Half-Life/libSDL2.so
./files/progs/linux/majesty-demo/lib/lib1/libSDL_mixer-1.2.so.0
./files/progs/linux/majesty-demo/lib/lib1/libSDL-1.2.so.0

Can this be addressed?
Comment 2 Ryan C. Gordon 2014-07-21 11:01:50 EDT
> At this point, it seems all that is needed is for Playdead/icculus to
> include the version of the library that was used in building Limbo to be
> included in its Steam release.  I'm basing this that other games are doing
> this?

If you got into the game, this isn't actually your problem. But since you asked...

If you launch the game from Steam, Limbo will use the Steam Runtime, which provides SDL (and which is why I don't ship my own SDL with the game).

Specifically, it'll use this one from your install:

    ./files/progs/linux/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libSDL2-2.0.so.0

So it's safe to either run with that in your LD_LIBRARY_PATH (which is more or less what happens when you launch from the Steam Client, or just copy the file into the Limbo install (or provide your own libSDL2 that you compiled yourself, if you like).

--ryan.
Comment 3 Heiko Baums 2014-07-21 13:31:28 EDT
I just want to mention that the original bug report is not about the Steam version, it's about the DRM free version from the Humble Store. And I've already used the libSDL2-2.0.so.0 bundled with your source package.

And I don't even get some sound. The screen just gets blank for a few milliseconds and then it segfaults.
Comment 4 Ryan C. Gordon 2014-07-21 14:29:13 EDT
(In reply to Heiko Baums from comment #3)
> I just want to mention that the original bug report is not about the Steam
> version, it's about the DRM free version from the Humble Store. And I've
> already used the libSDL2-2.0.so.0 bundled with your source package.

Oh, whoops, I misunderstood. Sorry.

(The SDL2 in that package was literally copied out of the Steam Runtime, fwiw, though.  :)  )

> And I don't even get some sound. The screen just gets blank for a few
> milliseconds and then it segfaults.

Can you get me a backtrace in gdb, so I can see where it segfaults?

--ryan.
Comment 5 Ryan C. Gordon 2014-07-21 14:34:42 EDT
> Gentoo amd4 user as well.  I'm seeing similar issues in that the game
> launches, has a black screen, but I get sound.  If I press esc, I hear an
> option sound as well.

One thing we've noticed is that SDL panics about doing fullscreen if it can't find libXrandr and tries to do it an old and extremely broken way (even though it doesn't actually _use_ libXrandr for the way it should be doing it). This is, strictly speaking, an SDL bug, but the end result is that the game incorrectly believes it's still waiting for the window to get focus so it never draws anything.

I'm not sure that's what's happening here, but an easy fix is either to put it in windowed mode and see if it works, since it avoids the issue (look for the "windowedmode" line in settings.txt in the game's installation folder), or install a 32-bit libXrandr in the appropriate place on your system.

It's worth noting that the latest Ubuntu declines to provide a 32-bit version of this library on 64-bit installs, even when it provides several others for compatibility, so it's possible Gentoo does, too.

--ryan.
Comment 6 Diego Viola 2014-07-21 23:47:31 EDT
Created attachment 3475 [details]
strace of limbo process when it hangs

This is a strace of the limbo process when it hangs, the game appears to be stuck in a endless loop.
Comment 7 Diego Viola 2014-07-21 23:54:24 EDT
Hello,

I have this same problem on Arch Linux (x86_64), I have the DRM free version as well: Limbo-Linux-2014-06-18.sh.

The game always hangs for me when I start the game or during the main menu, I tried attaching a strace to the process and the output I get from strace gives me the impression that the game is stuck in a endless loop:

clock_gettime(CLOCK_MONOTONIC, {2516, 643879670}) = 0
nanosleep({0, 100000}, NULL)            = 0
clock_gettime(CLOCK_MONOTONIC, {2516, 644201219}) = 0
nanosleep({0, 100000}, NULL)            = 0
clock_gettime(CLOCK_MONOTONIC, {2516, 644521372}) = 0
nanosleep({0, 100000}, NULL)            = 0
clock_gettime(CLOCK_MONOTONIC, {2516, 644841594}) = 0
nanosleep({0, 100000}, NULL)            = 0

I get these messages repeatedly. Please see the file I've attached to the bug report.

I also tried running the game in windowed mode and same thing, the game hangs just after I start a new game.

I'm not sure what else to try, the game won't crash or segfault, it will just hang and I'll get these messages from strace. Please let me know if there's anything else I can try.

Thanks.
Comment 8 Diego Viola 2014-07-21 23:58:30 EDT
I have lib32-libxrandr installed on my system:

multilib/lib32-libxrandr 1.4.2-1 [installed]
    X11 RandR extension library (32-bit)

I also tried setting the game to windowed mode.

The game still hangs.
Comment 9 Fletch Hasues 2014-07-22 02:30:22 EDT
Ryan,
  I wanted to confirm what you were saying is accurate.  Making the change in settings.txt does indeed work.  I linked in the library from the steam location as suggested.  Full screen is a no go.  Additionally, I have a 32bit libXrandr installed as well via:

app-emulation/emul-linux-x86-xlibs 20140406

which provides:
/usr/lib32/libXrandr.so.2.2.0
/usr/lib32/libXrandr.so.2
/usr/lib32/libXrandr.so

The game seems to load this with no error as an strace displays:

open("/home/user/files/progs/linux/Steam/SteamApps/common/Limbo/libXrandr.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=291615, ...}) = 0
mmap2(NULL, 291615, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffff7697000
close(3)                                = 0
open("/usr/lib32/libXrandr.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\25\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=38224, ...}) = 0
mmap2(NULL, 41180, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfffffffff4a46000
mmap2(0xf4a4f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0xfffffffff4a4f000
close(3)                                = 0
mprotect(0xf4a4f000, 4096, PROT_READ)   = 0
munmap(0xf7697000, 291615)

So I can play in a windowed mode, but I can not play in a full screen.  That being said, my take away is that full screen is simply not possible for this game noting this is a bug with SDL?
Comment 10 Heiko Baums 2014-07-22 04:24:22 EDT
First of all I can't confirm the other commenters. Changing the settings.txt to switch to windowed mode doesn't help for me.

I tried to backtrace limbo with gdb. This is all I got:

GNU gdb (Gentoo 7.7.1 p1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/limbo/limbo...(no debugging symbols found)...done.
(gdb) bt
No stack.
(gdb) run
Starting program: /opt/limbo/limbo 
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xf4af0b40 (LWP 6276)]
[New Thread 0xf515bb40 (LWP 6277)]
[New Thread 0xf5153b40 (LWP 6278)]
[New Thread 0xf34ddb40 (LWP 6280)]
[New Thread 0xf514ab40 (LWP 6281)]

Program received signal SIGSEGV, Segmentation fault.
0x08144ffa in PackageFileManager::UnloadPackageFile(int) ()
Comment 11 Heiko Baums 2014-07-22 04:29:17 EDT
When I try the both gdb commands the other way round I get this probably more useful output:

GNU gdb (Gentoo 7.7.1 p1) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/limbo/limbo...(no debugging symbols found)...done.
(gdb) run
Starting program: /opt/limbo/limbo 
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xf4af0b40 (LWP 6432)]
[New Thread 0xf515bb40 (LWP 6433)]
[New Thread 0xf5153b40 (LWP 6434)]
[New Thread 0xf34ddb40 (LWP 6436)]
[New Thread 0xf514ab40 (LWP 6437)]

Program received signal SIGSEGV, Segmentation fault.
0x08144ffa in PackageFileManager::UnloadPackageFile(int) ()
(gdb) bt
#0  0x08144ffa in PackageFileManager::UnloadPackageFile(int) ()
#1  0x08164cf5 in LimboGameEntry(char const*) ()
#2  0x08113307 in main ()
Comment 12 Heiko Baums 2014-07-22 04:38:59 EDT
Created attachment 3476 [details]
limbo strace

Strace output for Limbo
Comment 13 Heiko Baums 2014-07-22 04:51:34 EDT
Attached my strace output. Contrary to the Diego's conclusion the more interesting lines are the first ones:

execve("/opt/limbo/limbo", ["/opt/limbo/limbo"], [/* 61 vars */]) = 0
brk(0)                                  = 0x8f6d000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff7736000
readlink("/proc/self/exe", "/opt/limbo/limbo", 4096) = 16
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/opt/limbo/tls/i686/sse2/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/opt/limbo/tls/i686/sse2", 0xffeb2280) = -1 ENOENT (No such file or directory)

I guess limbo is linked against the libraries with absolute paths but not dynamically as it should be done, since those libraries aren't bundled with limbo and limbo should use the system libraries anyway except for libSDL2 which is not available on Gentoo.
Comment 14 Heiko Baums 2014-07-22 08:26:59 EDT
(In reply to Heiko Baums from comment #13)
> except for libSDL2
> which is not available on Gentoo.

Well, it is, of course, available on Gentoo but not in a multilib version for amd64.
Comment 15 Fletch Hasues 2014-07-22 11:59:27 EDT
In comment 13,
  I noted those entries were there as well, but in my strace, if you look further down, you should see that it fetches ld.so's cache, and then it will find the libraries located on the host.  Have you verified that yours does this as well?
Comment 16 Heiko Baums 2014-07-22 12:43:23 EDT
(In reply to Fletch Hasues from comment #15)
> In comment 13,
>   I noted those entries were there as well, but in my strace, if you look
> further down, you should see that it fetches ld.so's cache, and then it will
> find the libraries located on the host.  Have you verified that yours does
> this as well?

Mine does it as well, indeed.
Comment 17 Diego Viola 2014-07-22 16:27:50 EDT
(In reply to Heiko Baums from comment #13)
> Attached my strace output. Contrary to the Diego's conclusion the more
> interesting lines are the first ones:
> 
> execve("/opt/limbo/limbo", ["/opt/limbo/limbo"], [/* 61 vars */]) = 0
> brk(0)                                  = 0x8f6d000
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0xfffffffff7736000
> readlink("/proc/self/exe", "/opt/limbo/limbo", 4096) = 16
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
> directory)
> open("/opt/limbo/tls/i686/sse2/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT
> (No such file or directory)
> stat64("/opt/limbo/tls/i686/sse2", 0xffeb2280) = -1 ENOENT (No such file or
> directory)
> 
> I guess limbo is linked against the libraries with absolute paths but not
> dynamically as it should be done, since those libraries aren't bundled with
> limbo and limbo should use the system libraries anyway except for libSDL2
> which is not available on Gentoo.

I get that as well:

[diego@myhost limbo]$ strace ./limbo
execve("./limbo", ["./limbo"], [/* 45 vars */]) = 0
[ Process PID=2547 runs in 32 bit mode. ]
brk(0)                                  = 0x9780000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff7789000
readlink("/proc/self/exe", "/home/diego/limbo/limbo", 4096) = 23
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/tls/i686/sse2/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/tls/i686/sse2", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/tls/i686/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/tls/i686", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/tls/sse2/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/tls/sse2", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/tls/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/tls", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/i686/sse2/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/i686/sse2", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/i686/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/i686", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/sse2/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo/sse2", 0xffdeaf00) = -1 ENOENT (No such file or directory)
open("/home/diego/limbo/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/home/diego/limbo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=169110, ...}) = 0
mmap2(NULL, 169110, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffff773b000
close(3)                                = 0
Comment 18 Ryan C. Gordon 2014-07-24 02:29:40 EDT
(In reply to Heiko Baums from comment #13)
> stat64("/opt/limbo/tls/i686/sse2", 0xffeb2280) = -1 ENOENT (No such file or
> directory)
> 
> I guess limbo is linked against the libraries with absolute paths

It's not, that's glibc's dynamic loader trying locations in your library path.

"readelf -d ./limbo |grep NEEDED" shows what we linked against...

 0x00000001 (NEEDED)                     Shared library: [libGL.so.1]
 0x00000001 (NEEDED)                     Shared library: [libSDL2-2.0.so.0]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

...no absolute paths.

--ryan.
Comment 19 Ryan C. Gordon 2014-07-24 02:38:52 EDT
(In reply to Fletch Hasues from comment #9)
> So I can play in a windowed mode, but I can not play in a full screen.  That
> being said, my take away is that full screen is simply not possible for this
> game noting this is a bug with SDL?

It looks like it's unmapping the Xrandr library, so maybe it's failing on something else? I'll have to see what SDL does here.

You can force this to use the (hopefully non-buggy!) fullscreen path through SDL by exporting the SDL_VIDEO_X11_LEGACY_FULLSCREEN=0 environment variable before launching the game, and see if your luck improves.

(If anyone wants to untangle this, this is where SDL decides to use the broken legacy mode by setting "use_vidmode"...

    https://hg.libsdl.org/SDL/file/6d059ed9b6ca/src/video/x11/SDL_x11modes.c#l374

...and checks "use_vidmode" in here...

  https://hg.libsdl.org/SDL/file/6d059ed9b6ca/src/video/x11/SDL_x11window.c#l1240

...you want the path where "use_vidmode" is false. The true path is buggy in this case.)

--ryan.
Comment 20 Diego Viola 2014-07-24 03:23:15 EDT
I tried `export SDL_VIDEO_X11_LEGACY_FULLSCREEN=0`, ran limbo and it hanged at the start of the game.

I also tried `windowedmode = true` in settings.txt and same result: hang.
Comment 21 Heiko Baums 2014-07-24 08:10:29 EDT
(In reply to Ryan C. Gordon from comment #18)
> ...no absolute paths.

Maybe I was a bit confused by the absolute paths at the beginning of the strace output.
Comment 22 Heiko Baums 2014-07-24 08:13:25 EDT
(In reply to Diego Viola from comment #20)
> I tried `export SDL_VIDEO_X11_LEGACY_FULLSCREEN=0`, ran limbo and it hanged
> at the start of the game.
> 
> I also tried `windowedmode = true` in settings.txt and same result: hang.

I can confirm this.
Comment 23 Heiko Baums 2014-07-25 19:27:20 EDT
I can be totally wrong, but my impression is that the problem is the 32-bit version of libSDL2-2.0.so.0. I have the impression that only this library alone as 32-bit in a 64-bit multilib environment doesn't work, since the 32-bit multilib version of this library has a bunch of 32-bit multilib dependencies when I try to install it on Gentoo ~amd64.

See the attached output of `USE="abi_x86_32" emerge -pv libsdl2`. It wants to install at least almost the entire Xorg and even more as 32-bit multilib.

So wouldn't it be possible to build Limbo as a native 64-bit binary? Like I said before, I can be totally wrong, but this could probably be the solution.
Comment 24 Heiko Baums 2014-07-25 19:28:50 EDT
Created attachment 3478 [details]
Output of `USE="abi_x86_32" emerge -pv libsdl2`
Comment 25 Fletch Hasues 2014-07-25 23:04:39 EDT
Just a quick note, exporting SDL_VIDEO_X11_LEGACY_FULLSCREEN=0 and setting the windowedmode = false did not result in a full screen game.

As to the theory of the bad version of libSDL, if there were issues with it, one should see them at launch from command line I would think.

Heiko, it looks as if you have some conflicts in that you either need to pull emul-linux-x86 based packages off of your system (which is Gentoo's older method for providing binary support 32bit support libraries) or only use the emul-linux-x86 based packages without specifying abi_x86_64/abi_x86_32 flags to main packages.  (Unfortunately, I believe it was stated earlier that Gentoo does not provide libSDL2 in any of the emul-linux-x86 packages.)

What if you installed the Steam client and copied the library from the location mentioned earlier in the thread and placed it in the location of where you have Steam residing (mine was  ./files/progs/linux/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libSDL2-2.0.so.0 ).  Can you copy that library to your Limbo location and see if that works for you?
Comment 26 Diego Viola 2014-07-25 23:17:27 EDT
(In reply to Fletch Hasues from comment #25)
> Just a quick note, exporting SDL_VIDEO_X11_LEGACY_FULLSCREEN=0 and setting
> the windowedmode = false did not result in a full screen game.
> 
> As to the theory of the bad version of libSDL, if there were issues with it,
> one should see them at launch from command line I would think.
> 
> Heiko, it looks as if you have some conflicts in that you either need to
> pull emul-linux-x86 based packages off of your system (which is Gentoo's
> older method for providing binary support 32bit support libraries) or only
> use the emul-linux-x86 based packages without specifying
> abi_x86_64/abi_x86_32 flags to main packages.  (Unfortunately, I believe it
> was stated earlier that Gentoo does not provide libSDL2 in any of the
> emul-linux-x86 packages.)
> 
> What if you installed the Steam client and copied the library from the
> location mentioned earlier in the thread and placed it in the location of
> where you have Steam residing (mine was 
> ./files/progs/linux/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-
> gnu/libSDL2-2.0.so.0 ).  Can you copy that library to your Limbo location
> and see if that works for you?

SDL_VIDEO_X11_LEGACY_FULLSCREEN=0 and windowedmode = false results in a full screen game for me.

But as soon as the game starts, it hangs.
Comment 27 Fletch Hasues 2014-07-25 23:25:41 EDT
Well, I get a full game screen too with music playing and the menu system is there waiting input, but unfortunately I can't see anything as I have a black screen.  So yes, I get a full screen game, but I still do not get a display.
Comment 28 Heiko Baums 2014-07-26 06:46:37 EDT
> Heiko, it looks as if you have some conflicts in that you either need to
> pull emul-linux-x86 based packages off of your system (which is Gentoo's
> older method for providing binary support 32bit support libraries) or only
> use the emul-linux-x86 based packages without specifying
> abi_x86_64/abi_x86_32 flags to main packages.  (Unfortunately, I believe it
> was stated earlier that Gentoo does not provide libSDL2 in any of the
> emul-linux-x86 packages.)

I know that except for the statement regarding libSDL2 in emul-linux-x86 packages. But that doesn't change the fact that libSDL2 with abi_x86_32 seems to depend on the entire Xorg with abi_x86_32. And that's probably the reason for the segfault, because Limbo delivers only the 32-bit version of this library while its 32-bit dependencies aren't installed. Like I said, just a theory.

> What if you installed the Steam client and copied the library from the
> location mentioned earlier in the thread and placed it in the location of
> where you have Steam residing (mine was 
> ./files/progs/linux/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-
> gnu/libSDL2-2.0.so.0 ).  Can you copy that library to your Limbo location
> and see if that works for you?

I don't have the Steam client installed and I don't have a Steam account. Ryan already mentioned that he has taken libSDL2-2.0.so.0 from the Steam client. So I guess this wouldn't make any difference, also because Steam users seem to have the same issue.
Comment 29 Fletch Hasues 2014-07-26 11:03:25 EDT
> 
> I know that except for the statement regarding libSDL2 in emul-linux-x86
> packages. But that doesn't change the fact that libSDL2 with abi_x86_32
> seems to depend on the entire Xorg with abi_x86_32.

Correct.  You would need to install all of the dependencies listed with abi_x86_32.

> And that's probably the
> reason for the segfault, because Limbo delivers only the 32-bit version of
> this library while its 32-bit dependencies aren't installed. Like I said,
> just a theory.

Sounds correct to me.


> I don't have the Steam client installed and I don't have a Steam account.

This the request to install it; it would have a copy of that library, but since you state that your operating system is missing its dependencies, then I don't think this will help you until you correct that.

> Ryan already mentioned that he has taken libSDL2-2.0.so.0 from the Steam
> client. So I guess this wouldn't make any difference, also because Steam
> users seem to have the same issue.

As a Steam user, I can play the game in windowed mode, but not full screen.
Comment 30 Diego Viola 2014-08-05 10:01:20 EDT
I tried other games that use SDL2 and they don't hang (Don't Starve, Half-Life 2, etc).

Is it possible this this problem is in the game and not in SDL2 itself?
Comment 31 gennaro.hudson 2014-09-15 21:59:50 EDT
Hey Ryan,

Any news on this? Are we ever going to get a fix for this? Or are you still too busy with the Ice Bucket Challenge?

Gennaro
Comment 32 Diego Viola 2014-10-17 19:00:37 EDT
Hello,

For those having the issue with the hang/freeze, I found that a workaround to that problem is increasing the value of retrigger_spike_time from 1.0 to 4.0 or changing spike_count_to_trigger_30hz from 5 to 15.

Higher values for spike_count_to_trigger_30hz also work fine. Now Limbo doesn't hang for me anymore.
Comment 33 Heiko Baums 2014-10-17 19:46:29 EDT
(In reply to Diego Viola from comment #32)
> For those having the issue with the hang/freeze, I found that a workaround
> to that problem is increasing the value of retrigger_spike_time from 1.0 to
> 4.0 or changing spike_count_to_trigger_30hz from 5 to 15.
> 
> Higher values for spike_count_to_trigger_30hz also work fine. Now Limbo
> doesn't hang for me anymore.

Doesn't work for me. I'm still getting the segfault. I just see a black window for about a second, and then it segfaults.

Btw. segfaults are usually not caused by some settings.

That said, it would be nice if this bug could be fixed. Best try was to build Limbo for x86_64.
Comment 34 Diego Viola 2014-10-17 20:57:36 EDT
(In reply to Heiko Baums from comment #33)
> (In reply to Diego Viola from comment #32)
> > For those having the issue with the hang/freeze, I found that a workaround
> > to that problem is increasing the value of retrigger_spike_time from 1.0 to
> > 4.0 or changing spike_count_to_trigger_30hz from 5 to 15.
> > 
> > Higher values for spike_count_to_trigger_30hz also work fine. Now Limbo
> > doesn't hang for me anymore.
> 
> Doesn't work for me. I'm still getting the segfault. I just see a black
> window for about a second, and then it segfaults.
> 
> Btw. segfaults are usually not caused by some settings.
> 
> That said, it would be nice if this bug could be fixed. Best try was to
> build Limbo for x86_64.

Maybe a different issue then? The problem I was having wasn't a segfault, but a freeze/hang at the start of the game.

The process was still running, it would just hang/freeze for me.
Comment 35 Heiko Baums 2014-10-17 21:06:48 EDT
(In reply to Diego Viola from comment #34)

> Maybe a different issue then? The problem I was having wasn't a segfault,
> but a freeze/hang at the start of the game.
> 
> The process was still running, it would just hang/freeze for me.

Then you should probably file a new bug report, since I'm the reporter of this bug, and this bug report is about a segfault with the DRM free Linux version on an x86_64 system. See my original description.