bugGnash - The GNU Flash player - Bugs: bug #23275, Sound.loadSound does not play

 
 

bug #23275: Sound.loadSound does not play

Submitted by:  Johan Euphrosine <proppy>
Submitted on:  Sat 17 May 2008 12:10:53 PM UTC  
 
Category: soundSeverity: 4 - Important
Release: NoneStatus: 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.

 

(Jump to the original submission Jump to the original submission)

Sat 15 Nov 2008 10:14:28 AM UTC, comment #18:

Thanks a lot for addressing this issue.

I just tested successfully to play http://proppy.aminche.com/soundswiff/pokerSounds.swf with gnash trunk:
proppy@pain ~/Desktop/proppy/gnash-trunk $ ./gui/gnash -v http://proppy.aminche.com/soundswiff/pokerSounds.swf
RcInitFile: couldn't open file: /usr/local/etc/gnashrc
RcInitFile: couldn't open file: /home/proppy/.gnashrc
12925:3061999392] 11:12:13 ERROR: Couldn't find pixmap file: GnashG.png

    • (lt-gtk-gnash:12925): WARNING **: Couldn't find pixmap file: GnashG.png

12925:3061999392] 11:12:13 SECURITY: Checking security of URL 'http://proppy.aminche.com/soundswiff/pokerSounds.swf'
12925:3061999392] 11:12:13 SECURITY: Load from host proppy.aminche.com granted (default)
12925:3061999392] 11:12:14 SECURITY: Checking security of URL 'http://proppy.aminche.com/soundswiff/player_arrive.mp3'
12925:3061999392] 11:12:14 SECURITY: Load from host proppy.aminche.com granted (default)
12925:3061999392] 11:12:14 ERROR: The best available resampler is 'audioresample'. Please install gstreamer-ffmpeg 0.10.4 or newer, or you may experience long delays in audio playback!
12925:3060964240] 11:12:14 ERROR: No samples decoded from input of 137256464 bytes
p

Johan Euphrosine <proppy>
Thu 13 Nov 2008 09:49:26 AM UTC, comment #17:

Inlined instructions in the wiki page
http://wiki.gnashdev.org/MiscMingAll as strk advised on #gnash
irc.

Johan Euphrosine <proppy>
Thu 13 Nov 2008 09:21:49 AM UTC, comment #16:

Hi, I repaired the link on:
http://wiki.gnashdev.org/MiscMingAll
http://proppy.aminche.com/gnash/gnash.html#[[How%20to%20write%20a%20MiscMingAll%20based%20testcase]]

Hope that helps.

Johan Euphrosine <proppy>
Thu 13 Nov 2008 04:52:53 AM UTC, comment #15:

proppy - could you please update wiki link for ming test documentation , that is, step by step introduction to start writing TestCase using MiscMingAll:
http://proppy.aminche.com/gnash/gnash.html#%5B ...lots of HTML escaped gibberish

Tonko Juricic <tonko>
Wed 29 Oct 2008 04:23:48 PM UTC, comment #14:

Committed the sound completed probe patch improved to also dispatch the onSoundComplete.
Mind you: this only works for dynamically loaded sounds (both streaming and event atm). Poker sound is one of these cases.

Committed revision 10193.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 29 Oct 2008 09:31:49 AM UTC, comment #13:

The poll-for-completed idea works. I've implemented locally.
Now tracking a segfault in FFMPEG handler (when linked against FFMPEG-svn) so will commit after that.

Attached is a patch if proppy wants to test :)
Doesn't implement the call to onSoundCompleted yet, but would be trivial to add..
The test shoudl verify that sound from pokerSound comes out
whereas it doesn't without the patch.

(file #16747)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Sat 25 Oct 2008 08:38:08 AM UTC, comment #12:

Reassigned to myself as I got more knowlege about Suond.
One thing is: the 'streaming' parameter of loadMovie
makes the sound play w/out needing any call to .start
if true, or needs .start if false.
Theoretically, if false, loadSound should download the whole
sound and turn it into an event sound...

In any case, onSoundComplete should be triggered when sound
has finished playing.
So, my idea is: in order to implement onSoundComplete with
current threading model, we'll need to have a timer check
for 'sound done' event.
The timer, in turn, owuld keep the Sound instance alive,
no matter any other reference.

The keep-alive thing wuold fix this bug.
Probably, it would also NOT delete a sound instance created
as a local variable of a function (which is instead deleted with pp) but we may still consider that a feature more then a compatibility bug...

Sandro Santilli <strk>
Project MemberIn charge of this item.
 Spam posted by an anonymous
Mon 08 Sep 2008 03:29:48 PM UTC, comment #11:

I don't think this bug should hold a release, so downgraded
from Blocker to Important. I'm not working on it anymore
either...

Sandro Santilli <strk>
Project MemberIn charge of this item.
 Spam posted by an anonymous
Tue 24 Jun 2008 01:17:18 PM UTC, comment #10:

Now I know that the pokerSound.swf is assigning the Sound
instance to a function-local register.

Using swfmill and changing register count from 4 to 0 forces
use of global registers. With global registers both gnash and the proprietary player keep the instance alive and thus sound.

Function-local registers, pp seem to keep alive, gnash doesn't.
I also tried to print value of a function-local register
before assigning to it. It's undefined on second call, so even
if alive must be cleaned up before use.

I wonder if it makes any sense to reproduce such behaviour
as it might leave allocated a lot of things that are really
not possible to access anymore.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 20 Jun 2008 01:59:13 PM UTC, comment #9:

To recap:

If you create a Sound instance and assign it to a function
local variable, the proprietary player doesn't play it
as well (destroyed by GC). This is tested with Ming.

If you store the sound instance reference to a timeline
variable it keeps alive and plays in pp. Again, tested with Ming.

The above works correctly in gnash (same behaviour as pp).

Now, the difference is when doing something with registers.
Don't know what yet.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 20 Jun 2008 10:02:20 AM UTC, comment #8:

I confirm GC-related issue:

GNASH_GC_TRIGGER_THRESHOLD=1000 <--- you always hear the sound
GNASH_GC_TRIGGER_THRESHOLD=0 <--- you never hear the sound

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 20 Jun 2008 10:00:11 AM UTC, comment #7:

Alright, I'm starting to belive this is due to the GC.
Basically, for pokerSound, the Sound object is a member
of a sprite timeline, but the sprite it is attached to
is NOT registered to global instance list in that it has

  1. frames thus nothing to do on advance.

This is just an assumption, but gdb tells me the GC
is deleting the sound object before it has a chance
to play so might make sense..

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 19 Jun 2008 11:42:05 PM UTC, comment #6:

Attached the small patch dropping the SWF loader thread
and the MediaParser loader thread.
The only remaining is SDL, as I suspected ...
And no way to drop that, so we can only fix it up (seems time after all).

(file #15880)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 19 Jun 2008 11:36:18 PM UTC, comment #5:

The code is conceptually correct now.
Only problem is a race condition somewhere between MediaParser
and SDL sound handler. I dropped the SWF loader thread
and problem is still there...

You can verify by hitting ^R with GTK gui (restart).
Sometime works, sometime doesn't...

I bet on SDL sound handler.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 19 Jun 2008 10:15:46 PM UTC, comment #4:

Alright, I confirm SOund.start() is NOT required to start
a sound. loadSound should do, and .start() would just restart
or seek to a specified location in seconds.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 19 Jun 2008 10:12:09 PM UTC, comment #3:

The crash is fixed. Now for the original bug:
I confirm gnash doesnt' play it. It requires a call
to Sound.start() for now, it seems that's not necessarely
what it should wait for..

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 22 May 2008 08:17:38 AM UTC, comment #2:

I've committed a fix for the crashing part of this bug.

Bastiaan Jacques <bjacques>
Project Member
Sat 17 May 2008 12:30:49 PM UTC, comment #1:

Increased to 'security' because of the Ffmpeg segfault in head - the sound not playing is not so important.

Benjamin Wolsey <bwy>
Project Member
Sat 17 May 2008 12:10:53 PM UTC, original submission:

When compiled with MTASC:
http://proppy.aminche.com/soundswiff/pokerSounds.as
Motion-Twin ActionScript2 Compiler 1.13 - (c)2004-2007 Motion-Twin
Using:
mtasc -swf pokerSounds.swf -main -header 800:600:20 pokerSounds.as

And played using:
proppy@ippiki:~/Desktop/soundswiff$ gnash -v http://proppy.aminche.com/soundswiff/pokerSounds.swf
8166] 14:01:09: SECURITY: Load from host proppy.aminche.com granted (default).
8166] 14:01:10: SECURITY: Load from host proppy.aminche.com granted (default).
8166] 14:01:10: ERROR: start: seeking to offset failed
Main loop ended, cleaning up
Any segfault past this message is likely due to improper threads cleanup.

