"Floating Point Exception" in Ubuntu 10.04

5 replies [Last post]
keyx
User offline. Last seen 13 years 22 weeks ago. Offline
Joined: 2010-07-01
Posts: 5

Hi guys!

I've installed Hedgewars 0.9.13-1 from the Ubuntu repositories on my Ubuntu 10.04 64 bit system.

The program doesn't start by double-klicking on its icon. No error-message. If I type "hedgewars" into the console, I get this Error-message: "Floating point exception" and the game doesn't start. Nothing else than this appears in the console.

I already tried several times to install and reinstall hedgewars and I tried to use the version of playdeb.net -> same problem.

Help me! Thanks!
keyx

keyx
User offline. Last seen 13 years 22 weeks ago. Offline
Joined: 2010-07-01
Posts: 5

k, I've got a solution!

For some reason, my pulseaudio server, who should be enabled was by default disabled (but I had got sound, strange).

I can enable it per "pulseaudio" in the console and hedgewars works. Just a workaround, I will find out how to implement pulseaudio in my Ubuntu properly. Big Grin

Thanks!

nemo
nemo's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2009-01-28
Posts: 1861

keyx, my guess is that SDL was failing over to accessing the sound device directly, and, if your sound card was a cheap one that doesn't support hardware mixing, it was already locked by some other app using it.

So, yeah, you would need something to do software mixing.

Such as pulse.

Sorry, I saw you bring it up on chat, but you disconnected before I could ask you to test w/ sound disabled in Hedgewars ini file.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

bananaoomarang
bananaoomarang's picture
User offline. Last seen 9 years 31 weeks ago. Offline
Joined: 2009-10-16
Posts: 82

keyx allegedly wrote:

k, I've got a solution!

For some reason, my pulseaudio server, who should be enabled was by default disabled (but I had got sound, strange).

I can enable it per "pulseaudio" in the console and hedgewars works. Just a workaround, I will find out how to implement pulseaudio in my Ubuntu properly. Big Grin

Thanks!

why won't pulse just go away. It wins my prize for most annoying thing ever coded.

Pit has finaly returned. FINALY.

adamOfDc949
User offline. Last seen 13 years 35 weeks ago. Offline
Joined: 2010-08-05
Posts: 2

Workaround seems to work fine, but I want this to actually be fixed. I tried compiling the latest version of libSDL[1] from source and the problem persists. I just contacted the maintainers of the SDL lib with extensive details including the line of code which causes the crash.

For those interested, the problem is on line 758 of music.c (music->fade_steps = ms/ms_per_step; ) because ms_per_step is zero. Fixing that does avoid the crash, but my sound still didn't work, so there's more to it than just that, but I'm just trying to take things one step at a time.

I hope to work with the libSDL maintainers to get their library fixed. I also want to work with the Hedgewars maintainers if there's any code which needs to be changed there. This game is great, and I want it to work straight out of the box all of the time! Smile

[1] http://www.libsdl.org/projects/SDL_mixer/

adamOfDc949
User offline. Last seen 13 years 35 weeks ago. Offline
Joined: 2010-08-05
Posts: 2

In the meantime, here's a patch which will at least stop libSDL from crashing. It's not the best fix, and the sound still doesn't work, but at least the game will start. music.c is in the root directory of the libSDL source.

--- music.c 2010-08-06 14:01:32.664720027 -0400
+++ music.c 2010-08-10 15:28:46.913000349 -0400
@@ -755,7 +755,10 @@
music->fading = MIX_NO_FADING;
}
music->fade_step = 0;
- music->fade_steps = ms/ms_per_step;
+ if(ms_per_step != 0)
+ music->fade_steps = ms/ms_per_step;
+ else
+ music->fade_steps = ms/1000; // avoid divide by zero exception!

/* Play the puppy */
SDL_LockAudio();
@@ -1014,7 +1017,12 @@

SDL_LockAudio();
if ( music_playing) {
- int fade_steps = (ms + ms_per_step - 1)/ms_per_step;
+ int fade_steps = 1;
+ if(ms_per_step != 0)
+ fade_steps = (ms + ms_per_step - 1)/ms_per_step;
+ else
+ fade_steps = 100;
+
if ( music_playing->fading == MIX_NO_FADING ) {
music_playing->fade_step = 0;
} else {

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]