bugFreeciv - Bugs: bug #20037, Pauses/hangs on client quit...

 
 
Show feedback again

bug #20037: Pauses/hangs on client quit related to sound plugin

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Tue 07 Aug 2012 07:29:03 PM UTC  
 
Category: clientSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: Operating System: GNU/Linux
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 07 Aug 2012 09:40:50 PM UTC, comment #2:

Hm. The hanging issue there was limited to connecting to an external server. I found my issue when spawning a new game from the client ("internal" server), starting it, and immediately quitting. I don't think I tried quitting from the start page (before any kind of network connection is attempted).

Jacob Nevins <jtn>
Project Administrator
Tue 07 Aug 2012 08:33:26 PM UTC, comment #1:

Also bug #15473

Marko Lindqvist <cazfi>
Project Administrator
Tue 07 Aug 2012 07:29:03 PM UTC, original submission:

For a while I've noticed that the Freeciv clients take ~2 seconds from my telling them to quit to the window actually going away, but hadn't investigated it.

Today I ended up in a situation where two users were logged in to the same machine, and one had "grabbed" the sound capability (a paused web video), such that the other user couldn't make sounds. In this situation, freeciv-gtk2 hangs indefinitely on quit (S2_3, S2_4, trunk). Adding debug narrowed the hang down to the shutdown() call in client/audio.c:audio_shutdown().

Other apps cope gracefully with this (admittedly rare) situation, so probably we can do better too.

This prompted me to investigate the area, and I found client/audio_sdl.c:my_stop() does this:

Which almost certainly explains the pause in the more common situation. Using "-P none" got rid of the pause.

I'm using the "freesounds" soundset, which has a looping "music_start", but that's not playing by the time I quit. Changing to "stdsounds" (which has no looping sounds/music), the issue is still there.

Unsorted thoughts:

  • The user probably doesn't care about waiting for a nice fade-out when they've told the game to quit.
  • If I quit in the pregame, when music is playing, I don't get a fade-out anyway; the music suddenly stops, then the program pauses for 2s, then quits.
  • Perhaps the 2000ms wait could be conditionalised on whether there's actually something playing.
Jacob Nevins <jtn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by jtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 07 Aug 2012 07:29:16 PM UTCjtnSummaryPauses/hangs at game end related to sound plugin=>Pauses/hangs on client quit related to sound plugin
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup