Some programs (e.g. Widelands) crash when playing sounds with sdl2 2.0.6

Bug #1722060 reported by Hans Joachim Desserud on 2017-10-08
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ioquake3 (Ubuntu)
Undecided
Unassigned
Nominated for Artful by Vej
libsdl2 (Debian)
Fix Released
Unknown
libsdl2 (Ubuntu)
High
Unassigned
Nominated for Artful by Vej
libsdl2-mixer (Ubuntu)
High
Unassigned
Nominated for Artful by Vej
openarena (Ubuntu)
Undecided
Unassigned
Nominated for Artful by Vej
redeclipse (Ubuntu)
Undecided
Unassigned
Nominated for Artful by Vej
widelands (Ubuntu)
Undecided
Unassigned
Nominated for Artful by Vej

Bug Description

After the upload of libsdl2-2.0-0 2.0.6+dfsg1-2ubuntu1, it looks like some programs (like Widelands) crash when they try to play sounds.

Based on the SDL2 upstream discussion (https://discourse.libsdl.org/t/sdl-2-0-6-released/23109) it seems to be a bug with the new version if libsdl2 and libsdl2-mixer.

Steps to reproduce:
(Install Widelands as an example which uses sdl2 and sdl2-mixer)
1. Run widelands
2. From the main menu, select Single player
3. Select New game
4. Pick any map and click Ok.
5. Click start game.

Expected
The game starts

Actual
It crashes, with a segmentation fault. (See bug 1720819 for example output and backtrace)

This was originally reported upstream in Widelands and tracked down to a bug in sdl2 version 2.0.6, see bug 1720819 for more details. In particular the following comments:
https://bugs.launchpad.net/widelands/+bug/1720819/comments/14
https://bugs.launchpad.net/widelands/+bug/1720819/comments/16 (which contains a possible patch for SDL-mixer)

Known workarounds
As mentioned in the commenst https://discourse.libsdl.org/t/sdl-2-0-6-released/23109, it seems to be related to the sound and sdl_mixer.
In the case of Widelands, it is possible to run `widelands --nosound` which will mute all sound. With this option, the crash doesn't occur.

Possibly other programs are affected by this as well.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libsdl2-2.0-0 2.0.6+dfsg1-2ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
Uname: Linux 4.13.0-12-generic x86_64
ApportVersion: 2.20.7-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Oct 8 12:50:42 2017
InstallationDate: Installed on 2017-06-10 (119 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170609)
SourcePackage: libsdl2
UpgradeStatus: No upgrade log present (probably fresh install)

Hans Joachim Desserud (hjd) wrote :
description: updated
tags: added: regression-release
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libsdl2 (Ubuntu):
status: New → Confirmed
Changed in libsdl2-mixer (Ubuntu):
status: New → Confirmed
Changed in widelands (Ubuntu):
status: New → Confirmed
Hans Joachim Desserud (hjd) wrote :

Attaching a Debian bug watch. The bug report unfortunately has a couple of spam messages, but in shows that Debian was affected too and the issue was resolved by upgrading to sdl 2.0.7. This confirms what has also been described in bug 1720819 where other systems (for instance Arch) upgraded the sdl version.

Some of the links in the original report points at possible patches which could be applied to the 17.10 version, since I would asssume and SRU of sdl 2.0.7 would be out of the question?

Changed in libsdl2 (Debian):
status: Unknown → Fix Released
Quin (qreeves) wrote :

Red Eclipse is not affected by this bug as of v1.6.0 as we've added a check for SDL v2.0.6 and disable sound output if it is detected.

Hans Joachim Desserud (hjd) wrote :

Quin: Is it able to detect the SDL version during runtime? Do you have a link to the upstream patch or bug report? Sounds like it might be a relevant solution for other programs too.

Plasma (plasma41) wrote :

> Sounds like it might be a relevant solution for other programs too.

I'd hesitate to call it a solution. It's a workaround at best.
The real solution here is a Stable Release Update to the libsdl2
package in Artful.

Quin (qreeves) wrote :

I wholeheartedly agree that libsdl2 should be updated, but from the standpoint of an individual project it is bad publicity to have your program crash on startup (and why we're all kind of mad that SDL did this rewrite for a minor patch release). People often don't investigate or understand that it isn't the fault of the project, but an underlying library they know nothing about.

Hans Joachim Desserud (hjd) wrote :

>I'd hesitate to call it a solution. It's a workaround at best.

Ah... yes, I only thought of it as a possible workaround. I could have been clearer. :)

Vej (vej) on 2018-03-04
Changed in libsdl2 (Ubuntu):
status: Confirmed → Triaged
Changed in libsdl2-mixer (Ubuntu):
status: Confirmed → Triaged
Changed in libsdl2 (Ubuntu):
importance: Undecided → High
Changed in libsdl2-mixer (Ubuntu):
importance: Undecided → High
Thomas Leavitt (u-tho4as-f) wrote :

This also affects the 1.0 release of Flare (www.flarerpg.org) when compiled from source. I ran into this a couple of days ago.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ioquake3 (Ubuntu):
status: New → Confirmed
Changed in openarena (Ubuntu):
status: New → Confirmed
Changed in redeclipse (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.