bugGnash - The GNU Flash player - Bugs: bug #24834, Gnash aborts when the audio device...

 
 

bug #24834: Gnash aborts when the audio device is busy

Submitted by:  Bastiaan Jacques <bjacques>
Submitted on:  Fri 14 Nov 2008 01:48:52 AM UTC  
 
Category: soundSeverity: 4 - Important
Release: trunkStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 18 Nov 2008 10:32:58 AM UTC, comment #3:

Abort fixed.

Benjamin Wolsey <bwy>
Project Member
Fri 14 Nov 2008 06:05:57 PM UTC, comment #2:

I committed a patch that simply doesn't use
a sound handler if it can't be used...
It'd have the same side-effects of running with -r1
which is much better then aborting anyway.

Committed revision 10280.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 14 Nov 2008 11:54:12 AM UTC, comment #1:

Ah, yes. I considered this eventuality.
Basically what I did was moving the audio initialization
at SDL sound handler construction time rather then later.
Before, some user code made assumptions as to when
the audio initialization would have taken place, whihc
would have been at on-needed basis (when sound is attempted
to be played).
The exception would still be thrown, but maybe some users
(not all) would catch it.

You get an abort because nobody catches the exception
on construction time. It should be the Player's duty
to do so, and fall-back to use NO sound handler.

Would be easy to do so.
One problem thouh, is you'd never get an (say) onSoundCompleted
call as sound will NEVER be completed if we use NullSoundHandler
and never manually fetch the samples.

The only way to really fix this is one of these:

- Have NullSoundHandler fire its own samples-consuming thread
- Have libcore consume samples manually in main thread, and throw them away if there's no registered VirtualAudioCard

We don't have a VirtualAudioCard yet, so option 2 is still
not possible, and would result in weird side-effects.
For example, is sound is not consumed, NetStream will never
complete...

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 14 Nov 2008 01:48:52 AM UTC, original submission:

This is OpenBSD where only one program can access the audio device (unless one uses ESD, I guess). At any rate, SDL will fail to open the device and throw an apparently uncaught exception.

#0 0x07e064a5 in kill () from /usr/lib/libc.so.49.0
#1 0x07e5217f in abort () at /usr/src/lib/libc/stdlib/abort.c:68
#2 0x0c40903c in __cxxabiv1::__terminate () from /usr/local/lib/libboost_date_time-mt.so.1.0
#3 0x0c409070 in std::terminate () from /usr/local/lib/libboost_date_time-mt.so.1.0
#4 0x0c4091b9 in __cxa_throw () from /usr/local/lib/libboost_date_time-mt.so.1.0
#5 0x01e178c7 in gnash::sound::SDL_sound_handler::initAudio (this=0x8baf0800)
at /home/bastiaan/gnash/trunk/libsound/sdl/sound_handler_sdl.cpp:102
#6 0x01e17bb1 in SDL_sound_handler (this=0x8baf0800, wavefile=@0xcfbd2bf4)
at /home/bastiaan/gnash/trunk/libsound/sdl/sound_handler_sdl.cpp:110
#7 0x01e18d60 in gnash::sound::create_sound_handler_sdl (wave_file=@0xcfbd2bf4)
at /home/bastiaan/gnash/trunk/libsound/sdl/sound_handler_sdl.cpp:279
#8 0x1c094fd7 in gnash::Player::init_sound (this=0xcfbd2b98) at /home/bastiaan/gnash/trunk/gui/Player.cpp:176
#9 0x1c095793 in gnash::Player::run (this=0xcfbd2b98, argc=3, argv=0xcfbd2c64, infile=@0xcfbd2b58, url=@0xcfbd2b78)
at /home/bastiaan/gnash/trunk/gui/Player.cpp:304
#10 0x1c07ad5e in main (argc=3, argv=0xcfbd2c64) at /home/bastiaan/gnash/trunk/gui/gnash.cpp:462

Bastiaan Jacques <bjacques>
Project Member

 

(Note: upload size limit is set to 16384 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 bwy (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bjacques (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):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 18 Nov 2008 10:32:58 AM UTCbwyStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 14 Nov 2008 06:05:57 PM UTCstrkStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1