bugGnash - The GNU Flash player - Bugs: bug #27952, --disable-media doesn't disable...

 
 

bug #27952: --disable-media doesn't disable sound, but results in assertion failures

Submitted by:  Sandro Santilli <strk>
Submitted on:  Thu 05 Nov 2009 09:31:25 PM UTC  
 
Category: buildSeverity: 3 - Normal
Release: masterStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich 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)

Wed 11 May 2016 04:16:08 PM UTC, comment #14:

On current development version of Gnash, configuring with `--disable-media` does not result in build error, and attempts to play sounds and videos with the build now show a correct error message without any crash.

This was tested with following SWFs:

  • SWF with embeded event sound (PCM 44100 Hz 16-bit Mono, 1.0 sec)
  • SWF with embeded frame-synchronized stream sound (MP3 22050 Hz Stereo 64kbps, 10.0 sec)
  • SWF playing external event MP3 sound via `Sound.loadSound()` (MP3 44100 Hz Mono 32kbps CBR, 4.8 sec)
  • SWF playing external streaming MP3 sound loaded via `Sound.loadSound()` (MP3 44100 Hz Mono 32kbps CBR, 4.8 sec)
  • SWF with embeded frame-synchronized video (640x480 24fps FLV1 video, 22050 Hz Mono 32kbps MP3 audio, 10.0 sec)
  • SWF playing external streaming video via `NetStream.play()` (640x480 24fps 128kbps FLV1 video, 44100 Hz Mono 32kbps CBR MP3 audio, FLV container, 10.0 sec)

This bug could now be considered as fixed.

Gnash: 0.8.11dev (git c6da486 10-May-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Mon 09 May 2016 03:11:58 AM UTC, comment #13:

Patch for 0.8.10 is available at http://savannah.gnu.org/patch/?8993#comment3
The last post has a typo in the URL (wrong comment number).

Nutchanon Wetchasit <nachanon>
Mon 09 May 2016 03:09:41 AM UTC, comment #12:

Patch for Gnash 0.8.10 is now available too. See patch #8993 comment 3.

Gnash: 0.8.10 (patched against git)
System: Debian GNU/Linux 5.0 Lenny i386

Nutchanon Wetchasit <nachanon>
Sat 07 May 2016 03:14:10 AM UTC, comment #11:

Patches included, see patch #8993.

After applied the patch, configuring Gnash with `--disable-media` wouldn't result in build failure. And resulting build would't crash on playing sound; proper error messages will be displayed instead.

Gnash: 0.8.11dev (patched against git 484ca4c 29-Mar-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Tue 03 May 2016 05:29:07 PM UTC, comment #10:

I have tinkered around compilation problem on current Gnash git version, and found multiple issues that prevents Gnash from being successfully build with `--disable-media` configuration:

  • libsound's build script lacks provision to skip linking with libmedia. So it bails when there's no libmedia to link with.
  • ActionScript class `NetStream` does not exclude code correctly in absence of `USE_MEDIA` macro; causing compilation failure.
  • ActionScript class `NetStream` and `Sound` does not exclude all libmedia-related code in absence of `USE_MEDIA` macro; causing link failure in `libcore/.libs/libgnashcore.so` when there's no libmedia to link with.
  • libcore's `SoundStreamHeadTag` and `tag_loaders` module somehow uses libmedia's overloaded `ostream << audioCodecType` operator; causing link failure in `libcore/.libs/libgnashcore.so` when there's no libmedia to link with.

Gnash: 0.8.11dev (git 484ca4c 29-Mar-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Tue 03 May 2016 02:46:13 PM UTC, comment #9:

This is a timeline summary of this issue as far as I have tested (in forward chronological order):

Nutchanon Wetchasit <nachanon>
Tue 03 May 2016 02:39:45 PM UTC, comment #8:

On Gnash 0.8.9, the build process went on without error too. But as soon as Gnash run, it crashed without any output. (Tested by running `gui/gnash -vv -t 10 pcmplay.swf` from build tree)

GDB backtrace gathered from core dump:

Backtrace shows that in command line switches enumeration process, Gnash tries to tell libboost all available media handlers, as well as the default media handler to be used. As there are no media handler configured, `front()` method of the handler list (which is `std::vector`) returned `NULL`, causing null pointer dereference inside libboost code, and crashed Gnash.

Newer Gnash 0.8.10 has a provision for this; it's not crashing on this spot anymore.

Full GDB backtrace is attached as `pcmplay_gnash0.8.9.disable-media.gdb.log`. Configure options and test SWF file used is the same as previous post.

Gnash: 0.8.9 (git)
System: Debian GNU/Linux 5.0 Lenny i386

(file #37057)

Nutchanon Wetchasit <nachanon>
Tue 03 May 2016 08:10:40 AM UTC, comment #7:

See if you can find a good spot to add the USE_MEDIA conditional.
Probably from the caller of LiveSound.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 03 May 2016 07:49:19 AM UTC, comment #6:

On Gnash 0.8.10, the build process went on without error, but as soon as `pcmplay.swf` issued `Sound.start()` action, Gnash crashed.

Running `gui/gnash -vv -t 10 pcmplay.swf` from build tree:

Exerpt from GDB backtrace gathered from core dump:

Backtrace shows NULL pointer dereference in libsound's `LiveSound::CreateDecoder()` as it tries to call `mh.createAudioDecoder()` but the `MediaHandler mh` argument given to the function is `NULL`. My guess is because there's no media handler configured, and both `LiveSound` and its invoker (`EmbedSound`) didn't check for this possibility.

Full GDB backtrace is attached as `pcmplay_gnash0.8.10.disable-media.gdb.log`.

Configure options and test SWF file used is the same as previous post.

Gnash: 0.8.10 (git)
System: Debian GNU/Linux 5.0 Lenny i386

(file #37055)

Nutchanon Wetchasit <nachanon>
Tue 03 May 2016 06:35:23 AM UTC, comment #5:

From additional testing, I found that the old Gnash 0.8.8 release worked
correctly when trying to play sound on the build that is configured with
`--disable-media`.

`gnash -vv -t 10 pcmplay.swf`:

You'd see from above output that there is a message indicating
that corresponding media handler is not available:

Note:

  • Test SWF I used is `pcmplay.swf` (ActionScript playing 1.0-sec PCM 44100 Hz 16-bit Mono event sound) from file #34599 (bug #45722).
  • Configure command I used is `./configure --disable-testsuite --enable-gui=gtk --enable-renderer=agg --disable-media`

Gnash: 0.8.8 (git)
System: Debian GNU/Linux 5.0 Lenny i386

Nutchanon Wetchasit <nachanon>
Mon 02 May 2016 03:12:13 AM UTC, comment #4:

It turned out that old Gnash 0.8.10 does not have the compilation problem.
(But it crashes if it tries to play audio)

I have done git bisect test on `--disable-media` compilation failure problem
(484ca4c bad -> 0.8.10 good), and it got quite messy as there were several
different compilation and autogen error around that time.

The bisect test narrows the cause of compilation failure to these
five consecutive commits (from last to first):

I'm not sure how to narrow them further, since all of them seems to be
closely related, and they all failed in autogen script (except the top one).

System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Wed 27 Apr 2016 05:27:03 AM UTC, comment #3:

On current git version, configuring Gnash with `--disable-media` option
causes the build process to fail.

The configure command I used was a plain `./configure --disable-media`.
Configuration and build logs are attached as `configure-disable-media.484ca4c.zip`.

Gnash: 0.8.11dev (git 484ca4c 29-Mar-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

(file #37002)

Nutchanon Wetchasit <nachanon>
Mon 08 Nov 2010 07:23:23 PM UTC, comment #2:

It's a configure switch

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 08 Nov 2010 06:17:01 PM UTC, comment #1:

that is an option for Gnash or when compiling?

Maximiliano Castañón Araneda <maximi89>
Thu 05 Nov 2009 09:31:25 PM UTC, original submission:

When media are disabled but sound is not there's an assertion
failure whenever sound is attempted to be used.

Sandro Santilli <strk>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #37057:  pcmplay_gnash0.8.9.disable-media.gdb.log added by nachanon (19kB - text/x-log - GDB backtrace from Gnash 0.8.9 (with `--disable-media` build flag) playing `pcmplay.swf`)
file #37055:  pcmplay_gnash0.8.10.disable-media.gdb.log added by nachanon (111kB - application/octet-stream - GDB backtrace from Gnash 0.8.10 (with `--disable-media` build flag) playing `pcmplay.swf`)
file #37002:  configure-disable-media.484ca4c.zip added by nachanon (22kB - application/x-zip-compressed - Configuration an build logs from Gnash 0.8.11dev git 484ca4c with `--disable-media`)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nachanon (Updated the item)
  • -unavailable- added by maximi89 (Posted a comment)
  • -unavailable- added by strk (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 11 May 2016 06:24:50 PM UTCstrkCategoryNone=>build
      ReleaseNone=>master
      StatusNone=>Fixed
      Assigned toNone=>strk
      Open/ClosedOpen=>Closed
    Tue 03 May 2016 02:39:45 PM UTCnachanonAttached File-=>Added pcmplay_gnash0.8.9.disable-media.gdb.log, #37057
    Tue 03 May 2016 07:49:19 AM UTCnachanonAttached File-=>Added pcmplay_gnash0.8.10.disable-media.gdb.log, #37055
    Wed 27 Apr 2016 05:27:03 AM UTCnachanonAttached File-=>Added configure-disable-media.484ca4c.zip, #37002

    Back to the top


    Powered by Savane 3.1-cleanup