SDL applications no sound, high cpu usage, can't quit without freezing the application

Bug #442535 reported by klerfayt on 2009-10-04
44
This bug affects 10 people
Affects Status Importance Assigned to Milestone
libsdl1.2 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: wesnoth

I hear no music or sound, wesnoth freezes after trying to close the game by pressing button "quit". Removing settings folder and starting the application fresh doesn't help:
rm -r .wesnoth1.6/

It also freezes after trying to untick all sound options in sound preferences (buttons sound, music, unit sound, something else...)

At all time it attempts to use 100% cpu

ProblemType: Bug
Architecture: i386
Date: Sun Oct 4 23:05:23 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/games/wesnoth
NonfreeKernelModules: nvidia
Package: wesnoth-core 1:1.6.5-1
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: wesnoth
Uname: Linux 2.6.31-11-generic i686

tags: added: freeze karmic wesnoth

How strange, I rebooted Karmic and now Wesnoth is working fine - low cpu usage, I can hear music and all sounds as usual. Quitting game doesn't freeze it anymore.

Could be pulseaudio bug? Marking as invalid.

Changed in wesnoth (Ubuntu):
status: New → Invalid
Don Atkinson (donatkinson) wrote :

I downloaded the 9.10 beta last night with no issues. In attempting to play Wesnoth today I found the same issues as klerfayt- High CPU usage, stuttering sound at times, and eventually losing all sound. When attempting to quit the game it freezes on that screen, leaving no option but holding the power button down to do a fresh reboot. I've tried several reboots, I'm hoping my problem simply goes away like Klerfayt the Lucky. But I need my Wesnoth! What is life without it?

Don Atkinson (donatkinson) wrote :

I'm adding info to my previous post in an effort to be more helpful- :) Rebooting my 9.10 Beta, I was able to make it to the sound preferences in Wesnoth (music, turn bell, sound effects & interface sounds), turning them all off. With no sound enabled at all, I was able to play an entire scenario of Wesnoth, and quit the game without a problem. I was running Jaunty 9.04 previously with no issues with Wesnoth, so can I assume there was a change in the audio software? I just tried another scenario with all the sound preferences enabled- all is well for a few minutes, and then CPU usage spikes to 100% and stays there. Any effort to click off the sound again or quit the game is not possible. Wesnoth freezes up tight. I hope this helps, I'm still poking around myself. :)

@Don
How did you install wesnoth? I used new software center, after that added wesnoth-music package with Synaptic then I noticed error message in console about missing music track. I also removed all campaigns except heir to the throne. But this did not change anything for the better before simple reboot.

Don Atkinson (donatkinson) wrote :

*grin* Hi, klerfayt... I just happened to check here and you wrote just minutes ago. lol I had Wesnoth installed already under Jaunty. Last night I did uninstall it and re-installed it using the Synaptic Package Manager with the same results; enabling the sound settings seems to max out the CPU, and when it does it is very random when it occurs. Sometimes the CPU will max out and then drop to reasonable levels before spiking again 30 seconds later. If I go into the System Monitor and stop Pulse Audio then bring Wesnoth back up, I can play with little CPU usage without a problem (without sound, of course). I have a relatively new Toshiba A205 laptop with 2 gigs of memory and never had a problem playing Wesnoth before. At this point its a puzzler, but knowing the Ubuntu community (and the huge Wesnoth community) I'm pretty sure an answer is on the way. Thanks for asking.

Don Atkinson (donatkinson) wrote :

FIXED. Thanks to-> http://sweemengs-tech-world.blogspot.com/2008/08/wesnoth-sound-issue.html

sudo apt-get install libsdl1.2-esd

Wesnoth now plays fine, with sound, and very low CPU usage. And it appears libsdl1.2-esd no longer exists, libsdl1.2debian-esd was used automatically instead. During loading this software you are warned there are dependency issues, and gives you a list of other files it relies on. I copied and pasted all of this data in my notes in case I find I need these additional files. But at this point, streaming radio plays fine, MP3 plays fine. I'll post again if I find any problems. :)

Don Atkinson (donatkinson) wrote :

Hmm... not fixed. After playing for days, Wesnoth just froze up again. I'll keep looking. *sigh*

