gst-launch-1.0 segmentation Fault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gst-launch-1.0 segmentation Fault

1,159 Views
jamalmohiuddin
Contributor III

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.. 

Thus, 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...

Labels (4)
0 Kudos
3 Replies

768 Views
jamalmohiuddin
Contributor III

Thanks for your reply.. What is the difference between those versions..

0 Kudos

768 Views
igorpadykov
NXP Employee
NXP Employee

difference is described on

trac.gateworks.com/wiki/Yocto/gstreamer

0 Kudos

768 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jamal

you are using gstreamer-imx version, there are also nxp imx-gst1.0-plugins,

for details please refer to:  trac.gateworks.com/wiki/Yocto/gstreamer

Alternatively one can try nxp imx-gst1.0-plugins, described in nxp linux documentation:

http://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0-LINUX-DOCS&Parent_nodeId=133769948107170617... 

i.MX 6 / i.MX 7 Series Software and Development Tool|NXP 

as for gstreamer-imx, issue can be posted on meta-fsl-arm mailing list, so that someone

familiar with it could try to assist you.
https://lists.yoctoproject.org/listinfo/meta-freescale

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos