wrong resolution 1836016482x762212205 causes crash.
A simple v4l2 full-featured video grabber
Brought to you by:
assisp
While trying the various encoding and resolution variants in the "Video Settings" tag, an unusual high resolution was selected. This caused a crash.
olaf@latitude:~ $ guvcview-qt5
GUVCVIEW: version 2.0.5
GUVCVIEW: couldn't open /home/olaf/.config/guvcview2/video0 for read: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Datei oder Verzeichnis nicht gefunden
ALSA lib pcm.c:2552:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2552:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2552:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
GUVCVIEW (Qt5): updating frame rates for new resolution of 1280x720
GUVCVIEW (Qt5): updating frame rates for new resolution of 960x540
GUVCVIEW (Qt5): updating frame rates for new resolution of 848x480
GUVCVIEW (Qt5): updating frame rates for new resolution of 848x480
GUVCVIEW (Qt5): updating frame rates for new resolution of 640x480
GUVCVIEW (Qt5): updating frame rates for new resolution of 640x480
GUVCVIEW (Qt5): updating frame rates for new resolution of 1280x720
GUVCVIEW (Qt5): updating frame rates for new resolution of 1280x720
GUVCVIEW (Qt5): updating frame rates for new resolution of 1280x720
GUVCVIEW (Qt5): updating frame rates for new resolution of 320x240
GUVCVIEW (Qt5): updating frame rates for new resolution of 1836016482x762212205
Speicherzugriffsfehler (Speicherabzug geschrieben)
(gdb) bt
#0 QString::arg (fillChar=..., base=10, fieldWidth=0, a=<error reading variable: Cannot access memory at address 0x702f3574712f3400>, this=0x7ffd9584d768)
at /usr/include/qt5/QtCore/qstring.h:925
#1 MainWindow::resolution_changed (this=this@entry=0x560e253fd010, index=index@entry=6) at gui_qt5_callbacks.cpp:1004
#2 0x0000560e247e7f4c in MainWindow::format_changed (this=0x560e253fd010, index=<optimized out>) at gui_qt5_callbacks.cpp:1096
#3 0x0000560e247cfb1b in MainWindow::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at moc_gui_qt5.cpp:269
#4 0x00007fa5b813404a in QMetaObject::activate (sender=sender@entry=0x560e2582de10, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=5,
argv=argv@entry=0x7ffd9584d980) at kernel/qobject.cpp:3766
#5 0x00007fa5b8134757 in QMetaObject::activate (sender=sender@entry=0x560e2582de10, m=m@entry=0x7fa5b953fbc0 <QComboBox::staticMetaObject>, local_signal_index=local_signal_index@entry=5,
argv=argv@entry=0x7ffd9584d980) at kernel/qobject.cpp:3628
#6 0x00007fa5b8f94011 in QComboBox::currentIndexChanged (this=this@entry=0x560e2582de10, _t1=<optimized out>) at .moc/moc_qcombobox.cpp:503
#7 0x00007fa5b8f95c63 in QComboBoxPrivate::_q_emitCurrentIndexChanged (this=this@entry=0x560e258b4ff0, index=...) at widgets/qcombobox.cpp:1342
#8 0x00007fa5b8f96ee8 in QComboBoxPrivate::setCurrentIndex (this=this@entry=0x560e258b4ff0, mi=...) at widgets/qcombobox.cpp:2157
#9 0x00007fa5b8f97061 in QComboBoxPrivate::_q_itemSelected (this=0x560e258b4ff0, item=...) at widgets/qcombobox.cpp:1310
#10 0x00007fa5b8f9c56d in QComboBox::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7ffd9584dc60) at .moc/moc_qcombobox.cpp:285
#11 0x00007fa5b813404a in QMetaObject::activate (sender=sender@entry=0x7fa5940276c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0,
argv=argv@entry=0x7ffd9584dc60) at kernel/qobject.cpp:3766
#12 0x00007fa5b8134757 in QMetaObject::activate (sender=sender@entry=0x7fa5940276c0, m=m@entry=0x7fa5b953fb00 <QComboBoxPrivateContainer::staticMetaObject>,
local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd9584dc60) at kernel/qobject.cpp:3628
#13 0x00007fa5b8f945be in QComboBoxPrivateContainer::itemSelected (_t1=..., this=0x7fa5940276c0) at .moc/moc_qcombobox_p.cpp:329
#14 QComboBoxPrivateContainer::eventFilter (this=0x7fa5940276c0, o=0x560e2571b6f0, e=0x7ffd9584e070) at widgets/qcombobox.cpp:727
#15 0x00007fa5b8106794 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x560e2571b6f0, event=event@entry=0x7ffd9584e070)
at kernel/qcoreapplication.cpp:1127
#16 0x00007fa5b8e96e65 in QApplicationPrivate::notify_helper (this=this@entry=0x560e253ed8f0, receiver=receiver@entry=0x560e2571b6f0, e=e@entry=0x7ffd9584e070)
at kernel/qapplication.cpp:3719
#17 0x00007fa5b8e9e79f in QApplication::notify (this=<optimized out>, receiver=0x560e2571b6f0, e=0x7ffd9584e070) at kernel/qapplication.cpp:3199
#18 0x00007fa5b8106a88 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x560e2571b6f0, event=event@entry=0x7ffd9584e070) at kernel/qcoreapplication.cpp:1016
#19 0x00007fa5b8e9d7ef in QCoreApplication::sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#20 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x560e2571b6f0, event=event@entry=0x7ffd9584e070, alienWidget=alienWidget@entry=0x560e2571b6f0,
nativeWidget=0x7fa5940276c0, buttonDown=buttonDown@entry=0x7fa5b95667d0 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2705
#21 0x00007fa5b8eed002 in QWidgetWindow::handleMouseEvent (this=this@entry=0x560e257fdab0, event=event@entry=0x7ffd9584e460) at kernel/qwidgetwindow.cpp:523
#22 0x00007fa5b8eef701 in QWidgetWindow::event (this=0x560e257fdab0, event=0x7ffd9584e460) at kernel/qwidgetwindow.cpp:250
#23 0x00007fa5b8e96e8c in QApplicationPrivate::notify_helper (this=this@entry=0x560e253ed8f0, receiver=receiver@entry=0x560e257fdab0, e=e@entry=0x7ffd9584e460)
at kernel/qapplication.cpp:3723
#24 0x00007fa5b8e9e244 in QApplication::notify (this=0x560e253f1990, receiver=0x560e257fdab0, e=0x7ffd9584e460) at kernel/qapplication.cpp:3482
#25 0x00007fa5b8106a88 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x560e257fdab0, event=event@entry=0x7ffd9584e460) at kernel/qcoreapplication.cpp:1016
#26 0x00007fa5b86d818b in QCoreApplication::sendSpontaneousEvent (event=0x7ffd9584e460, receiver=0x560e257fdab0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#27 QGuiApplicationPrivate::processMouseEvent (e=0x7fa594028560) at kernel/qguiapplication.cpp:1952
#28 0x00007fa5b86d9ac5 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x7fa594028560) at kernel/qguiapplication.cpp:1733
#29 0x00007fa5b86b265b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:946
#30 0x00007fa59d7090f0 in userEventSourceDispatch (source=<optimized out>) at qeventdispatcher_glib.cpp:77
#31 0x00007fa5b2a2ae07 in g_main_dispatch (context=0x7fa594004fc0) at gmain.c:3142
#32 g_main_context_dispatch (context=context@entry=0x7fa594004fc0) at gmain.c:3795
#33 0x00007fa5b2a2b1b0 in g_main_context_iterate (context=context@entry=0x7fa594004fc0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3868
#34 0x00007fa5b2a2b23c in g_main_context_iteration (context=0x7fa594004fc0, may_block=may_block@entry=1) at gmain.c:3929
#35 0x00007fa5b815cbef in QEventDispatcherGlib::processEvents (this=0x560e25433c00, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#36 0x00007fa5b810509a in QEventLoop::exec (this=this@entry=0x7ffd9584e7f0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#37 0x00007fa5b810d9e4 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1289
#38 0x0000560e247ca478 in main (argc=<optimized out>, argv=<optimized out>) at guvcview.c:425
This backtrace probably does not mean much. I assume there is just memory corruption due to OOB access.
This happens when switching from MJPG to YV12. It seems it is not possible to freely switch between any active resolution to any other encoding/resolution. Some combinations work, many crash with either reporting 0x0 or $large x $large.