* Don Atkinson <email address hidden> [2009-10-09 04:13:28 CEST]:
> Hmm... not fixed. After playing for days, Wesnoth just froze up again.
> I'll keep looking. *sigh*

 I'm not convinced that it has to do with wesnoth itself. Can you please
try other sdl applications (that play music, of course) and check wether
they show similar behavior - it would surprise me if wesnoth should be
the only application that has these issues.

 Thanks. :)
Rhonda

Thank YOU, Rhonda- I'll tell you where I've been since my posts above... :) Pulse Audio is re-enabled, I believe that is not the problem. Maybe. Anyhow, I went back into Software Sources in my new Karmic beta software and changed my download source from Columbia.edu to the United States server. This gave me hundreds of new download files *sigh*. Then, to be sure, I checked the Canonical main server and downloaded 2 MORE updates. I rebooted after the downloads and the CPU usage is very well behaved now, very low. But still, (and it has happened twice now) my sound will stop in Wesnoth. When this happens I can save my progress in the game, but I cannot quit Wesnoth. I have to kill it in my system monitor processes and then reload from my save. All through this event my CPU usage is stable and very low, never spiking. I just did a quick search on 'sdl' (so you know I tech savvy *I* am, lol) and it appears to be similar to Microsoft's DirectX. I don't know if I have any other games that use it. Or do all games use it? Anyhow, in a quick trip to Wesnoth's Forum it appears there are some bugs here and there on all operating systems that are being worked on, some issues seemingly very similar to mine. At this point Wesnoth is playable and I love it dearly, tons of fun. I know I've played it for hundreds of hours- perhaps I have a problem. :P

Karmic Koala is still in Beta, Wesnoth is always improving, I'm patient and can't live without it... so it will all work out in time. In the meantime I'll try to see if I can find an 'sdl' application! :)

Don

 Hi again!

* Don Atkinson <email address hidden> [2009-10-09 21:34:29 CEST]:
> But still, (and it has happened twice now) my sound will stop in
> Wesnoth. When this happens I can save my progress in the game, but I
> cannot quit Wesnoth. I have to kill it in my system monitor processes
> and then reload from my save. All through this event my CPU usage is
> stable and very low, never spiking. I just did a quick search on
> 'sdl' (so you know I tech savvy *I* am, lol) and it appears to be
> similar to Microsoft's DirectX. I don't know if I have any other
> games that use it. Or do all games use it?

 Yes, it can to some degree be compared with DirectX. About other games
that use it I did take alook at the reverse dependencies of the
libsdl-mixer1.2 package and maybe you have one of these games in use:

 blobwars, blockattack, blockout2, briquolo, ceferino, crack-attack
(like that one ;)), cuyo, enigma, fillets-ng (cool puzzle game),
frozen-bubble, icebreaker, mirrormagic, pachi, pingus, pokerth,
supertransball2, supertux, widelands, wormux, xmoto ...

 Aren't all but should be enough to get you started. If you want to have
a full list, install the dctrl-tools package and use the following
commands:

sudo sync-available
grep-available -FDepends libsdl-mixer1.2 -a -FSection games -sPackage

 That will give you a complete list of packages that depend on
libsdl-mixer1.2 :)

 So long!
Rhonda

Rhonda, I tried Fillets (yes, a cool puzzle game). You were correct, it is not only Wesnoth. The first time I played Fish Fillets, after a span of time (perhaps 10 minutes) I lost my audio in the game and could not quit the game so I killed the process. The second time I played the game (watching my CPU resources) it spiked to 100% and stayed there until I quit the game, and I *could* quit. I'm starting to think sdl and pulse audio don't play nice together.

So... I can do without pulse audio, but not sdl. Is that the answer Rhonda?

And thanks so much for that suggestion. At least I know my Wesnoth is not sick. :)

Don

Don Atkinson (donatkinson) wrote :

