bugGnash - The GNU Flash player - Bugs: bug #39987, gnash crashes after ~5 mins by...

 
 

bug #39987: gnash crashes after ~5 mins by playing yt videos with ffmpeg handler

Submitter:  Gabriele Giacone <gg0>
Submitted:  Sun 08 Sep 2013 11:37:41 PM UTC
   
 
Category:  video-ffmpeg Severity:  4 - Important
Release:  master Status:  Fixed
Privacy:  Public Assigned to:  strk
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 09 Sep 2013 03:52:09 PM UTC, comment #4: 

Fixed. Thanks.

Gabriele Giacone <gg0>
Group Member
Mon 09 Sep 2013 01:22:15 PM UTC, comment #3: 

Shoudl be fixed by
http://git.savannah.gnu.org/cgit/gnash.git/commit
/?id=db6268172bdb1bf5ab0fb3d03425d0ed7c7b65cf

Test welcome

Sandro Santilli <strk>
Group Member
Mon 09 Sep 2013 01:03:38 PM UTC, comment #2: 

Commit 514d488671aa3c987910fb93001defcc60a37528 is the likely culprit for the leak.

In that commit the variable "output", used to keep track of that needed to be freed, was removed.

See:
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -497,24 +497,16 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
 
     assert(inputSize);
 
-    const size_t bufsize = MAX_AUDIO_FRAME_SIZE;
+    size_t outSize = MAX_AUDIO_FRAME_SIZE;
 
     // TODO: make this a private member, to reuse (see NetStreamFfmpeg in 0.8.3)
-    boost::uint8_t* output;
-
-    output = reinterpret_cast<boost::uint8_t*>(av_malloc(bufsize));
-    if (!output) {
+    boost::int16_t* outPtr = reinterpret_cast<boost::int16_t*>(av_malloc(outSize));
+    if (!outPtr) {
         log_error(_("failed to allocate audio buffer."));
         outputSize = 0;
         return NULL;
     }
 
-    boost::int16_t* outPtr = reinterpret_cast<boost::int16_t*>(output);
-
-    // We initialize output size to the full size
-    // then decoding will eventually reduce it
-    int outSize = bufsize;
-

and

@@ -577,7 +572,6 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
         log_error(_("Upgrading ffmpeg/libavcodec might fix this issue."));
         outputSize = 0;
         av_freep(&frm);
-        av_free(output);
         return NULL;
     }
 

Sandro Santilli <strk>
Group Member
Mon 09 Sep 2013 05:31:26 AM UTC, comment #1: 

How's memory growing ? Did you forget to delete/free something in the latest ffmpeg refactoring ?
Can you reproduce with GST media ?

Valgrind and existing media tests may help, if not we need more tests for media !

Sandro Santilli <strk>
Group Member
Sun 08 Sep 2013 11:37:41 PM UTC, original submission:  

gnash 0.8.11~git20130903-2 0a5e717
Debian testing

Reproducible with all yt movies. Start playing one, after ~5 minutes it crashes.
Attached backtrace and launcher.

Gabriele Giacone <gg0>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29089:  bt.TheStoryOfEarth added by gg0 (52KiB - application/octet-stream)
file #29090:  gnash-debug-q9CcVm.sh added by gg0 (27KiB - text/x-sh)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by gg0 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-09 gg0 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2013-09-09 strk StatusNone Ready For Test
        Assigned toNone strk
    2013-09-08 gg0 Attached File- Added bt.TheStoryOfEarth, #29089
        Attached File- Added gnash-debug-q9CcVm.sh, #29090

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code