After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705018 - flacenc: segfault when trying to encode from alac decoded file
flacenc: segfault when trying to encode from alac decoded file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.8
Other Linux
: Normal normal
: 1.0.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-28 11:15 UTC by Ivo Anjo
Modified: 2013-07-28 20:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core dump after segfault (714.01 KB, application/x-bzip)
2013-07-28 11:15 UTC, Ivo Anjo
Details

Description Ivo Anjo 2013-07-28 11:15:17 UTC
Created attachment 250293 [details]
core dump after segfault

I've been trying to debug https://bugs.launchpad.net/soundconverter/+bug/913204 , and discovered that flacenc sometimes segfaults when the input for the encode comes from an alac-encoded source.

Initially I thought that this happened with every alac file (it does from my personal collection), but when searching for samples online most worked. I finally found one who doesn't:
http://thesixteendigital.com.s3.amazonaws.com/testfiles/Hallelujah%20lossless.m4a
from
http://www.thesixteendigital.com/testfiles/

So I can "play" this file with
gst-launch-1.0 filesrc location="Hallelujah lossless.m4a" name=src ! decodebin name=decoder ! audiorate ! audioconvert ! audioresample ! vorbisenc ! decodebin ! pulsesink
but when I try to play it with
gst-launch-1.0 filesrc location="Hallelujah lossless.m4a" name=src ! decodebin name=decoder ! audiorate ! audioconvert ! audioresample ! flacenc ! decodebin ! pulsesink
(replacing vorbisenc with flacenv)

I immediately get
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

(gst-launch-1.0:17477): GStreamer-CRITICAL **: gst_structure_get: assertion `GST_IS_STRUCTURE (structure)' failed

(gst-launch-1.0:17477): GStreamer-CRITICAL **: gst_structure_get_name: assertion `structure != NULL' failed
Caught SIGSEGV accessing address 0x8
Spinning.  Please run 'gdb gst-launch- 1.0 17477' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

I've tested this on Ubuntu 13.04 and 13.10 snapshot, with gstreamer versions 0.10.36, 1.0.6 and 1.0.8 and always get the same problem. Attached is a core file from one of my runs.
Comment 1 Sebastian Dröge (slomo) 2013-07-28 16:10:20 UTC
commit c12c9e76326a8a9616d9c3221cb2ec5a5cacf7a9
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Sun Jul 28 18:09:33 2013 +0200

    flacenc: Fix handling of image tags
    
    The caps should be used to get the mimetype and there is
    only an info structure for the GstSample if the image-type
    is not NONE.

commit 2fa5c708f360865205bbfaf07a9f370613f30af9
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Sun Jul 28 18:04:32 2013 +0200

    flacenc: Don't crash if there is no image tag information
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705018
Comment 2 Ivo Anjo 2013-07-28 20:05:15 UTC
Wow, that was fast, thanks :)