After a generally irritating few days, I found a solution that works for me. I left pulseaudio for a bit and I still had great sound- the problem was my laptop's spinning volume control was inoperative. I would have to open a gizmo in my task bar to control the volume. So, back to pulseaudio today, and all my controls are back. But of course, Wesnoth and other sdl-type games would run the CPU to 100% usage and crash Wesnoth once again at some random time. BUT- I found if I opened Wesnoth with the sound disabled (all 4 buttons checked OFF in Wesnoth Preferences- Sound Effects, Music, Turn Bell and User Interface Sounds), loaded the scenario I wanted to play, and THEN went back to Preferences>Sound and enabled all 4 sound buttons, my CPU usage was very low- and most importantly, stayed low, and did not crash me once all night. Not the perfect answer, but until this SDL/Pulse Audio issue is resolved... I'm happy! I hope this helps some fellow Wesnoth addict out there. :)
Game On! (and protect your flanks)

Don Atkinson (donatkinson) wrote :

One last post... After changing the Source from the United States server to the Main (and 270-odd file downloads later) my Karmic Koala beta is running perfectly. I can load Wesnoth without any issues. Ubuntu fixes itself.

I got "high cpu usage + game freeze after pressing quit" again while testing one of the custom made campaigns in their add-on server. It all started then music stopped playing without any warning.
"killall wesnoth" didn't work, I had to use "kill -9 PID"

Greg (greg-humhost) wrote :

killall -9 wesnoth works.

I have had the 100% CPU usage since I started using Wesnoth 1.6 and Jaunty. (Prior to Jaunty I used wesnoth 1.4/1.5 and Ibex with no problems). I have been playing wesnoth on Ubuntu since Hoary (possibly Warty) with no problems. I thought the CPU usage problem was a wesnoth issue, I might install Ibex again just to see how wesnoth 1.6 plays on it. However, I suspect that it will run perfectly.

The 100% CPU usage was annoying, but easy to ignore. However, with the stable version of Koala, not only do I have the 100% cpu usage, sound fails, and the game refuses to close without a killall -9 wesnoth.

The "disabling sound, restarting, starting a game, enabling sound" trick works for me. Not sure how long it will hold, but it's better than nothing.

chuck (charlesr-harris) wrote :

This bug is still there. I can confirm that as have others posting after the change to invalid.

Changed in wesnoth (Ubuntu):
status: Invalid → Confirmed

* chuck <email address hidden> [2009-11-03 04:12:36 CET]:
> This bug is still there. I can confirm that as have others posting after
> the change to invalid.

 I expect you are using pulseaudio for your audio and don't have
libsdl1.2debian-pulseaudio installed. Can you please install the later
package and see wether this solves your problem? I'm quite confident
that it will.

 Thanks,
Rhonda

Please see LP #203158 for the long-standing fix that would have made this problem go away, or not pop up at all to start with. Installing libsdl1.2debian-pulseaudio is the proper fix for the issue but it's not wesnoth's job (or the job of any other SDL application) to fix your sound setup, sorry.

Thanks for your report anyway!
Rhonda

Changed in wesnoth (Ubuntu):
status: Confirmed → Invalid
chuck (charlesr-harris) wrote :

Shouldn't Wesnoth work out of the box on freshly installed Karmic Koala? It's not *my* sound setup, it's Karmic's. If libsdl1.2debian-pulseaudio is needed for Wesnoth on a standard install, then it is a dependency of Wesnoth. If it isn't a dependency, then that sure looks like a bug to me.

* chuck <email address hidden> [2009-11-03 16:47:09 CET]:
> Shouldn't Wesnoth work out of the box on freshly installed Karmic Koala?

 Of course it should.

> It's not *my* sound setup, it's Karmic's.

 Right, and that one is broken, please check the referenced bug report.
And actually, it is the way the sound setup on *your* system is handled,
even if it's done by regular karmic install. I don't decline that there
is a bug, far from it - it just isn't in wesnoth but in libsdl.

> If libsdl1.2debian-pulseaudio is needed for Wesnoth on a standard
> install, then it is a dependency of Wesnoth. If it isn't a dependency,
> then that sure looks like a bug to me.

 Erm, no, it's not that easy. wesnoth works with *any* SDL capable sound
system. Though, that sound system needs to be proper setup. wesnoth (and
other SDL applications) don't enforce any specific sound setup and
leaves you the choice. It's just an error in the default dependency
chain that is done within the *libsdl* packages that is causing the
troubles. There is nothing that wesnoth can do for you that isn't just a
dirty hack.

 Fixing it on the proper place is the right thing to do and the way to
