Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

[regression] segfault during a video call #3527

Closed
zetok opened this issue Jul 18, 2016 · 15 comments
Closed

[regression] segfault during a video call #3527

zetok opened this issue Jul 18, 2016 · 15 comments
Labels
C-bug The issue contains a bug report C-crash The issue contains a crash report M-video Affected Module: Video P-high
Milestone

Comments

@zetok
Copy link
Contributor

zetok commented Jul 18, 2016

Brief Description

OS: Gentoo Linux amd64
qTox version: 1.4
Commit hash: f970bb5
toxcore: 0.0.0
Qt: 5.5.1

Reproducible: Always

Steps to reproduce
  1. Start video call
  2. crash
Observed Behavior

segfault

Expected Behavior

video call should start

Additional Info

(links, images, etc go here)

bt:

[16:53:22.071] src/widget/form/chatform.cpp:324 : Debug: onAvStart
[16:53:22.073] src/widget/form/chatform.cpp:648 : Debug: creating netcam
[16:53:22.075] src/video/netcamview.cpp:88 : Debug: SIZER QRect(1625,0 24x20)
[swscaler @ 0x5555581c3660] Warning: data is not aligned! This can lead to a speedloss

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4676542 in ff_hscale8to15_8_ssse3 () from /usr/lib64/libswscale.so.3
(gdb) bt
#0  0x00007ffff4676542 in ff_hscale8to15_8_ssse3 () from /usr/lib64/libswscale.so.3
#1  0x00007ffff462993e in lum_h_scale (c=0x5555581c3660, desc=0x5555581e29e0, sliceY=<optimized out>, sliceH=14) at /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libswscale/hscale.c:41
#2  0x00007ffff465b9e0 in swscale (c=0x5555581c3660, src=<optimized out>, srcStride=<optimized out>, srcSliceY=<optimized out>, srcSliceH=<optimized out>, dst=0x7fffffffb200, dstStride=0x7fffffffb1d0)
    at /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libswscale/swscale.c:589
#3  0x00007ffff465ce07 in sws_scale (c=<optimized out>, srcSlice=<optimized out>, srcStride=<optimized out>, srcSliceY=<optimized out>, srcSliceH=<optimized out>, dst=<optimized out>, dstStride=0x555558100f40)
    at /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libswscale/swscale.c:1272
#4  0x00005555556476c7 in VideoFrame::convertToRGB24 (this=0x7fffb404e280, size=...) at src/video/videoframe.cpp:182
#5  0x0000555555646feb in VideoFrame::toQImage (this=0x7fffb404e280, size=...) at src/video/videoframe.cpp:83
#6  0x0000555555658ba3 in VideoSurface::paintEvent (this=0x5555580e9d20) at src/video/videosurface.cpp:168
#7  0x00007ffff40cbbf0 in QWidget::event (this=0x5555580e9d20, event=0x7fffffffb830) at kernel/qwidget.cpp:9044
#8  0x00007ffff407d19c in QApplicationPrivate::notify_helper (this=this@entry=0x555555dc1010, receiver=receiver@entry=0x5555580e9d20, e=e@entry=0x7fffffffb830) at kernel/qapplication.cpp:3716
#9  0x00007ffff4082dd2 in QApplication::notify (this=0x7fffffffdbe0, receiver=0x5555580e9d20, e=0x7fffffffb830) at kernel/qapplication.cpp:3499
#10 0x00007ffff361049c in QCoreApplication::notifyInternal (this=0x7fffffffdbe0, receiver=receiver@entry=0x5555580e9d20, event=event@entry=0x7fffffffb830) at kernel/qcoreapplication.cpp:965
#11 0x00007ffff40c403c in QCoreApplication::sendSpontaneousEvent (event=0x7fffffffb830, receiver=0x5555580e9d20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227
#12 QWidgetPrivate::sendPaintEvent (this=this@entry=0x555558117540, toBePainted=...) at kernel/qwidget.cpp:5625
#13 0x00007ffff40c475d in QWidgetPrivate::drawWidget (this=this@entry=0x555558117540, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5565
#14 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x5555581032f0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#15 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x5555581032f0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#16 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555556dff1b0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#17 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555556dff1b0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#18 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555556da38f0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#19 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555556da38f0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#20 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x5555563586a0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#21 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x5555563586a0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#22 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555556357700, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#23 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555556357700, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#24 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555555f988a0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#25 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555555f988a0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#26 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555555f983e0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#27 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555555f983e0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#28 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555555f96120, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#29 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=0x555555f96120, pdev=0x555557407500, rgn=..., offset=..., flags=flags@entry=5, sharedPainter=sharedPainter@entry=0x0, backingStore=0x5555563864f0)
    at kernel/qwidget.cpp:5617
