Segmentation fault from libgstjpeg.so 1.4.4

jshank jim at theshanks.net
Mon Feb 1 11:31:22 PST 2016


I'm running a gstreamer pipeline from a Logitech QuickCam Pro 9000 via python
resulting in a Segmentation Fault. I'm trying to fix this while still using
the pre-built packages as much as possible. Looks like omxh264enc in the 1.6
version freezes video for me after about 5 seconds so I trade one plugin
problem for a much bigger one.

Linux carpi 4.1.16-v7+ #833 SMP Wed Jan 27 14:32:22 GMT 2016 armv7l
GNU/Linux

*Package Info*
 gst-inspect-1.0 jpegdec
Factory Details:
  Rank                     primary (256)
  Long-name                JPEG image decoder
  Klass                    Codec/Decoder/Image
  Description              Decode images from JPEG format
  Author                   Wim Taymans <wim at fluendo.com>

Plugin Details:
  Name                     jpeg
  Description              JPeg plugin library
  Filename                
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstjpeg.so
  Version                  1.4.4
  License                  LGPL
  Source module            gst-plugins-good
  Source release date      2014-11-06
  Binary package           GStreamer Good Plugins (unknown Debian
derivative)
  Origin URL               http://packages.qa.debian.org/gst-plugins-good1.0

*GDB output*
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x719ff460 (LWP 30516)]
0x76069008 in gst_adapter_masked_scan_uint32_peek ()
   from /usr/lib/arm-linux-gnueabihf/libgstbase-1.0.so.0
(gdb) bt
#0  0x76069008 in gst_adapter_masked_scan_uint32_peek ()
   from /usr/lib/arm-linux-gnueabihf/libgstbase-1.0.so.0
#1  0x76069118 in gst_adapter_masked_scan_uint32 ()
   from /usr/lib/arm-linux-gnueabihf/libgstbase-1.0.so.0
Cannot access memory at address 0xf25d
#2  0x75e2a2b4 in ?? ()
   from /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstjpeg.so
Cannot access memory at address 0xf25d
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


*Relevant Python*
import os, time, threading, gps, gi, sys
from gi.repository import GObject
from gi.repository import Gst as gst
from gps import *
from time import localtime, strftime
from datetime import timedelta
gi.require_version('Gst', '1.0')
sys.settrace 

GObject.threads_init()
gst.init(None)
rearcam_pipeline = gst.Pipeline()
# USB/Rear Camera
video_source1 = gst.ElementFactory.make('v4l2src', 'rearcam')
camera1caps =
gst.Caps.from_string("image/jpeg,width=960,height=720,framerate=15/1")
camerafilter1 = gst.ElementFactory.make("capsfilter", "filter1")
camerafilter1.set_property("caps", camera1caps)

decode1 = gst.ElementFactory.make('jpegdec', 'decode')

textoverlay1 = gst.ElementFactory.make('textoverlay','textoverlay')
overlay_text = "Getting GPS Fix"
textoverlay1.set_property('text',overlay_text)
textoverlay1.set_property('halignment', 'left')
textoverlay1.set_property('valignment', 'bottom')
textoverlay1.set_property('shaded-background', True)
textoverlay1.set_property('font-desc', 'serif,monospace condensed 8')

encode1 = gst.ElementFactory.make('omxh264enc', 'encode')
encode1.set_property('control-rate', 'variable') #VBR(1)
encode1.set_property('target-bitrate', 800000)

parser1 = gst.ElementFactory.make('h264parse', 'parser')

muxer1 = gst.ElementFactory.make('matroskamux', 'muxer')

sink1 = gst.ElementFactory.make('filesink', 'filesink')
filename1 =  strftime("rearcam-%Y%d%m-%H%M", localtime())
path = "/home/pi/usb"
print "sending video to {}/{}".format(path, filename1)
sink1.set_property('location', "{}/{}.mkv".format(path, filename1))

# Ensure all elements were created successfully.
if (not rearcam_pipeline or not video_source1 or not textoverlay1 or not
encode1 or not parser1 or not muxer1 or not sink1):
    print('Not all elements could be created.')
    exit(-1) 
# Add our elements to the pipeline.
rearcam_pipeline.add(video_source1)
rearcam_pipeline.add(camerafilter1)
rearcam_pipeline.add(decode1)
rearcam_pipeline.add(textoverlay1)
rearcam_pipeline.add(encode1)
rearcam_pipeline.add(parser1)
rearcam_pipeline.add(muxer1)
rearcam_pipeline.add(sink1)

# Link our elements together.
video_source1.link(camerafilter1)
camerafilter1.link(decode1)
decode1.link(textoverlay1)
textoverlay1.link(encode1)
encode1.link(parser1)
parser1.link(muxer1)
muxer1.link(sink1)



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Segmentation-fault-from-libgstjpeg-so-1-4-4-tp4675584.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list