Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant crash when adding Dynamic mask #491

Closed
allibis opened this issue Mar 22, 2021 · 8 comments
Closed

Instant crash when adding Dynamic mask #491

allibis opened this issue Mar 22, 2021 · 8 comments
Labels
bug Bugs such as crashing, freezing, broken functionality, etc.

Comments

@allibis
Copy link

allibis commented Mar 22, 2021

Description

How to reproduce: open OBS, select webcam, open filters menu, try to add Dynamic Mask
Log files:
2021-03-22 10-30-47.txt

I don't know if it does crash with other features, this is all I have experienced since I installed it today, hope I'm helping

System Information

  • Software Version: OBS 26.1.1
  • Operating System: Xubuntu 20.04.2 LTS x86_64
  • Kernel Version: 5.4.0-67-generic
  • CPU: AMD A8-7410 APU with AMD Radeon
  • GPU: AMD ATI Radeon R5 M230 / R7 M26
  • RAM: 8GB
@allibis allibis changed the title Istant crash when adding Dynamic mask Instant crash when adding Dynamic mask Mar 22, 2021
@Xaymar Xaymar added the bug Bugs such as crashing, freezing, broken functionality, etc. label Mar 22, 2021
@Xaymar
Copy link
Owner

Xaymar commented Mar 28, 2021

Unable to repro this issue on any of my machines (Windows, MacOS, Ubuntu 20.04). Please verify that you have properly installed the plugin according to the Installation Guide.

@JvPeek
Copy link

JvPeek commented Apr 9, 2021

I have the same problem as described above.

error: [StreamFX] Failed to update input: source with name not found
info: User added filter 'Dynamic Mask' (streamfx-filter-dynamic-mask) to source 'gsichtskamera'
[1]    170808 segmentation fault (core dumped)  obs

Let me know if you need any more information or access to my machine for debugging purposes.

System Information

  • Software Version: OBS 26.1.1
  • Operating System: Ubuntu 20.04.2 LTS x86_64
  • Window Manager: i3-gaps 4.18.2
  • StreamFX Version: 0.9.3.0-2ecce522
  • Kernel Version: 5.4.0-70-generic
  • CPU: AMD Ryzen 7 2700X
  • GPU: NVIDIA GeForce RTX 2080 Ti
  • RAM: 32GB

@fhars
Copy link

fhars commented Apr 10, 2021

I see the exact same behaviour with obs 26.1.1 on Ubuntu 20.10 on a Ryzen 7 with an AMD GPU using the released streamfx-ubuntu-20.04-0.9.3.0-2ecce522, unless I start obs under gdb, then it seems to work.

@fhars
Copy link

fhars commented Apr 11, 2021

This is the log output:

Attempted path: share/obs/obs-studio/images/overflow.png                                                                                                                                                                                                                            
Attempted path: /usr/share/obs/obs-studio/images/overflow.png                                                                                                                                                                                                                       
error: [StreamFX] Failed to update input: source with name not found                                                                                                                                                                                                                
info: User added filter 'Dynamic Mask' (streamfx-filter-dynamic-mask) to source 'Vordergrund'                                             
Segmentation fault (core dumped)      

This is what gdb tells me after I wrangled a core dump out of ubuntu:

#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
#1  0x00007f9dccff5fd8 in printf_positional
    (s=s@entry=0x7ffcefbf0fa0, format=format@entry=0x557779a146e0 "The input value for channel %s.\nSets 'value[%s][%s]' in the calculation 'mask[%s] = (base[%s] + value[%s][Red] * source[Red] + value[%s][Green] * source[Green] + value[%s][Blue] * source[Blue] + value"..., readonly_format=<optimized out>, readonly_format@entry=0, ap=ap@entry=0x7ffcefbf1170, ap_savep=ap_savep@entry=0x7ffcefbf0b38, done=<optimized out>, 
    done@entry=28, nspecs_done=<optimized out>, lead_str_end=<optimized out>, work_buffer=<optimized out>, save_errno=<optimized out>, grouping=<optimized out>, thousands_sep=<optimized out>, mode_flags=<optimized out>) at vfprintf-internal.c:1997
#2  0x00007f9dccff8196 in __vfprintf_internal
    (s=s@entry=0x7ffcefbf0fa0, format=format@entry=0x557779a146e0 "The input value for channel %s.\nSets 'value[%s][%s]' in the calculation 'mask[%s] = (base[%s] + value[%s][Red] * source[Red] + value[%s][Green] * source[Green] + value[%s][Blue] * source[Blue] + value"..., ap=ap@entry=0x7ffcefbf1170, mode_flags=mode_flags@entry=0) at vfprintf-internal.c:1683
#3  0x00007f9dcd00a87a in __vsnprintf_internal
    (string=0x557779d2bbd0 "The input value for channel Red.\nSets 'value[Red][Red]' in the calculation 'mask[Red] = (base[Red] + value[Red][Red] * source[Red] + value[Red][Green] * source[Green] + value[Red][Blue] * source[Blue]"..., maxlen=<optimized out>, format=0x557779a146e0 "The input value for channel %s.\nSets 'value[%s][%s]' in the calculation 'mask[%s] = (base[%s] + value[%s][Red] * source[Red] + value[%s][Green] * source[Green] + value[%s][Blue] * source[Blue] + value"..., args=0x7ffcefbf1170, mode_flags=0) at vsnprintf.c:114
#4  0x00007f9d1ddd285b in streamfx::filter::dynamic_mask::dynamic_mask_factory::translate_string[abi:cxx11](char const*, ...) () at /home/hars/.config/obs-studio/plugins/StreamFX/bin/64bit/StreamFX.so
#5  0x00007f9d1ddd1f5b in streamfx::filter::dynamic_mask::dynamic_mask_factory::get_properties2(streamfx::filter::dynamic_mask::dynamic_mask_instance*) () at /home/hars/.config/obs-studio/plugins/StreamFX/bin/64bit/StreamFX.so
#6  0x00007f9d1ddd5677 in obs::source_factory<streamfx::filter::dynamic_mask::dynamic_mask_factory, streamfx::filter::dynamic_mask::dynamic_mask_instance>::_get_properties2(void*, void*) () at /home/hars/.config/obs-studio/plugins/StreamFX/bin/64bit/StreamFX.so
#7  0x00007f9dce138254 in obs_source_properties () at /lib/libobs.so.0
#8  0x00005577775eacf7 in  ()
#9  0x00005577775eae7f in  ()
#10 0x00005577775143d3 in  ()
#11 0x00005577774a6f53 in  ()
#12 0x00007f9dcd7bc030 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f9dce5c2285 in QListWidget::currentRowChanged(int) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f9dce5c31bf in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007f9dcd7bc320 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007f9dcd7303b7 in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f9dcd733bbd in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f9dce5c3720 in QListWidget::setCurrentRow(int) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00005577775146c3 in  ()
#20 0x00005577774a21d8 in  ()
#21 0x00007f9dcd794966 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f9dcd7966da in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x0000557777513de0 in  ()
#24 0x00007f9dce0f89db in signal_handler_signal () at /lib/libobs.so.0
#25 0x00007f9dce139a11 in obs_source_filter_add () at /lib/libobs.so.0
#26 0x0000557777516d75 in  ()
#27 0x0000557777516eda in  ()
#28 0x00007f9dcd7bc320 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f9dce315826 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f9dce318111 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f9dce495a5a in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007f9dce49d0c2 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f9dce35d30e in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f9dce31c013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007f9dce321841 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007f9dcd7861ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007f9dce32073a in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007f9dce37693f in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007f9dce378d8e in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007f9dce31c013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007f9dcd7861ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007f9dcdb5748b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#43 0x00007f9dcdb2d2bb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#44 0x00007f9dc3612747 in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#45 0x00007f9dcd784a4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#46 0x00007f9dce49aba8 in QMenu::exec(QPoint const&, QAction*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00005577775190f6 in  ()
#48 0x00005577774a6f53 in  ()
#49 0x00007f9dcd7bc030 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007f9dce40aec6 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#51 0x00007f9dce40b88e in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x00007f9dce40d143 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007f9dce40d325 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#54 0x00007f9dce35d30e in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#55 0x00007f9dce31c013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#56 0x00007f9dce321841 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#57 0x00007f9dcd7861ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#58 0x00007f9dce32073a in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#59 0x00007f9dce375f32 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#60 0x00007f9dce378d8e in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#61 0x00007f9dce31c013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#62 0x00007f9dcd7861ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#63 0x00007f9dcdb5748b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#64 0x00007f9dcdb2d2bb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#65 0x00007f9dc3612747 in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#66 0x00007f9dcd784a4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#67 0x00007f9dcd78cfc6 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#68 0x000055777749c9e4 in main ()

@fhars
Copy link

fhars commented Apr 11, 2021

I count ten instances of "%s" in this format string:

(gdb) p format
$7 = 0x5569eea50aa0 "The input value for channel %s.\nSets 'value[%s][%s]' in the calculation 'mask[%s] = (base[%s] + value[%s][Red] * source[Red] + value[%s][Green] * source[Green] + value[%s][Blue] * source[Blue] + value[%s][Alpha] * source[Alpha]) * multiplier[%s]'."

But this call at obs-StreamFX/source/filters/filter-dynamic-mask.cpp:479 seems to pass only nine values in addition to the format string:

479                             _translation_cache.push_back(translate_string(D_TRANSLATE(D_DESC(ST_CHANNEL_INPUT)), D_TRANSLATE(sec_ch),
480                                                                                                                       D_TRANSLATE(pri_ch), D_TRANSLATE(sec_ch), D_TRANSLATE(pri_ch),
481                                                                                                                       D_TRANSLATE(pri_ch), D_TRANSLATE(pri_ch), D_TRANSLATE(pri_ch),
482                                                                                                                       D_TRANSLATE(pri_ch), D_TRANSLATE(pri_ch)));
4

No wonder the behaviour is weird, that is deep in nasal demons territory.

@fhars
Copy link

fhars commented Apr 11, 2021

Oh, and in the "Input Source" tooltip all the %s are not replaced:

image

@Xaymar
Copy link
Owner

Xaymar commented Apr 19, 2021

Hello, please test with the 0.10.0 Beta 3 changes and report back

@allibis
Copy link
Author

allibis commented Apr 19, 2021

Hello, i tested it with the version 0.10.0b3-gb1f49986 and apparently it does not crash, thank you very much.

@Xaymar Xaymar added this to the 0.10 milestone Apr 19, 2021
@Xaymar Xaymar closed this as completed Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs such as crashing, freezing, broken functionality, etc.
Projects
None yet
Development

No branches or pull requests

4 participants