Segmentation fault while camera preview

Hi,

I am trying to preview camera (ov5640) on DSI display using following command:
media-ctl -d /dev/media0 -l ‘“msm_csiphy0”:1->“msm_csid0”:0[1],“msm_csid0”:1->“msm_ispif0”:0[1],“msm_ispif0”:1->“msm_vfe0_rdi0”:0[1]’

media-ctl -d /dev/media0 -V ‘“ov5640 4-0078”:0[fmt:UYVY2X8/1920x1080 field:none],“msm_csiphy0”:0[fmt:UYVY2X8/1920x1080 field:none],“msm_csid0”:0[fmt:UYVY2X8/1920x1080 field:none],“msm_ispif0”:0[fmt:UYVY2X8/1920x1080 field:none],“msm_vfe0_rdi0”:0[fmt:UYVY2X8/1920x1080 field:none]’

Preview:-
DISPLAY=:0 gst-launch-1.0 -v v4l2src device=/dev/video0 ! ‘video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1’ ! glimagesink

And I am getting following segmentation fault:

Setting pipeline to PAUSED …
No protocol specified
Pipeline is live and does not need PREROLL …
Got context from element ‘sink’: gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"(GstGLDisplayGBM)\ gldisplaygbm0";
Setting pipeline to PLAYING …
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, colorimetry=(string)1:4:7:1, interlace-mode=(e
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, colorimetry=(string)1:4:7:1, interlace-e
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, cole
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLUploadElement:gluploadelement0.GstPad:src: caps = video/x-raw(memory:GLMemory), format=(string)UYVY, width=(int)1920, height=(int)1080, framD
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement:glcolorconvertelement0.GstPad:src: caps = video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)1920, height=(inD
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLColorBalance:glcolorbalance0.GstPad:src: caps = video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)1920, height=(int)1080, framerD
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink.GstPad:sink: caps = video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)1920, height=(int)1080, framerate=(fractionD
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLColorBalance:glcolorbalance0.GstPad:sink: caps = video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)1920, height=(int)1080, frameD
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement:glcolorconvertelement0.GstPad:sink: caps = video/x-raw(memory:GLMemory), format=(string)UYVY, width=(int)1920, height=(iD
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLUploadElement:gluploadelement0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)e
/GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0.GstGhostPad:sink: caps = video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, colorimetry=(string)1:4:7e
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, colorimetry=(string)1:4:7:1, interlacee
[ 1301.585900] msm 1a00000.mdss: unsupported pixel format: XR30
Caught SIGSEGV
#0 0x0000ffff9b3b80b8 in poll () from /lib/aarch64-linux-gnu/libc.so.6
#1 0x0000ffff9b4e177c in ?? ()
#2 0x0000ffff9b4e1b98 in g_main_loop_run ()
#3 0x0000ffff9b672b54 in gst_bus_poll ()
#4 0x0000aaaae5281be0 in ?? ()
#5 0x0000aaaae5280a74 in ?? ()
#6 0x0000ffff9b312d24 in __libc_start_main ()
#7 0x0000aaaae52810f8 in ?? ()
Spinning. Please run ‘gdb gst-launch-1.0 2454’ to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:00:19.398587879
Setting pipeline to PAUSED …
Setting pipeline to READY …

I am getting same issue with videotestsrc also.

kernel version used : 4.14.0

Thanks in advance.

Well are you running the command as root?

Could you try:

su linaro
DISPLAY=:0 gst-launch-1.0 -v videotestsrc ! 'video/x-raw,format=UYVY,width=640,height=480,framerate=30/1' ! glimagesink

Hi,

I was not running it with root and it worked with root privileges.
Thanks a lot.