[meta-freescale] gst-launch-1.0 segmentation Fault

Mohammad, Jamal M MohammadJamal.Mohiuddin at ncr.com
Wed May 24 03:39:03 PDT 2017


Hi,
We are using gst-launch in our application to stream the CSI over Display whenever it detects Signal and Stop the Streamer when there is no signal.. To find out whether gst-launch works well with many connects/disconnects, i was testing gst-launch functionality with the following simple code:
void MainLoop()
{
   char command[256];
   int ret = 0;
   int loopCount = 0;
   while(1)
   {
      memset(command, '\0', sizeof(command));
      sprintf(command, "/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &");
      ret = system(command);
      printf("StartStreamer: command=[%s], status:%d\n", command, ret);
      sleep(15);
      memset(command, '\0', sizeof(command));
      sprintf(command, "killall gst-launch-1.0");
      ret = system(command);
      printf("StopStreamer: command=[%s], status = %d\n", command, ret);
      sleep(15);
      loopCount++;
      printf("Loop Count:%d\n", loopCount);
      fflush(stdout);
   }
}

After running a loop count of about 2400+ it failed with segmentation Fault, in the next restart of the utility, it crashed at 551 Loop Count and then at 1300+ Loop Count..
Following is the Log at the stdout before segmentation Fault:
Loop Count:551
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:0
StopStreamer: command=[killall gst-launch-1.0], status = 4
Loop Count:276828289
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828290
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828291
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828292
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828293
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828294
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828295
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828296
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828297
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828298
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828299
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828300
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
StopStreamer: command=[killall gst-launch-1.0], status = 32512
Loop Count:276828301
StartStreamer: command=[/usr/bin/gst-launch-1.0 imxv4l2videosrc ! imxipuvideosink &], status:32512
[1]+ Segmentation fault ./startStop
I believe it is due to some memory corruption .. How can we resolve this issue...


Mohammad Jamal Mohiuddin
Software Engineer, Retail Hosp/HW
NCR Corporation India Pvt Ltd.
Cell: +91 9676096622
MohammadJamal.Mohiuddin at ncr.com | www.ncr.com<http://www.ncr.com>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20170524/2b9ea01f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture (Device Independent Bitmap) 1.jpg
Type: image/jpeg
Size: 1940 bytes
Desc: Picture (Device Independent Bitmap) 1.jpg
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20170524/2b9ea01f/attachment.jpg>


More information about the meta-freescale mailing list