Issue415

Title crashes in sdl if tux dies and kill many bots while exploding
Priority bug Status resolved
Assigned To Keywords
Linked issues Watchers

Submitted on 2011-07-27 10h58 by matthiaskrgr, last changed by matthiaskrgr.

Files
File name Uploaded Type Edit Remove
MapEdarchive.tar.gz matthiaskrgr, 2011-07-27.10:58:21 application/x-gzip
Messages
Author: matthiaskrgr Date: 2011-07-27   10h58
When I load the attached savegame with sdl mode and let tux die, he kills bots
while exploding and then the game crashes. (if it doesn't, try Load latest  and
wait a little)

This does not happen with when I use -n -q  (sdl + no sound)

r4881
Author: matthiaskrgr Date: 2011-07-27   10h58
While crashing, I once got this output:


Hello, this is FreedroidRPG, version 0.14.1+svn.
This seems to be a development version, so we'll exit on floating point exceptions.
Video system type: x11.
Using screen resolution 640 x 480.
Extract bot parts

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: get_program_index_with_name.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
FreedroidRPG could not find the program name above in the program spec array!

If you encounter this message, please inform the Freedroid developers
about the problem, by either

  sending e-mail to:
    freedroid-discussion AT lists.sourceforge.net
  mention it to someone of the developers on our IRC channel:
    channel: #freedroid on irc.freenode.net
  post on our forum at:
    https://sourceforge.net/apps/phpbb/freedroid
  report a bug on our tracker at:
    https://sourceforge.net/tracker/?group_id=54521&atid=474016

Thanks a lot!

Freedroid will terminate now to draw attention to the problems it could
not resolve.  Sorry if that interrupts a major game of yours...

----------------------------------------------------------------------
Termination of freedroidRPG initiated...Thank you for playing freedroidRPG.
Author: matthiaskrgr Date: 2011-07-27   10h59
But I usually get something like

$ ./src/freedroidRPG -n

Hello, this is FreedroidRPG, version 0.14.1+svn.
This seems to be a development version, so we'll exit on floating point exceptions.
Video system type: x11.
Using screen resolution 640 x 480.
ALSA lib pcm.c:7316:(snd_pcm_recover) underrun occurred


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '301'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '303'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/item_sounds/Item_Drop_Sound_2.ogg' channel: '306'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '307'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/item_sounds/drop_potion_sound.ogg' channel: '309'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '310'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '313'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/item_sounds/Item_Drop_Sound_2.ogg' channel: '315'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '317'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '319'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '321'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '324'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/item_sounds/Item_Drop_Sound_2.ogg' channel: '339'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------


SoundSampleFileName: 'effects/bot_sounds/death_sound_123.ogg' channel: '340'
Mix_GetError(): Invalid channel number 

----------------------------------------------------------------------
Freedroid has encountered a problem:
In function: play_sound_cached_pos.
FreedroidRPG package and version number: freedroidrpg 0.14.1+svn.
				        The SDL mixer was unable to register an effect on given channel.
The problem mentioned above is not fatal, we continue the execution.
----------------------------------------------------------------------
print_trace:  Obtained 15 stack frames.
print_trace:  Obtaining symbols now done.
./src(print_trace+0x12) [0x4442f2]
/lib/x86_64-linux-gnu/libc.so.6(+0x33d80) [0x7fb067b80d80]
/usr/lib/libSDL-1.2.so.0(SDL_UpperBlit+0x1a) [0x7fb068189c7a]
./src(display_image_on_screen+0x1d9) [0x439269]
./src(display_image_on_map+0x58) [0x439838]
./src(PutBlast+0x12f) [0x45798f]
./src(blit_nonpreput_objects_according_to_blitting_list+0x129) [0x457af9]
./src(AssembleCombatPicture+0x2e6) [0x458976]
./src(ThouArtDefeated+0x1be) [0x438e3e]
./src(CheckIfCharacterIsStillOk+0x4e) [0x43ed0e]
./src(move_tux+0x12) [0x440862]
./src(Game+0x76) [0x44edc6]
./src(main+0x15a) [0x44ef7a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7fb067b6beff]
./src() [0x415389]

print_trace():  received SIGSEGV!

----------------------------------------------------------------------
Termination of freedroidRPG initiated...Thank you for playing freedroidRPG.
Author: matthiaskrgr Date: 2011-07-27   11h02
I was unable to reproduce the bug with valgrind.
Author: ahuillet Date: 2011-07-27   11h04
This looks like a buffer overflow corrupting the stack.
Author: matthiaskrgr Date: 2011-07-27   11h07
The game sometimes crashes even before all bots died.
Author: matthiaskrgr Date: 2011-07-27   11h09
When I had bot states displayed, the game crashed a bit 'earlier' after tux
exploded in comparison to bot statues being hidden.
Author: matthiaskrgr Date: 2011-07-27   11h39
I assume this is related to playing several sounds at a time.

This is supported by the fact that I couldn't get the game crash at -q -n  and
with valgrind.
Author: matthiaskrgr Date: 2011-07-27   13h07
Fixed in r4883. Thanks!
History
Date User Action Args
2011-07-27 13:07:10matthiaskrgrsetstatus: open -> resolved
messages: + msg1344
2011-07-27 11:39:35matthiaskrgrsetmessages: + msg1334
2011-07-27 11:09:33matthiaskrgrsetmessages: + msg1333
2011-07-27 11:07:38matthiaskrgrsetmessages: + msg1332
2011-07-27 11:04:39ahuilletsetmessages: + msg1331
2011-07-27 11:02:09matthiaskrgrsetmessages: + msg1330
2011-07-27 10:59:34matthiaskrgrsetmessages: + msg1329
2011-07-27 10:58:49matthiaskrgrsetmessages: + msg1328
2011-07-27 10:58:21matthiaskrgrcreate