Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: audio hotswap v3 (PR#2319)
Home

[Freeciv-Dev] Re: audio hotswap v3 (PR#2319)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: audio hotswap v3 (PR#2319)
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 27 Jan 2003 15:58:21 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Per I. Mathisen wrote:
> On Mon, 20 Jan 2003, Rafa³ Bursig via RT wrote:
> 
>>Dnia 2003.01.20 16:24 Per I. Mathisen via RT napisa³(a):
>>
>>>I haven't tested it with the SDL client, and I made some changes to
>>>SDL initialization, so Rafal please look at this.
> 
> ...
> 
>>I don't know if calling SDL_QuitSubSystem(SDL_INIT_AUDIO) to quit will
>>be good method quit sdl ( normaly SDL_Quit() )
> 
> 
> I added SDL_Quit() with atexit, ensuring that it is only called on program
> exit. I think this is the right thing to do, as I don't see how the SDL
> client can handle a complete shutdown with SDL_Quit when we change sound
> plugin, while running SDL stuff in SDL_gui in the rest of the code... In
> any case, it works fine for me using SDL_QuitSubSystem() only.

What will happen if both gui-sdl and sdl-plugin call atexit(SDL_Quit)?

-----

I got a segfault after I changed plugins enough.  I got it first going 
SDL->ESD->none, then later going (IIRC) 
SDL->none->SDL->none->ESD->SDL->none.

(gdb) bt
#0  0x4055a129 in free () from /lib/libc.so.6
#1  0x404b3aba in MusicCMD_FreeSong () from /usr/lib/libSDL_mixer-1.2.so.0
#2  0x404b2c73 in Mix_FreeMusic () from /usr/lib/libSDL_mixer-1.2.so.0
#3  0x08063b4e in my_shutdown () at audio_sdl.c:163
#4  0x080817be in audio_shutdown () at audio.c:407
#5  0x40519744 in exit () from /lib/libc.so.6
#6  0x403f9b5f in SDL_Error () from /usr/lib/libSDL-1.2.so.0
#7  0x40517898 in sigaction () from /lib/libc.so.6
#8  0x404b3aba in MusicCMD_FreeSong () from /usr/lib/libSDL_mixer-1.2.so.0
#9  0x404b2c73 in Mix_FreeMusic () from /usr/lib/libSDL_mixer-1.2.so.0
#10 0x08063b4e in my_shutdown () at audio_sdl.c:163
#11 0x08080e2e in audio_select_plugin (name=0x81d01fc "none", fatal=false)
     at audio.c:145
#12 0x08080d5a in audio_select_plugin_callback (option=0x80fac78)
     at audio.c:123
#13 0x080b5b80 in option_ok_command_callback (widget=0x84a8f88, data=0x0)
     at gamedlgs.c:398

This is in the gtk-2.0 client.

jason




[Prev in Thread] Current Thread [Next in Thread]