No sound is played.

Work fine with the pp.

According to bwy and strk:
(01:44:49 PM) bwy: segfault with head (ffmpeg).
(01:47:07 PM) bwy: Can you submit a bug report marked 'Security')?
(01:48:35 PM) bwy: That's just terrible..
(01:48:37 PM) bwy: .
(01:51:18 PM) proppy: bwy: sure
(01:52:00 PM) bwy: Valgrind gives about 10 pages of errors, but it seems all due to carrying on after ffmpeg has failed.
(02:09:14 PM) strk: kind of valgrind-clean with gstreamer

proppy@ippiki:~/Desktop/soundswiff$ gnash -V
Gnash 0.8.2
Copyright (C) 2005-2008 Free Software Foundation, Inc.
Gnash comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of Gnash under the terms of the GNU General
Public License. For more information, see the file named COPYING.
Build options 0.8.2
Target:
Renderer: agg - GUI: GTK - Media handler: gst
Configured with: CFLAGS=-Wall -g -Werror-implicit-function-declaration -O2 --host=i486-linux-gnu --build=i486-linux-gnu --prefix=/usr --mandir=/share/man --infodir=/share/info --enable-plugin --enable-gui=gtk,kde --enable-cygnal --enable-gstreamer --enable-media=gst --enable-renderer=agg --with-npapi-plugindir=/lib/gnash --enable-shared=yes --enable-sdk-install --without-swfdec-testsuite --disable-rpath --enable-lotsa-warnings --without-gcc-arch --without-ming
CXXFLAGS: -g -O2 -pthread -pthread -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -fvisibility-inlines-hidden
Gstreamer version is: 0.10.18

Johan Euphrosine <proppy>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #16747:  SoundProbe.patch added by strk (3KiB - text/x-patch)
file #15880:  nothread.diff added by strk (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tonko (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bjacques (Updated the item)
  • -unavailable- added by bwy (Updated the item)
  • -unavailable- added by proppy (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 19 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 16 Nov 2008 04:44:07 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 29 Oct 2008 04:23:48 PM UTCstrkStatusIn Progress=>Ready For Test
    Wed 29 Oct 2008 09:31:49 AM UTCstrkAttached File-=>Added SoundProbe.patch, #16747
    Sat 25 Oct 2008 09:31:09 AM UTCstrkStatusConfirmed=>In Progress
    Sat 25 Oct 2008 08:38:08 AM UTCstrkAssigned toNone=>strk
    Mon 08 Sep 2008 03:29:48 PM UTCstrkSeverity5 - Blocker=>4 - Important
      StatusIn Progress=>Confirmed
      Assigned tostrk=>None
    Thu 19 Jun 2008 11:42:05 PM UTCstrkAttached File-=>Added nothread.diff, #15880
      Severity3 - Normal=>5 - Blocker
    Thu 19 Jun 2008 10:15:46 PM UTCstrkCategorycore=>sound
      Severity6 - Security=>3 - Normal
      StatusConfirmed=>In Progress
    Thu 19 Jun 2008 10:12:08 PM UTCstrkStatusReady For Test=>Confirmed
      Assigned tobjacques=>strk
    Thu 22 May 2008 08:17:08 AM UTCbjacquesStatusNone=>Ready For Test
      Assigned toNone=>bjacques
    Sat 17 May 2008 12:22:10 PM UTCbwySeverity3 - Normal=>6 - Security

    Back to the top


    Powered by Savane 3.1-cleanup1