[SRU] Bug in SDL2 blocks Unity-based games
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libsdl2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Artful |
Fix Committed
|
Undecided
|
Gianfranco Costamagna | ||
Bionic |
Fix Released
|
Undecided
|
Gianfranco Costamagna |
Bug Description
[ Impact ]
* people using unity3d and steam games, with bundled sdl2 libraries
[ Regression Potential ]
* Low, this is part of the upcoming new release, and the request comes from upstream
[ Steps to reproduce ]
("Unity" here refers to the video game engine at https:/
There is a bug in SDL2 that causes Unity-based games to fail in certain configurations. The basic idea is that Unity is statically linked to SDL, and then a plugin also links dynamically to SDL, and the dynamically loaded version accidentally resolves an important symbol to the address in the statically linked version, causing chaos.
You can see this happen in the game Firewatch ( https:/
This bug will trigger if the game dynamically loads an SDL2 version > 2.0.5. Steam ships their own copy of SDL in their "steam runtime," but will favor a system-installed version if available, which means that Ubuntu is probably having this problem for users that have the libsdl2 package installed since release 17.10, which is the first to ship SDL 2.0.6. Debian Stretch is still on 2.0.5 and probably not triggering this bug quite yet.
The upstream fix is simple, and should apply cleanly to any SDL version that is 2.0.3 or later.
https:/
I _think_ all Unity titles are x86-64 binaries, so this doesn't affect every architecture, but the SDL2 patch is correct for any target worth pushing an update for.
This fix will be in SDL 2.0.9, but we don't have a timetable for that release yet, so I thought it might be worth encouraging distros to apply that one patch to their current SDL2 packages in the meantime, to make sure Firewatch and other games work out of the box.
Steps to Reproduce:
1. Install x86-64 Ubuntu 17.10 or later
2. Install Ubuntu's libsdl2 package.
3. Install Steam ( https:/
3. Install Firewatch via Steam (if you need a copy, we can supply it)
4. Launch Firewatch
Actual Results:
Game launches, possibly makes an OpenGL window without rendering anything into it, and then either crashes or hangs indefinitely. Be prepared to kill the process if necessary.
Expected Results:
Game launches and gets to its main menu.
One can also bypass this bug with the environment variable SDL_DYNAMIC_
Thanks for your time!
--ryan.
summary: |
- Bug in SDL2 blocks Unity-based games + [SRU] Bug in SDL2 blocks Unity-based games |
description: | updated |
Changed in libsdl2 (Ubuntu Artful): | |
status: | New → In Progress |
Changed in libsdl2 (Ubuntu Bionic): | |
status: | New → In Progress |
assignee: | nobody → LocutusOfBorg (costamagnagianfranco) |
Changed in libsdl2 (Ubuntu Artful): | |
assignee: | nobody → LocutusOfBorg (costamagnagianfranco) |
Hello Ryan, I committed the fix in cosmic, will update artful/bionic once it goes in release.