bugGnash - The GNU Flash player - Bugs: bug #21195, Jeroen Wijering's Media Player...

 
 

bug #21195: Jeroen Wijering's Media Player collection does not work with Gnash 0.8.1

Submitted by:  Gergely Máté <gerymate>
Submitted on:  Sun 30 Sep 2007 01:38:06 PM UTC  
 
Category: videoSeverity: 6 - Security
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Discussion locked!

 

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

 Spam posted by an anonymous
 Spam posted by an anonymous
Tue 29 Jan 2008 04:47:08 PM UTC, comment #10:

I can't handle to segfault Gnash with url given in the
original submission, while the url in comment #2 doesn't
exist anymore.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 17 Dec 2007 12:32:29 PM UTC, comment #9:

Looking at the code, if the Sound instance gets removed before the thread started in loadSound gets a chance to execute we'd get exactly the problem you're mentioning.

I guess the main thread should wait for the spawned thread to be
actually executed, and also make sure to join it back when
destroyed, possibly notifying the will to quit to avoid long waits for it to finish.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 17 Dec 2007 12:23:10 PM UTC, comment #8:

Unfortunately the SoundFfmpeg implementation itself starts another thread... did you remove that thread too ?

Is it possible to do so ? We should have a compile-time define
to disable that thread.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Mon 12 Nov 2007 04:43:34 PM UTC, comment #7:

Loading in the same thread doesn't fix the segfault either, but it does give more valgrind information:

==20927== Thread 1:
==20927== Invalid read of size 4
==20927== at 0x8ACA2A2: av_open_input_stream (in /usr/lib64/libavformat.so.51.12.1)
==20927== by 0x51E2CE5: gnash::SoundFfmpeg::setupDecoder() (SoundFfmpeg.cpp:140)
==20927== by 0x51C0D56: gnash::sound_loadsound(gnash::fn_call const&) (Sound.cpp:447)
==20927== by 0x50C1821: gnash::builtin_function::operator()(gnash::fn_call const&) (builtin_function.h:81)
==20927== by 0x525038B: gnash::call_method(gnash::as_value const&, gnash::as_environment, gnash::as_object, int, int) (action.cpp:155)
==20927== by 0x5228F5E: gnash::SWF::SWFHandlers::ActionCallMethod(gnash::ActionExec&) (ASHandlers.cpp:3223)
==20927== by 0x524CD89: gnash::ActionExec::operator()() (ActionExec.cpp:344)
==20927== by 0x5116D18: gnash::swf_function::operator()(gnash::fn_call const&) (swf_function.cpp:337)
==20927== by 0x525038B: gnash::call_method(gnash::as_value const&, gnash::as_environment, gnash::as_object, int, int) (action.cpp:155)
==20927== by 0x5228F5E: gnash::SWF::SWFHandlers::ActionCallMethod(gnash::ActionExec&) (ASHandlers.cpp:3223)
==20927== by 0x524CD89: gnash::ActionExec::operator()() (ActionExec.cpp:344)
==20927== by 0x5116D18: gnash::swf_function::operator()(gnash::fn_call const&) (swf_function.cpp:337)
==20927== Address 0x10 is not stack'd, malloc'd or (recently) free'd

Benjamin Wolsey <bwy>
Project Member
Mon 12 Nov 2007 04:13:41 PM UTC, comment #6:

The fix fixes the delete[] error, but not the segfault.

The player really does work (both ffmpeg and gst) when it doesn't segfault.

Benjamin Wolsey <bwy>
Project Member
Mon 12 Nov 2007 03:16:43 PM UTC, comment #5:

Fix committed in CVS.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Sun 11 Nov 2007 09:26:48 PM UTC, comment #4:

Thomas, the valgrind reports is pretty clear.
In SoundFfmpeg.cpp, line 306 delete[]s output_data, which is set to 'ptr' in line 285. 'ptr' is delete[]d again on line 329.
Should be easy to fix.
Consider using smart pointers for memory management (Buffer?)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Sun 11 Nov 2007 01:36:52 PM UTC, comment #3:

For the mp3 player, valgrind gives:

==7910==
==7910== Thread 2:
==7910== Invalid free() / delete / delete[]
==7910== at 0x4C1DF39: operator delete[](void*) (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==7910== by 0x51E2F5A: gnash::SoundFfmpeg::getAudio(void, unsigned char, int) (SoundFfmpeg.cpp:329)
==7910== by 0x4E2CA09: gnash::SDL_sound_handler::sdl_audio_callback(void, unsigned char, int) (sound_handler_sdl.cpp:665)
==7910== by 0x881CB5C: (within /usr/lib64/libSDL-1.2.so.0.11.1)
==7910== by 0x8825BF6: (within /usr/lib64/libSDL-1.2.so.0.11.1)
==7910== by 0x8872A08: (within /usr/lib64/libSDL-1.2.so.0.11.1)
==7910== by 0x57782EF: start_thread (in /lib64/libpthread-2.6.1.so)
==7910== by 0x789AF9C: clone (in /lib64/libc-2.6.1.so)
==7910== Address 0x14BA1198 is 0 bytes inside a block of size 192,000 free'd
==7910== at 0x4C1DF39: operator delete[](void*) (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==7910== by 0x51E2F3C: gnash::SoundFfmpeg::getAudio(void, unsigned char, int) (SoundFfmpeg.cpp:306)
==7910== by 0x4E2CA09: gnash::SDL_sound_handler::sdl_audio_callback(void, unsigned char, int) (sound_handler_sdl.cpp:665)
==7910== by 0x881CB5C: (within /usr/lib64/libSDL-1.2.so.0.11.1)
==7910== by 0x8825BF6: (within /usr/lib64/libSDL-1.2.so.0.11.1)
==7910== by 0x8872A08: (within /usr/lib64/libSDL-1.2.so.0.11.1)
==7910== by 0x57782EF: start_thread (in /lib64/libpthread-2.6.1.so)
==7910== by 0x789AF9C: clone (in /lib64/libc-2.6.1.so)

then the segfault:

==7910== Thread 3:
==7910== Invalid read of size 4
==7910== at 0x8ACB2A2: av_open_input_stream (in /usr/lib64/libavformat.so.51.12.1)
==7910== by 0x51E3585: gnash::SoundFfmpeg::setupDecoder(gnash::SoundFfmpeg*) (SoundFfmpeg.cpp:135)
==7910== by 0x819ED5E: boost::function0<void, std::allocator<boost::function_base> >::operator()() const (in /usr/lib64/libboost_thread.so.1.33.1)
==7910== by 0x819EA0E: (within /usr/lib64/libboost_thread.so.1.33.1)
==7910== by 0x57782EF: start_thread (in /lib64/libpthread-2.6.1.so)
==7910== by 0x789AF9C: clone (in /lib64/libc-2.6.1.so)
==7910== Address 0x10 is not stack'd, malloc'd or (recently) free'd

It seems actually to be working apart from this; with valgrind it works slowly enough that some of the mp3 is played before the segfault.

Benjamin Wolsey <bwy>
Project Member
Tue 30 Oct 2007 07:41:09 AM UTC, comment #2:

These are looking a bit better now that ImplementsOp is partly working.

All three give:

7813] 08:35:20: DEBUG: No video data available for frame 0.
7813] 08:35:20: DEBUG: Video frame data is missing in frame 0

The mp3 player segfaults. Try clicking a few buttons (previous and next song) with the following URL:

http://www.jeroenwijering.com/upload/mp3player.swf?&file=/upload/projectopus.php&displayheight=120&thumbsinplaylist=true&height=260&width=300&backcolor=0x000000&frontcolor=0xffffff&lightcolor=0x0099CC&linktarget=_blank

The backtrace is nice and short:

#0 0x00002b87bc8fa2a2 in av_open_input_stream ()
from /usr/lib64/libavformat.so.51
#1 0x00002b87b907eb31 in gnash::SoundFfmpeg::setupDecoder (so=0xc005e0)
at SoundFfmpeg.cpp:135
#2 0x00002b87bbfccd5f in boost::function0<void, std::allocator<boost::function_base> >::operator() () from /usr/lib64/libboost_thread.so.1
#3 0x00002b87bbfcca0f in __cxa_pure_virtual ()
from /usr/lib64/libboost_thread.so.1
#4 0x00002b87b95a12f0 in start_thread () from /lib64/libpthread.so.0
#5 0x00002b87bb6c7f9d in clone () from /lib64/libc.so.6

Benjamin Wolsey <bwy>
Project Member
Mon 01 Oct 2007 02:36:05 PM UTC, comment #1:

All SWF8, which is not fully supported in head, and still less in 0.8.1.

The major obstacles to playing the video are likely:
UNIMPLEMENTED: static void gnash::SWF::SWFHandlers::ActionImplementsOp(gnash::ActionExec&)
UNIMPLEMENTED: MovieClip.setMask()

But they aren't the only unimplemented features used.

Benjamin Wolsey <bwy>
Project Member
Sun 30 Sep 2007 01:38:06 PM UTC, original submission:

JW on http://www.jeroenwijering.com/ offers three Flash based media players, a general Media Player, an MP3 player and an FLV player. All three are under a Creative Commons non-commercial license, and have plugins for a large selection of CMS. Hosting providers usually give JW Media Player as a Flash based addon component to hosting.
Therefore the collection is widely used by the blogger community, non-commercial sites, and commercial sites as well.

Here's a direct link: http://www.jeroenwijering.com/?item=JW_Media_Player

It would be pleasant to see this working with Gnash!

Gergely Máté <gerymate>

 

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 strk (Updated the item)
  • -unavailable- added by bwy (Posted a comment)
  • -unavailable- added by gerymate
  • -unavailable- added by gerymate (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 May 2008 06:46:48 AM UTCstrkDiscussion LockUnlocked=>Locked
    Tue 29 Jan 2008 04:47:08 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 12 Nov 2007 03:16:43 PM UTCstrkStatusConfirmed=>Ready For Test
      Assigned totgc=>strk
    Sun 11 Nov 2007 09:26:48 PM UTCstrkStatusNone=>Confirmed
    Tue 30 Oct 2007 09:55:48 AM UTCstrkSeverity3 - Normal=>6 - Security
      Assigned toNone=>tgc
    Tue 30 Oct 2007 07:41:09 AM UTCbwyCategoryrelease 0.8.1=>video
    Sun 30 Sep 2007 01:38:06 PM UTCgerymateCarbon-Copy-=>Added gerymate

    Back to the top


    Powered by Savane 3.1-cleanup1