[x264-devel] Segmentation fault while using x264enc on wandboard-dual
Tejas Shah
tpshah1 at asu.edu
Thu Jan 16 23:29:45 CET 2014
Hello,
I am using yocto to create image and cross-compile plugins for my board
wandboard-dual. To use x264, I enabled x264 inside the configuration file
and it cross-compiled for me. Now when I am trying to use x264enc with
gstreamer, my usb camera attached with the board crashes with segmentation
fault error. I have tested the camera before with other plugins to capture
the video and they have worked properly. I wanted to know if the problem is
already solved or would like help from you to be able to solve it.
Here is the segmentation fault error I got with the command I am running:
Everything in blue are the commands I ran on the board and red is the error.
root at wandboard-dual:~# gst-launch v4l2src num-buffers=500 ! video/x-raw-yuv
! queue ! ffmpegcolorspace ! queue ! x264enc ! matroskamux ! filesink
location=outputh264.mp4 sync=false
Setting pipeline to PAUSED
...
Pipeline is live and does not need PREROLL
...
Setting pipeline to PLAYING
...
New clock:
GstSystemClock
Caught SIGSEGV accessing address
0x915
#0 0x40502bf4 in ??
()
#1 0x40502be4 in ??
()
#2 0x40502be4 in ??
()
Spinning. Please run 'gdb gst-launch 2392' to continue debugging, Ctrl-C
to qui
t, or Ctrl-\ to dump core.
To see the reason I was getting the error, I cross-compiled image with
developing tools. I have enabled developing tools in configuration file to
be able to use as following:
EXTRA_IMAGE_FEATURES += "dbg-pkgs \
dev-pkgs \
tools-sdk \
tools-debug \
tools-profile \
"
After installing the developing tools, I ran the following:
root at wandboard-dual:/home# gdb
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-poky-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file gst-launch
Reading symbols from /usr/bin/gst-launch...Reading symbols from
/usr/bin/.debug/
gst-launch...done.
done.
(gdb) run v4l2src num-buffers=500 ! video/x-raw-yuv ! queue !
ffmpegcolorspace !
queue ! x264enc ! matroskamux ! filesink location=outputh264.mp4 sync=false
Starting program: /usr/bin/gst-launch v4l2src num-buffers=500 !
video/x-raw-yuv
! queue ! ffmpegcolorspace ! queue ! x264enc ! matroskamux ! filesink
location=o
utputh264.mp4 sync=false
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
process 1641 is executing new program: /usr/bin/gst-launch-0.10
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/lib/libthread_db.so.1".
Setting pipeline to PAUSED
...
[New Thread 0x4133f460 (LWP
1644)]
[New Thread 0x41b3f460 (LWP
1645)]
[New Thread 0x42695460 (LWP
1646)]
Pipeline is live and does not need PREROLL
...
Setting pipeline to PLAYING
...
New clock:
GstSystemClock
[New Thread 0x438c2460 (LWP
1647)]
[New Thread 0x440c2460 (LWP
1648)]
[New Thread 0x448c2460 (LWP
1649)]
[New Thread 0x45dff460 (LWP
1650)]
Program received signal SIGSEGV, Segmentation
fault.
[Switching to Thread 0x45dff460 (LWP
1650)]
0x40989e6c in x264_vbv_lookahead (keyframe=<optimized
out>,
num_frames=<optimized out>, frames=<optimized out>, a=<optimized
out>,
h=<optimized out>) at
encoder/slicetype.c:1297
warning: Source file is more recent than
executable.
1297 frames[next_nonb]->i_planned_type[idx] =
frames[cur_nonb]->i
_type;
(gdb) bt
#0 0x40989e6c in x264_vbv_lookahead (keyframe=<optimized
out>,
num_frames=<optimized out>, frames=<optimized out>, a=<optimized
out>,
h=<optimized out>) at
encoder/slicetype.c:1297
#1 x264_slicetype_analyse (h=h at entry=0x42edc7d0,
intra_minigop=intra_minigop at entry=1) at
encoder/slicetype.c:1681
#2 0x409bf7e8 in x264_lookahead_slicetype_decide (h=h at entry=0x42edc7d0)
at
encoder/lookahead.c:85
#3 0x409bf8d0 in x264_lookahead_thread
(h=0x42edc7d0)
at
encoder/lookahead.c:113
#4 0x4027106c in start_thread (arg=0x45dff460) at
pthread_create.c:314
#5 0x4035a810 in ?? () at
../ports/sysdeps/unix/sysv/linux/arm/clone.S:97
from
/lib/libc.so.6
#6 0x4035a810 in ?? () at
../ports/sysdeps/unix/sysv/linux/arm/clone.S:97
from
/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Basically it is the following line that is causing the problem for me:
http://git.videolan.org/?p=x264.git;a=blob;f=encoder/slicetype.c;h=22b2e914df77b8ec4c0ef91345d99fed4222bcd2;hb=HEAD#l1297
Please let me know on how I can solve this error.
Thanks
--Tejas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20140116/26cb8359/attachment.html>
More information about the x264-devel
mailing list