#30 0x00007ffff408c932 in QWidgetBackingStore::doSync (this=this@entry=0x5555563864f0) at kernel/qwidgetbackingstore.cpp:1226
#31 0x00007ffff408ccf1 in QWidgetBackingStore::sync (this=0x5555563864f0) at kernel/qwidgetbackingstore.cpp:1032
#32 0x00007ffff40b3b12 in QWidgetPrivate::syncBackingStore (this=0x555555f96120) at kernel/qwidget.cpp:1902
#33 0x00007ffff40cbc60 in QWidget::event (this=0x555555f95fa0, event=0x555556acb520) at kernel/qwidget.cpp:8983
---Type <return> to continue, or q <return> to quit---
#34 0x00005555556980b3 in Widget::event (this=0x555555f95fa0, e=0x555556acb520) at src/widget/widget.cpp:1748
#35 0x00007ffff407d19c in QApplicationPrivate::notify_helper (this=this@entry=0x555555dc1010, receiver=receiver@entry=0x555555f95fa0, e=e@entry=0x555556acb520) at kernel/qapplication.cpp:3716
#36 0x00007ffff4082dd2 in QApplication::notify (this=0x7fffffffdbe0, receiver=0x555555f95fa0, e=0x555556acb520) at kernel/qapplication.cpp:3499
#37 0x00007ffff361049c in QCoreApplication::notifyInternal (this=0x7fffffffdbe0, receiver=0x555555f95fa0, event=event@entry=0x555556acb520) at kernel/qcoreapplication.cpp:965
#38 0x00007ffff3613b5b in QCoreApplication::sendEvent (event=0x555556acb520, receiver=<optimized out>) at kernel/qcoreapplication.h:224
#39 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x555555dc1180) at kernel/qcoreapplication.cpp:1593
#40 0x00007ffff3614094 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#41 0x00007ffff3668dd2 in postEventSourceDispatch (s=0x555555e1a6f0) at kernel/qeventdispatcher_glib.cpp:271
#42 0x00007fffeb654283 in g_main_dispatch (context=0x7fffdc0016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154
#43 g_main_context_dispatch (context=context@entry=0x7fffdc0016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769
#44 0x00007fffeb654570 in g_main_context_iterate (context=context@entry=0x7fffdc0016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840
#45 0x00007fffeb654642 in g_main_context_iteration (context=0x7fffdc0016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#46 0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x555555e02770, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#47 0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffffffdac0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#48 0x00007ffff3616e1e in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#49 0x00005555555b76aa in main (argc=3, argv=0x7fffffffdd48) at src/main.cpp:294
(gdb) t a a bt

Thread 16 (Thread 0x7fffbda08700 (LWP 4394)):
#0  0x00007ffff3186d6d in nanosleep () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007ffff6d649ee in Sleep (t=t@entry=1) at /var/tmp/portage/media-libs/openal-1.15.1-r2/work/openal-soft-1.15.1/Alc/helpers.c:412
#2  0x00007ffff6d6f64c in PulseProc (param=0x7fffb40252b0) at /var/tmp/portage/media-libs/openal-1.15.1-r2/work/openal-soft-1.15.1/Alc/backends/pulseaudio.c:825
#3  0x00007ffff6d64021 in StarterFunc (ptr=0x7fffb4041fd0) at /var/tmp/portage/media-libs/openal-1.15.1-r2/work/openal-soft-1.15.1/Alc/alcThread.c:96
#4  0x00007ffff317d614 in start_thread (arg=0x7fffbda08700) at pthread_create.c:334
#5  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 15 (Thread 0x7fffbce83700 (LWP 4393)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffefbc8e75 in poll (__timeout=932, __nfds=3, __fds=0x7fffac001730) at /usr/include/bits/poll2.h:46
#2  poll_func (ufds=0x7fffac001730, nfds=3, timeout=932, userdata=0x7fffb4008f90) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/thread-mainloop.c:69
#3  0x00007fffefbb9923 in pa_mainloop_poll (m=m@entry=0x7fffb4008e90) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/mainloop.c:844
#4  0x00007fffefbb9fe6 in pa_mainloop_iterate (m=0x7fffb4008e90, block=<optimized out>, retval=0x0) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/mainloop.c:926
#5  0x00007fffefbba0b0 in pa_mainloop_run (m=0x7fffb4008e90, retval=retval@entry=0x0) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/mainloop.c:944
#6  0x00007fffefbc8db9 in thread (userdata=0x7fffb40036b0) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/thread-mainloop.c:100
#7  0x00007fffe7b9c6dc in internal_thread_func (userdata=0x7fffb4009040) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulsecore/thread-posix.c:81
#8  0x00007ffff317d614 in start_thread (arg=0x7fffbce83700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 14 (Thread 0x7fffbd684700 (LWP 4392)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffefbc8e75 in poll (__timeout=-1, __nfds=3, __fds=0x7fffa800ada0) at /usr/include/bits/poll2.h:46
#2  poll_func (ufds=0x7fffa800ada0, nfds=3, timeout=-1, userdata=0x7fffb4003f50) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/thread-mainloop.c:69
#3  0x00007fffefbb9923 in pa_mainloop_poll (m=m@entry=0x7fffb40045c0) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/mainloop.c:844
#4  0x00007fffefbb9fe6 in pa_mainloop_iterate (m=0x7fffb40045c0, block=<optimized out>, retval=0x0) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/mainloop.c:926
#5  0x00007fffefbba0b0 in pa_mainloop_run (m=0x7fffb40045c0, retval=retval@entry=0x0) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/mainloop.c:944
#6  0x00007fffefbc8db9 in thread (userdata=0x7fffb4006a10) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulse/thread-mainloop.c:100
#7  0x00007fffe7b9c6dc in internal_thread_func (userdata=0x7fffb4004740) at /var/tmp/portage/media-sound/pulseaudio-8.0/work/pulseaudio-8.0/src/pulsecore/thread-posix.c:81
#8  0x00007ffff317d614 in start_thread (arg=0x7fffbd684700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7fffbeffd700 (LWP 2800)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffeb65450d in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fffb4003270, timeout=44, context=0x7fffb4000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:4135
#2  g_main_context_iterate (context=context@entry=0x7fffb4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3835
#3  0x00007fffeb654642 in g_main_context_iteration (context=0x7fffb4000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#4  0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x7fffb40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#5  0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffbeffcd60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007ffff3438904 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#7  0x00007ffff343e634 in QThreadPrivate::start (arg=0x7fffb007a290) at thread/qthread_unix.cpp:331
#8  0x00007ffff317d614 in start_thread (arg=0x7fffbeffd700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7fffbf7fe700 (LWP 2799)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffeb65450d in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fffb0086660, timeout=50, context=0x7fffb0000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:4135
#2  g_main_context_iterate (context=context@entry=0x7fffb0000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3835
#3  0x00007fffeb654642 in g_main_context_iteration (context=0x7fffb0000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#4  0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x7fffb00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
---Type <return> to continue, or q <return> to quit---
#5  0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffbf7fdd60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007ffff3438904 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#7  0x00007ffff343e634 in QThreadPrivate::start (arg=0x555555dcaac0) at thread/qthread_unix.cpp:331
#8  0x00007ffff317d614 in start_thread (arg=0x7fffbf7fe700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7fffbffff700 (LWP 2798)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffeb65450d in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fffb8003070, timeout=-1, context=0x7fffb8000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:4135
#2  g_main_context_iterate (context=context@entry=0x7fffb8000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3835
#3  0x00007fffeb654642 in g_main_context_iteration (context=0x7fffb8000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#4  0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x7fffb80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#5  0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffbfffed60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007ffff3438904 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#7  0x00007ffff343e634 in QThreadPrivate::start (arg=0x55555630fa70) at thread/qthread_unix.cpp:331
#8  0x00007ffff317d614 in start_thread (arg=0x7fffbffff700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fffc4c64700 (LWP 2713)):
#0  pthread_cond_timedwait () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007ffff343edf1 in QWaitConditionPrivate::wait_relative (time=30000, this=0x5555562b1f00) at thread/qwaitcondition_unix.cpp:126
#2  QWaitConditionPrivate::wait (time=30000, this=0x5555562b1f00) at thread/qwaitcondition_unix.cpp:134
#3  QWaitCondition::wait (this=this@entry=0x555556216670, mutex=mutex@entry=0x5555562b1d20, time=30000) at thread/qwaitcondition_unix.cpp:208
#4  0x00007ffff343ae51 in QThreadPoolThread::run (this=0x555556216660) at thread/qthreadpool.cpp:127
#5  0x00007ffff343e634 in QThreadPrivate::start (arg=0x555556216660) at thread/qthread_unix.cpp:331
#6  0x00007ffff317d614 in start_thread (arg=0x7fffc4c64700) at pthread_create.c:334
#7  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fffc566a700 (LWP 2712)):
#0  pthread_cond_wait () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fffd21fe353 in cnd_wait (mtx=0x555556088310, cond=<optimized out>) at /var/tmp/portage/media-libs/mesa-11.2.2/work/mesa-11.2.2/include/c11/threads_posix.h:159
#2  pipe_semaphore_wait (sema=0x555556088310) at /var/tmp/portage/media-libs/mesa-11.2.2/work/mesa-11.2.2/src/gallium/auxiliary/os/os_thread.h:259
#3  radeon_drm_cs_emit_ioctl (param=param@entry=0x555556087ee0) at /var/tmp/portage/media-libs/mesa-11.2.2/work/mesa-11.2.2/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c:688
#4  0x00007fffd21fd9db in impl_thrd_routine (p=<optimized out>) at /var/tmp/portage/media-libs/mesa-11.2.2/work/mesa-11.2.2/include/c11/threads_posix.h:87
#5  0x00007ffff317d614 in start_thread (arg=0x7fffc566a700) at pthread_create.c:334
#6  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffd99b4700 (LWP 2579)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffeb65450d in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fffcc002e70, timeout=-1, context=0x7fffcc000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:4135
#2  g_main_context_iterate (context=context@entry=0x7fffcc000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3835
#3  0x00007fffeb654642 in g_main_context_iteration (context=0x7fffcc000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#4  0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x7fffcc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#5  0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffd99b3d60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007ffff3438904 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#7  0x00007ffff343e634 in QThreadPrivate::start (arg=0x555555e82fe0) at thread/qthread_unix.cpp:331
#8  0x00007ffff317d614 in start_thread (arg=0x7fffd99b4700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffdbfff700 (LWP 2488)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
---Type <return> to continue, or q <return> to quit---
#1  0x00007fffeb65450d in g_main_context_poll (priority=2147483647, n_fds=1, fds=0x7fffd4003070, timeout=-1, context=0x7fffd4000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:4135
#2  g_main_context_iterate (context=context@entry=0x7fffd4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3835
#3  0x00007fffeb654642 in g_main_context_iteration (context=0x7fffd4000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#4  0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x7fffd40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#5  0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffdbffed60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x00007ffff3438904 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#7  0x00007ffff343e634 in QThreadPrivate::start (arg=0x555555e05250) at thread/qthread_unix.cpp:331
#8  0x00007ffff317d614 in start_thread (arg=0x7fffdbfff700) at pthread_create.c:334
#9  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe10c9700 (LWP 2487)):
#0  0x00007ffff28ae2ed in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007ffff1b03b72 in poll (__timeout=-1, __nfds=1, __fds=0x7fffe10c8c70) at /usr/include/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x555555dcd6e0, cond=cond@entry=0x555555dcd720, vector=vector@entry=0x0, count=count@entry=0x0) at /var/tmp/portage/x11-libs/libxcb-1.11.1/work/libxcb-1.11.1/src/xcb_conn.c:459
#3  0x00007ffff1b05ccf in xcb_wait_for_event (c=0x555555dcd6e0) at /var/tmp/portage/x11-libs/libxcb-1.11.1/work/libxcb-1.11.1/src/xcb_in.c:693
#4  0x00007fffe2664569 in QXcbEventReader::run (this=0x555555de0050) at qxcbconnection.cpp:1229
#5  0x00007ffff343e634 in QThreadPrivate::start (arg=0x555555de0050) at thread/qthread_unix.cpp:331
#6  0x00007ffff317d614 in start_thread (arg=0x7fffe10c9700) at pthread_create.c:334
#7  0x00007ffff28b7f6d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7e00840 (LWP 1776)):
#0  0x00007ffff4676542 in ff_hscale8to15_8_ssse3 () from /usr/lib64/libswscale.so.3
#1  0x00007ffff462993e in lum_h_scale (c=0x5555581c3660, desc=0x5555581e29e0, sliceY=<optimized out>, sliceH=14) at /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libswscale/hscale.c:41
#2  0x00007ffff465b9e0 in swscale (c=0x5555581c3660, src=<optimized out>, srcStride=<optimized out>, srcSliceY=<optimized out>, srcSliceH=<optimized out>, dst=0x7fffffffb200, dstStride=0x7fffffffb1d0)
    at /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libswscale/swscale.c:589
#3  0x00007ffff465ce07 in sws_scale (c=<optimized out>, srcSlice=<optimized out>, srcStride=<optimized out>, srcSliceY=<optimized out>, srcSliceH=<optimized out>, dst=<optimized out>, dstStride=0x555558100f40)
    at /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libswscale/swscale.c:1272
#4  0x00005555556476c7 in VideoFrame::convertToRGB24 (this=0x7fffb404e280, size=...) at src/video/videoframe.cpp:182
#5  0x0000555555646feb in VideoFrame::toQImage (this=0x7fffb404e280, size=...) at src/video/videoframe.cpp:83
#6  0x0000555555658ba3 in VideoSurface::paintEvent (this=0x5555580e9d20) at src/video/videosurface.cpp:168
#7  0x00007ffff40cbbf0 in QWidget::event (this=0x5555580e9d20, event=0x7fffffffb830) at kernel/qwidget.cpp:9044
#8  0x00007ffff407d19c in QApplicationPrivate::notify_helper (this=this@entry=0x555555dc1010, receiver=receiver@entry=0x5555580e9d20, e=e@entry=0x7fffffffb830) at kernel/qapplication.cpp:3716
#9  0x00007ffff4082dd2 in QApplication::notify (this=0x7fffffffdbe0, receiver=0x5555580e9d20, e=0x7fffffffb830) at kernel/qapplication.cpp:3499
#10 0x00007ffff361049c in QCoreApplication::notifyInternal (this=0x7fffffffdbe0, receiver=receiver@entry=0x5555580e9d20, event=event@entry=0x7fffffffb830) at kernel/qcoreapplication.cpp:965
#11 0x00007ffff40c403c in QCoreApplication::sendSpontaneousEvent (event=0x7fffffffb830, receiver=0x5555580e9d20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227
#12 QWidgetPrivate::sendPaintEvent (this=this@entry=0x555558117540, toBePainted=...) at kernel/qwidget.cpp:5625
#13 0x00007ffff40c475d in QWidgetPrivate::drawWidget (this=this@entry=0x555558117540, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5565
#14 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x5555581032f0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#15 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x5555581032f0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#16 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555556dff1b0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#17 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555556dff1b0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#18 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555556da38f0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#19 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555556da38f0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#20 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x5555563586a0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
---Type <return> to continue, or q <return> to quit---
#21 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x5555563586a0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#22 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555556357700, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#23 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555556357700, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#24 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555555f988a0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#25 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555555f988a0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#26 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555555f983e0, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#27 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=this@entry=0x555555f983e0, pdev=pdev@entry=0x555557407500, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, 
    backingStore=0x5555563864f0) at kernel/qwidget.cpp:5617
#28 0x00007ffff40c5575 in QWidgetPrivate::paintSiblingsRecursive (this=this@entry=0x555555f96120, pdev=pdev@entry=0x555557407500, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, 
    sharedPainter=0x0, backingStore=0x5555563864f0) at kernel/qwidget.cpp:5760
#29 0x00007ffff40c4277 in QWidgetPrivate::drawWidget (this=0x555555f96120, pdev=0x555557407500, rgn=..., offset=..., flags=flags@entry=5, sharedPainter=sharedPainter@entry=0x0, backingStore=0x5555563864f0)
    at kernel/qwidget.cpp:5617
#30 0x00007ffff408c932 in QWidgetBackingStore::doSync (this=this@entry=0x5555563864f0) at kernel/qwidgetbackingstore.cpp:1226
#31 0x00007ffff408ccf1 in QWidgetBackingStore::sync (this=0x5555563864f0) at kernel/qwidgetbackingstore.cpp:1032
#32 0x00007ffff40b3b12 in QWidgetPrivate::syncBackingStore (this=0x555555f96120) at kernel/qwidget.cpp:1902
#33 0x00007ffff40cbc60 in QWidget::event (this=0x555555f95fa0, event=0x555556acb520) at kernel/qwidget.cpp:8983
#34 0x00005555556980b3 in Widget::event (this=0x555555f95fa0, e=0x555556acb520) at src/widget/widget.cpp:1748
#35 0x00007ffff407d19c in QApplicationPrivate::notify_helper (this=this@entry=0x555555dc1010, receiver=receiver@entry=0x555555f95fa0, e=e@entry=0x555556acb520) at kernel/qapplication.cpp:3716
#36 0x00007ffff4082dd2 in QApplication::notify (this=0x7fffffffdbe0, receiver=0x555555f95fa0, e=0x555556acb520) at kernel/qapplication.cpp:3499
#37 0x00007ffff361049c in QCoreApplication::notifyInternal (this=0x7fffffffdbe0, receiver=0x555555f95fa0, event=event@entry=0x555556acb520) at kernel/qcoreapplication.cpp:965
#38 0x00007ffff3613b5b in QCoreApplication::sendEvent (event=0x555556acb520, receiver=<optimized out>) at kernel/qcoreapplication.h:224
#39 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x555555dc1180) at kernel/qcoreapplication.cpp:1593
#40 0x00007ffff3614094 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#41 0x00007ffff3668dd2 in postEventSourceDispatch (s=0x555555e1a6f0) at kernel/qeventdispatcher_glib.cpp:271
#42 0x00007fffeb654283 in g_main_dispatch (context=0x7fffdc0016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154
#43 g_main_context_dispatch (context=context@entry=0x7fffdc0016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769
#44 0x00007fffeb654570 in g_main_context_iterate (context=context@entry=0x7fffdc0016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840
#45 0x00007fffeb654642 in g_main_context_iteration (context=0x7fffdc0016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#46 0x00007ffff3668e5e in QEventDispatcherGlib::processEvents (this=0x555555e02770, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#47 0x00007ffff360e6e3 in QEventLoop::exec (this=this@entry=0x7fffffffdac0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#48 0x00007ffff3616e1e in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#49 0x00005555555b76aa in main (argc=3, argv=0x7fffffffdd48) at src/main.cpp:294
@zetok zetok added C-bug The issue contains a bug report help wanted P-very-high M-video Affected Module: Video labels Jul 18, 2016
@zetok zetok added this to the v1.5.0 milestone Jul 18, 2016
@zetok zetok added the C-crash The issue contains a crash report label Jul 18, 2016
@Diadlo
Copy link
Member

Diadlo commented Jul 18, 2016

Can you try with ffmpeg 3.0.2-2 or later?

@zetok
Copy link
Contributor Author

zetok commented Jul 18, 2016

Available versions: 2.8.6(0/54.56.56)^d ~2.8.7(0/54.56.56)^d [M]~3.0.1(0/55.57.57)^d [M]~3.0.2(0/55.57.57)^d [M]~3.1.1(0/55.57.57)^d [M]**9999(0/55.57.57)^

I can, but it's not a problem with FFmpeg. Stuff crashes with the same FFmpeg version with which it worked before, and the only thing that has changed is qTox.

@Diadlo
Copy link
Member

Diadlo commented Jul 18, 2016

Ok. I can't reproduse

@zetok
Copy link
Contributor Author

zetok commented Jul 18, 2016

steps:

  1. start qTox instance that had part of the screen set as video input during the previous run
  2. start video call without going into settings
  3. crash

@zetok zetok changed the title segfault during a video call [regression] segfault during a video call Jul 18, 2016
@zetok
Copy link
Contributor Author

zetok commented Jul 18, 2016

git bisect
good: 699ffae
bad: f970bb5

commit 294bdab77f8fb6c2b29917f5318ffe4ec2bc2ab6
Author: Colomban Wendling <ban@herbesfolles.org>
Date:   Tue Jul 12 21:27:23 2016 +0200

    fix(x11grab): try and use the current display

    Don't hard-code ":0" as the display and try and use the DISPLAY
    environment variable instead.

    This fixes screen grabbing under X11 when the user is not on screen 0.

    Fix #3500.