go. Limiting users of wesnoth to pulseaudio isn't a proper way and I
definitely don't want to go down that road.

 Hope this was a bit more clear and understandable. :)
Rhonda

I have the same sound problems, but the game runs normal. But after a time, the damage numbers disappeared. I installed the unstable Version of BFW but the problem is the same. So its definetly a problem of Wesnoth.

snow (stormlord) wrote :

Sorry. Its NOT a problem of wesnoth.

The reason I changed this bug report status to invalid was because I assumed that the problem went away and it was only temporary glitch fixed with later updates.

I think it would be more appopriate to mark it again as new or duplicate of bug #203158. In the latter case it should be made sure that they are about the same problem, because I don't see any description of applications getting unresponsive there.

* klerfayt <email address hidden> [2009-11-04 16:36:15 CET]:
> The reason I changed this bug report status to invalid was because I
> assumed that the problem went away and it was only temporary glitch
> fixed with later updates.
>
> I think it would be more appopriate to mark it again as new or duplicate
> of bug #203158. In the latter case it should be made sure that they are
> about the same problem, because I don't see any description of
> applications getting unresponsive there.

 Would that make it possible to remove it from the wesnoth affects list?
Because launchpad still doesn't allow to unsubscribe from bugs making
duplicate bugs across several packages a pain for people subscribed to
a specific package getting flooded with messages that are unrelated to
the package at hand and can't get done within the package.

 From my undestanding the "fix" for this bug is clear: Installation of
libsdl1.2debian-pulseaudio solves the issue related to the SDL/audio
issue (and isn't wesnoth specific, thus the bug is invalid for the
wesnoth package).

 If marking it duplicated would actually speed up the fix in libsdl1.2
then I'm fine with it - but actually I don't see this coming. It's now
well over a year since the last comment to the bug that's meant to be
"triaged" which I consider a bit unfortunate and disappointing, frankly
spoken.

 So long!
Rhonda

Changed in wesnoth (Ubuntu):
status: Invalid → Confirmed
Rhonda D'Vine (rhonda) wrote :

Please install libsdl1.2debian-pulseaudio which fixes the issue relieable (if you use pulseaudio as your sound setup, which is the default). There is nothing from a wesnoth perspective we can do, pretty please raise your voices in bug #203158 to have it fixed on the proper place. Reopening this bug against the wesnoth package won't fix #203158 for you. :/

DiegoJ, setting it to confirmed without any additional comment won't get us anywhere. :)

Thanks,
Rhonda

Changed in wesnoth (Ubuntu):
status: Confirmed → Invalid
Sparrow (maly-wrobelek) on 2009-11-25
Changed in wesnoth (Ubuntu):
status: Invalid → Confirmed

* Sparrow <email address hidden> [2009-11-25 20:07:39 CET]:
> ** Changed in: wesnoth (Ubuntu)
> Status: Invalid => Confirmed

 Sparrow, DiegoJ, can you two pretty please elaborate on why you reopen
this bug? Did you two actually read what bug #203158 is about?
It would be pretty helpful if you have anything new to add to actually
also write that to the bug report when setting it back to confirmed, and
actually also could tell us what sound system you are using if you don't
use the default pulseaudio one - and if you use pulseaudio why the fix
to install libsdl1.2debian-pulseaudio doesn't seem to work for you?

 Thanks in advance,
Rhonda

Rhonda D'Vine (rhonda) on 2009-11-25
affects: wesnoth (Ubuntu) → libsdl1.2 (Ubuntu)
summary: - wesnoth no sound, high cpu usage, can't quit without freezing the
- application
+ SDL applications no sound, high cpu usage, can't quit without freezing
+ the application
DiegoJ (diegojromerolopez) wrote :

> Sparrow, DiegoJ, can you two pretty please elaborate on why you reopen
this bug? Did you two actually read what bug #203158 is about?

No, I haven't read that other bug, I'm sorry.

I've installed libsdl1.2-esd and Wesnoth works without problems.

So, I change (again) the bug to Invalid.

DiegoJ (diegojromerolopez) wrote :

Ummm, I can't change the status, it gives me a server error. I will try later.

Sparrow (maly-wrobelek) on 2009-11-25
Changed in libsdl1.2 (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers