The current (final) version of Return to Castle Wolfenstein, 1.41, is unplayable with modern hardware/drivers due to a bug in the graphics initialization code. After displaying the available GL_EXTENSIONS on the console (when starting the game), rtcw immediately quits with "Received signal 11, exiting...". A good explanation of the problem is available here: http://forums.debian.net/viewtopic.php?f=6&t=48415 The short version is that the GL_EXTENSIONS output string is hardcoded to 4 KB, and if the hardware/driver capabilities list exceeds that 4 KB limit, the binary will crash. Not sure why, but this only affects the single player binary (wolfsp.x86). The multiplayer binary still works just fine. The above forum discussion also includes a workaround, although it involves hex-editing the wolfsp.x86 binary. It basically disabled the GL_EXTENSIONS output on the console; simple concept (if somewhat of a hack), but unfortunately not so simple to actually do for most users. I was able to do it myself and can confirm that it does indeed work, and wanted to create this bug report to let others know about the problem and possible solution. Unfortunately, this so far appears to be the only solution available. I'm attaching my patched wolfsp.x86 binary to this bug report, in case anyone else runs into this problem. It'd be nice if we could somehow work this into the ebuild, but I'm not sure how that could be done given the whole hex edit thing. Ideas welcome. Reproducible: Always Steps to Reproduce:
Created attachment 237417 [details] patched wolfsp.x86 binary
No need to CC yourself as reporter of a bug...
Found a better solution: ftp://download.nvidia.com/XFree86/Linux-x86/195.22/README/knownissues.html#extension_string_size Apparently nvidia has received reports about this for other games as well and they've added support for an environmental variable (__GL_ExtensionStringVersion) to control how the GL_EXTENSIONS information is returned. It essentially instructs the driver to lie about it's capabilities and report as if it were an older version of the driver. I'm attaching a diff to the current portage ebuild that contains the fix. It simply adds the environmental variable in the game bin wrapper (rtcwsp). Presumably this only applies to nvidia users, but: 1. I can't find reports of non-nvidia users being affected 2. Non-nvidia drivers should completely ignore the variable It'd be nice to limit this to just nvidia binary driver users, but I couldn't find a good way to do that in an ebuild. Suggestions welcome. I'm also dropping the severity of this bug down to normal. critical fits the bugzilla description, which is why I chose it, but given that it's a crash in an almost 9 year old game, in the grand scheme of things I don't think this quite counts as a critical for Gentoo.
Created attachment 237569 [details] patch to add __GL_ExtensionStringVersion variable
in portage. thanks for the bug report and sed patch.