:040000 040000 1c5f4b6c1a7fe8b71fbd7f46cca7ebdca0cf0b06 8ad276c6b78d658e38bbfd9047ac387664fe0d12 M  src

Points to 294bdab
With this commit reverted, there's no segfault.

cc @b4n

@b4n
Copy link
Contributor

b4n commented Jul 18, 2016

It looks highly unlikely to me this commit is the direct cause of the issue (unless there's a particular string buffer issue there, but 1) I don't think so, 2) it would likely crash way before). I would rather guess that something like x11grab didn't work before (as it would be using an invalid source) and now it works it shows a crash inside the grab/feed code.

Do the x11grab actually work without that commit? What is the value of $DISPLAY on your desktop? How does the ffmpeg argument look like? (e.g. what device it tries to open)

FWIW, it works fine here with EchoBot, Debug: Opening device "x11grab#:1" and latest master (same commit as the report). (edit: ffmpeg 3.1.1-2)

@zetok
Copy link
Contributor Author

zetok commented Jul 18, 2016

Do the x11grab actually work without that commit?

Yes.

What is the value of $DISPLAY on your desktop?

$ echo $DISPLAY
:0.0

How does the ffmpeg argument look like? (e.g. what device it tries to open)

Dunno. The only relevant thing before the crash when video-calling:

[22:22:07.875] src/widget/form/chatform.cpp:655 : Debug: creating netcam
[22:22:07.877] src/video/netcamview.cpp:88 : Debug: SIZER QRect(1625,0 24x20)
[swscaler @ 0x555557eebd00] Warning: data is not aligned! This can lead to a speedloss

When going into the settings:

23:11:14.569] src/widget/form/settings/avform.cpp:345 : Debug: available Modes:
BAD!
[23:11:14.569] src/widget/form/settings/avform.cpp:321 : Debug: 1920x1080+0,0 FPS: 0.000000, pixel format: unknown

BAD!
[23:11:14.569] src/widget/form/settings/avform.cpp:321 : Debug: 0x0+0,0 FPS: 0.000000, pixel format: unknown

[23:11:14.569] src/video/camerasource.cpp:301 : Debug: Closing device  "none"
[23:11:14.570] src/video/camerasource.cpp:219 : Debug: Opening device  "x11grab#:0.0"

↑ that BAD! might mean something.

On the commit that does work:

[22:22:39.023] src/video/camerasource.cpp:209 : Debug: Opening device  "x11grab#:0"
[22:22:39.101] src/widget/form/chatform.cpp:369 : Debug: onAvEnd
[22:22:39.101] src/widget/form/chatform.cpp:509 : Debug: enableCallButtons
[22:22:39.101] src/widget/form/chatform.cpp:529 : Debug: disableCallButtons
[22:22:39.102] src/widget/form/chatform.cpp:522 : Debug: timer started!!
[22:22:39.282] src/video/camerasource.cpp:282 : Debug: Closing device  "x11grab#:0"

Interesting – after going into settings once and re-selecting video device, the crash is gone – I guess the crash was due to qTox failing to open saved video device, or something?

@b4n
Copy link
Contributor

b4n commented Jul 18, 2016

I don't get how there can be an swscale warning before an open device debug message, but well, I don't know the code so well.

Interesting – after going into settings once and re-selecting video device, the crash is gone – I guess the crash was due to qTox failing to open saved video device, or something?

Quickly looking at the code suggests that if the saved device is not found, it'll use the first device of the list of available devices. So probably not screen grabbing. (https://github.com/tux3/qTox/blob/master/src/video/cameradevice.cpp#L339)

that BAD! might mean something.

This seems to come from the V4L2 platform code: https://github.com/tux3/qTox/blob/master/src/platform/camera/v4l2.cpp#L204

@b4n
Copy link
Contributor

b4n commented Jul 18, 2016

Oddly enough, AVForm::fillScreenModesComboBox() calls CameraDevice::getPixelFormatString(), which under Linux is implemented as v4l2::getPixelFormatString(). I have no idea if it makes sense to use V4L2 format lookup for screen grabbing, but it surely sounds odd to me.

Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 19, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 19, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 19, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 20, 2016
@zetok zetok added P-high and removed P-very-high labels Jul 20, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 21, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 21, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 21, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 21, 2016
Diadlo added a commit to Diadlo/qTox that referenced this issue Jul 21, 2016
@Diadlo
Copy link
Member

Diadlo commented Jul 22, 2016

Problem with video device == "None". Reproduced by @zetok with echobot (for example). Crashed on received frame.

  1. Echobot sent frame, wich crash qtox ("wrong frame").
  2. Echobot just resend source frame. It means, that qtox send "wrong frame".
  3. Frames sended only from CoreAV::sendCallVideo.
  4. This method connected only with VideoSource::frameAvailable. Sender is CameraSource.
  5. This signal emited only from CameraSource::stream

But when zetok can reproduce crash this line don't executed

@zetok
Copy link
Contributor Author

zetok commented Jul 23, 2016

Did bisect again, with None as video device:

ef641ce

ef641ce6d3398792c10b30bf24a81c5a6005fe06 is the first bad commit
commit ef641ce6d3398792c10b30bf24a81c5a6005fe06
Author: Diadlo <polsha3@gmail.com>
Date:   Thu Jun 16 12:23:01 2016 +0300

    style(corevideosource): Small style fixes

:040000 040000 ddbcba8a1499378698ebbba3f770145785ac1450 61c043c79bef57eb5d6c51fa096edc48195af332 M  src

@b4n
Copy link
Contributor

b4n commented Jul 23, 2016

Did bisect again, with None as video device:
ef641ce

I see 2 differences in logic here: avframe->opaque isn't set anymore (was to buf), and buf is now freed (probably because it's not referenced by avframe->opaque anymore?).

I have no idea what it actually changes in practice, but it's definitely a little more than style fix.

@Diadlo
Copy link
Member

Diadlo commented Jul 23, 2016

And confused indices i and j ;)

@b4n
Copy link
Contributor

b4n commented Jul 23, 2016

And confused indices i and j

Does it? I don't see it, it renamed the i to j, and added a new i as an alternative to hard-coded indices, but it seem identical to me.

@Diadlo
Copy link
Member

Diadlo commented Jul 23, 2016

No, you are right. Seems I tired

  1. avframe->opaque don't set, because I find using in project and don't found.
  2. Yes. Freed, because unused too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-bug The issue contains a bug report C-crash The issue contains a crash report M-video Affected Module: Video P-high
Projects
None yet
Development

No branches or pull requests

3 participants