occ-ai/obs-localvocal

Linux - crash when adding localvocal 0.0.3

Closed this issue · 41 comments

Hi, on Debian 12, I have a crash with localvocal 0.0.3 when I select the localvocal filter (0.0.2 works but still very very slow to generate text -> #9 )

[Thread 0x7fff40ff96c0 (LWP 144492) exited]
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Audio du Bureau)

[Thread 0x7fff23fff6c0 (LWP 144491) exited]

Thread 1 "obs" received signal SIGSEGV, Segmentation fault.
0x00007ffff4140c8c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) ()
   from /lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007ffff4140c8c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) ()
    at /lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007fff690331f1 in  () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#2  0x00007ffff6787cb2 in  () at /usr/local/lib/libobs.so.0
#3  0x00007ffff6788149 in obs_source_create () at /usr/local/lib/libobs.so.0
#4  0x0000555555684395 in  ()
#5  0x0000555555684666 in  ()
#6  0x00007ffff456cee3 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#7  0x00007ffff4e32b22 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#8  0x00007ffff4e37db1 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#9  0x00007ffff5720b8a in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#10 0x00007ffff572131b in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#11 0x00007ffff55c8554 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#12 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#13 0x00007ffff557b931 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#14 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#15 0x00007ffff55783e8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#16 0x00007ffff55d658f in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#17 0x00007ffff55d72f5 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#18 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#19 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#20 0x00007ffff4b8e28b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#21 0x00007ffff4bd653c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#22 0x00007fffe97b52fa in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#23 0x00007ffff251c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff251ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff251cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff4707f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#27 0x00007ffff452d57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#28 0x00007ffff572364f in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#29 0x00007ffff572376f in QMenu::exec(QPoint const&, QAction*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#30 0x0000555555685d1c in  ()
--Type <RET> for more, q to quit, c to continue without paging--
#31 0x00005555555f0c43 in  ()
#32 0x00007ffff456cc18 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#33 0x00007ffff56826f2 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#34 0x00007ffff567a7fa in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#35 0x00007ffff567abba in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#36 0x00007ffff568766f in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#37 0x00007ffff55c8554 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#38 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#39 0x00007ffff557b931 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#40 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#41 0x00007ffff55783e8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#42 0x00007ffff55d5f95 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#43 0x00007ffff55d72f5 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#44 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#45 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#46 0x00007ffff4b8e28b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#47 0x00007ffff4bd653c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#48 0x00007fffe97b52fa in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#49 0x00007ffff251c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007ffff251ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007ffff251cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#52 0x00007ffff4707f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#53 0x00007ffff452d57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#54 0x00007ffff45266a8 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#55 0x00005555555e7645 in main ()
(gdb)

can you get the OBS logs? i'm trying to track down where the problem is

@ogmkp would appreciate the help with logs for this

This obs log

~$ obs
debug: Found portal inhibitor
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/locale/fr-FR.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale/fr-FR.ini
info: Using preferred locale 'fr-FR'
debug: Attempted path: share/obs/obs-studio/themes/Dark.qss
debug: Attempted path: /usr/local/share/obs/obs-studio/themes/Dark.qss
info: Using EGL/X11
info: CPU Name: Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
info: CPU Speed: 3499.999MHz
info: Physical Cores: 2, Logical Cores: 4
info: Physical Memory: 15956MB Total, 4354MB Free
info: Kernel Version: Linux 6.1.0-10-amd64
info: Distribution: "Debian GNU/Linux" "12"
info: Desktop Environment: MATE (lightdm-xsession)
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.4.2 (runtime), 6.4.2 (compiled)
info: Portable mode: false
info: OBS 29.1.3 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 48000
	speakers:        2
	max buffering:   960 milliseconds
	buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter AMD AMD Radeon R9 380 Series (tonga, LLVM 15.0.6, DRM 3.49, 6.1.0-10-amd64)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.3.6, shading language 4.60
info: ---------------------------------
info: video settings reset:
	base resolution:   1920x1080
	output resolution: 1920x1080
	downscale filter:  Bicubic
	fps:               60/1
	format:            NV12
	YUV mode:          Rec. 709/Full
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
	name: Par défaut
	id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou dossier de ce type
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] No captures available
info: [obs-browser]: Version 2.21.1
info: [obs-browser]: CEF Version 103.0.5060.134 (runtime), 103.0.0-5060-shared-textures_143.2591+g4204d54+chromium-103.0.5060.134 (compiled)
info: VAAPI: API version 1.17
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI HEVC encoding not supported
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.2.3 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.4.2 | Qt version (run-time): 6.4.2
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 102201
info: [obs-websocket] [obs_module_load] Module loaded.
info: [vlc-video]: VLC 3.0.18 Vetinari found, VLC video source enabled
warning: Failed to load 'fr-FR' text for module: 'obs-localvocal.so'
info: plugin loaded successfully (version 0.0.3)
info: [obs-ndi] obs_module_load: hello ! (version 4.11.1)
info: [obs-ndi] load_ndilib: Trying '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: Found NDI library at '/usr/lib/libndi.so.5'
info: [obs-ndi] load_ndilib: NDI runtime loaded successfully
info: [obs-ndi] load_ndilib: NDIlib_v5_load found
info: [obs-ndi] obs_module_load: NDI library initialized successfully (NDI SDK LINUX 12:45:43 Apr 10 2023 5.5.4)
warning: Failed to load 'en-US' text for module: 'obs-urlsource.so'
info: [obs-urlsource] plugin loaded successfully (version 0.0.7)
info: ---------------------------------
info:   Loaded Modules:
info:     obs-urlsource.so
info:     obs-ndi.so
info:     obs-localvocal.so
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-websocket.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     obs-browser.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-capture.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
QWidget::setTabOrder: 'first' and 'second' must be in the same window
info: ==== Startup complete ===============================================
info: Switched to Preview/Program mode
info: ------------------------------------------------
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.65) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Audio du Bureau'
info: [window-capture: 'Capture de la fenêtre (Xcomposite)'] update settings:
	title: unknown
	class: unknown

info: Switched to scene 'Scène'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scène':
info:     - source: 'Texte (FreeType 2)' (text_ft2_source_v2)
info:     - source: 'Capture de la fenêtre (Xcomposite)' (xcomposite_input)
info: - scene 'Scène 2':
info:     - source: 'Capture de la fenêtre (Xcomposite)' (xcomposite_input)
info: ------------------------------------------------
info: [obs-websocket] [WebSocketServer::onObsLoaded] WebSocket server is enabled, starting...
info: [obs-websocket] [WebSocketServer::Start] Not locked to IPv4 bindings
info: [obs-websocket] [WebSocketServer::ServerRunner] IO thread started.
info: [obs-websocket] [WebSocketServer::Start] Server started successfully on port 4455. Possible connect address: 10.0.3.1
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Audio du Bureau)

Erreur de segmentation

Segfault when I add localvocal to default desktop sound's filter.

@umireon woupd you have a moment to check the Linux side of the build?
I don't have a Linux machine set up right now (working on it)
🙏

Ok,
after my Youtube comment, I concur that I have the same segmentation error.
No point in posting the same Log.
Further, but that might be stupid me, the default installation Path for UBUNTU 23.04 didn't work for me.
So I moved the stuff where I always have it. That is
/home/[stupid me]/OBS/plugins/obs-localvocal
and the .SO into the /usr/lib/x86_64-linux-gnu/obs-plugins/
But alas, that is just stupid me and likely my PATH setup.

I guess you guys are back to compiler options???

Good luck and I am looking forward to us it.
Martin

Forgot: OBS is current and so is Ubuntu. No updates etc missing

@ogmkp @BriegerCA can y'all please check the build artifacts from #28 ? 🙏
i believe i resolved the crash on linux

Ok,
dull moment. Where do I download the change? I better hit the hay.

@BriegerCA https://github.com/royshil/obs-localvocal/actions/runs/6307868348#artifacts
every PR invokes an Action which has artifacts - the built plugin

@BriegerCA https://github.com/royshil/obs-localvocal/actions/runs/6307868348#artifacts every PR invokes an Action which has artifacts - the built plugin

Sorry, crash again, but this time, the plugin start to output some log when I add the filter :

[New Thread 0x7fff3e7fc6c0 (LWP 236214)]
[New Thread 0x7fff3effd6c0 (LWP 236215)]
[New Thread 0x7fff417fa6c0 (LWP 236216)]
info: [obs-localvocal] model path changed, reloading model
info: [obs-localvocal] Checking if model models/ggml-tiny.en.bin exists in data...
info: [obs-localvocal] Model found in data: /home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin
info: [obs-localvocal] Loading whisper model from /home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin
whisper_init_from_file_no_state: loading model from '/home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin'
whisper_model_load: loading model
whisper_model_load: n_vocab       = 51864
whisper_model_load: n_audio_ctx   = 1500
whisper_model_load: n_audio_state = 384
whisper_model_load: n_audio_head  = 6
whisper_model_load: n_audio_layer = 4
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 384
whisper_model_load: n_text_head   = 6
whisper_model_load: n_text_layer  = 4
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 1
whisper_model_load: mem required  =  201.00 MB (+    3.00 MB per decoder)
whisper_model_load: adding 1607 extra tokens

Thread 1 "obs" received signal SIGILL, Illegal instruction.
0x00007fff692264dd in ggml_type_sizef () from /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
(gdb) bt
#0  0x00007fff692264dd in ggml_type_sizef () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#1  0x00007fff691ea776 in whisper_model_load(whisper_model_loader*, whisper_context&) () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#2  0x00007fff691f13d7 in whisper_init_no_state () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#3  0x00007fff691f163c in whisper_init_from_file_no_state () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#4  0x00007fff691f17bb in whisper_init_from_file () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#5  0x00007fff69186418 in init_whisper_context(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (model_path="/home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin")
    at /usr/include/c++/11/bits/basic_string.h:194
#6  0x00007fff69183f98 in transcription_filter_update(void*, obs_data_t*) (data=0x7fff24017340, s=0x7fffa0315120) at /home/runner/work/obs-localvocal/obs-localvocal/src/transcription-filter.cpp:336
#7  0x00007fff69184604 in transcription_filter_create(obs_data_t*, obs_source_t*) (settings=0x7fffa0315120, filter=<optimized out>) at /home/runner/work/obs-localvocal/obs-localvocal/src/transcription-filter.cpp:436
#8  0x00007ffff6787cb2 in  () at /usr/local/lib/libobs.so.0
#9  0x00007ffff6788149 in obs_source_create () at /usr/local/lib/libobs.so.0
#10 0x0000555555684395 in  ()
#11 0x0000555555684666 in  ()
#12 0x00007ffff456cee3 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#13 0x00007ffff4e32b22 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#14 0x00007ffff4e37db1 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#15 0x00007ffff5720b8a in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#16 0x00007ffff572131b in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#17 0x00007ffff55c8554 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#18 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#19 0x00007ffff557b931 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#20 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#21 0x00007ffff55783e8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#22 0x00007ffff55d658f in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#23 0x00007ffff55d72f5 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#24 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#25 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#26 0x00007ffff4b8e28b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#27 0x00007ffff4bd653c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#28 0x00007fffe97b52fa in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#29 0x00007ffff251c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff251ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff251cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff4707f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#33 0x00007ffff452d57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#34 0x00007ffff572364f in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#35 0x00007ffff572376f in QMenu::exec(QPoint const&, QAction*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#36 0x0000555555685d1c in  ()
#37 0x00005555555f0c43 in  ()
#38 0x00007ffff456cc18 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#39 0x00007ffff56826f2 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#40 0x00007ffff567a7fa in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#41 0x00007ffff567abba in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#42 0x00007ffff568766f in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#43 0x00007ffff55c8554 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#44 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#45 0x00007ffff557b931 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#46 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#47 0x00007ffff55783e8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#48 0x00007ffff55d5f95 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#49 0x00007ffff55d72f5 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#50 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#51 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#52 0x00007ffff4b8e28b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#53 0x00007ffff4bd653c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#54 0x00007fffe97b52fa in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#55 0x00007ffff251c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007ffff251ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#57 0x00007ffff251cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#58 0x00007ffff4707f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#59 0x00007ffff452d57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#60 0x00007ffff45266a8 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6
--Type <RET> for more, q to quit, c to continue without paging--c
#61 0x00005555555e7645 in main ()

@ogmkp thanks for the crash dump - i'm looking in my Linux box
i didn't get this crash but maybe i can reproduce

As I stated in an eMail earlier. I didn't get a Dump, but I haven't had time to "play" yet.
However (and I assume this is totally unrelated, but still goofy), my entire Camera and Virtual Camera setup went AWOL to the point that I couldn't even install it on my 6.2 Kernel any more. No idea why. I think I didn't do anything I shouldn't have. Anyway, I installed Kernel 6.3 and everything returned to normal thus far. From the OP, I don't see what Kernel Version he is on.

Comment modified: 6.1.38-1 provided by the latest Debian 12 Bookworm stable linux image package.
Thats from the LTS branch of kernel.org: https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.38

Which options?

At the END of your Dump it reads:
--Type for more, q to quit, c to continue without paging--c
#61 0x00005555555e7645 in main ()

Maybe some additional Information can come from this to help Roy?

this is just gdb doing it's thing

the actual error is in ggml_type_sizef
which is very very strange, as the ggml code is very robust.
but this build on this particular linux kernel is broken...

let me do some research on this error

so accroding to this nomic-ai/gpt4all#82
it seems i'm compiling with AVX support but the CPU doesn't actually have it
so i can disable the AVX support which would make it slower, but more robust across hardware
@ogmkp what do you say?

Yes I haven't AVX on this machine.
Can you make it detect AVX and use it if it is present?

@ogmkp the AVX detection on ggml apparently is broken, it is determined in compile time, which is silly.
i'm tryin to see maybe some acceleration dependency can help

@BriegerCA yes your Intel CPU should be fine. are you experiencing crashes still with the latest build?

If AVX is mandatory to run localvocal (if there's no workaround and if crashing is certain), I advise to indicate this in the README, and indicate how to check whether AVX is present with lscpu. This will make debugging easier for future users while waiting for a fix. I could test on a machine with AVX tomorrow if you're interested.

oh no - i'd sooner just disable AVX to establish a baseline of a working product, and then we will need "addon" acceleration through external parties like OpenBLAS (which is already included in this build)
so i'll disable AVX on the linux builds for now and see if this resolves your crash

@BriegerCA yes your Intel CPU should be fine. are you experiencing crashes still with the latest build?
Nope,
i am good. Just the field labels are off, but that could be because of the .ini file

@royshil Hi. Is there anything for me to help?

@umireon i think we're good here, the bugs in the code were squashed by #28
the remaining problem with AVX is upstream on Whisper.cpp.
i've disabled AVX so that AMD linux machines don't crash. but this has performance implications

I've downloaded https://github.com/royshil/obs-localvocal/actions/runs/6317258827 and crash goes on, same machine without AVX and it's an Intel Pentium machine like you can read on the OBS log before in ths thread. Many Intel cpus don't have AVX.

Theres the full backtrace:

info: [obs-websocket] [WebSocketServer::Start] Not locked to IPv4 bindings
[New Thread 0x7fff41ff36c0 (LWP 262291)]
info: [obs-websocket] [WebSocketServer::Start] Server started successfully on port 4455. Possible connect address: 10.0.3.1
info: [obs-websocket] [WebSocketServer::ServerRunner] IO thread started.
[New Thread 0x7fff40ff16c0 (LWP 262292)]
[New Thread 0x7fff417f26c0 (LWP 262293)]
[Thread 0x7fff417f26c0 (LWP 262293) exited]
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Audio du Bureau)

[Thread 0x7fff40ff16c0 (LWP 262292) exited]
info: [obs-localvocal] model path changed, reloading model
info: [obs-localvocal] Checking if model models/ggml-tiny.en.bin exists in data...
info: [obs-localvocal] Model found in data: /home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin
info: [obs-localvocal] Loading whisper model from /home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin
whisper_init_from_file_no_state: loading model from '/home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin'
whisper_model_load: loading model
whisper_model_load: n_vocab       = 51864
whisper_model_load: n_audio_ctx   = 1500
whisper_model_load: n_audio_state = 384
whisper_model_load: n_audio_head  = 6
whisper_model_load: n_audio_layer = 4
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 384
whisper_model_load: n_text_head   = 6
whisper_model_load: n_text_layer  = 4
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 1
whisper_model_load: mem required  =  201.00 MB (+    3.00 MB per decoder)
whisper_model_load: adding 1607 extra tokens

Thread 1 "obs" received signal SIGILL, Illegal instruction.
0x00007fff69226e8d in ggml_type_sizef () from /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
(gdb) bt full
#0  0x00007fff69226e8d in ggml_type_sizef () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#1  0x00007fff691eb776 in whisper_model_load(whisper_model_loader*, whisper_context&) () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#2  0x00007fff691f23d7 in whisper_init_no_state () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#3  0x00007fff691f263c in whisper_init_from_file_no_state () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#4  0x00007fff691f27bb in whisper_init_from_file () at /home/ogk/.config/obs-studio/plugins/obs-localvocal/bin/64bit/obs-localvocal.so
#5  0x00007fff69187418 in init_whisper_context(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    (model_path="/home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin") at /usr/include/c++/11/bits/basic_string.h:194
        ctx = <optimized out>
#6  0x00007fff69184f98 in transcription_filter_update(void*, obs_data_t*) (data=0x7fff280664d0, s=0x7fffe4006f00)
    at /home/runner/work/obs-localvocal/obs-localvocal/src/transcription-filter.cpp:336
        new_whisper_thread = {_M_id = {_M_thread = 4607182418800017408}}
        model_file_found = "/home/ogk/.config/obs-studio/plugins/obs-localvocal/data/models/ggml-tiny.en.bin"
        step_by_step_processing = <optimized out>
        new_text_source_name = <optimized out>
        old_weak_text_source = <optimized out>
        new_model_path = "models/ggml-tiny.en.bin"
        lock = {_M_device = <optimized out>}
#7  0x00007fff69185604 in transcription_filter_create(obs_data_t*, obs_source_t*) (settings=0x7fffe4006f00, filter=<optimized out>)
    at /home/runner/work/obs-localvocal/obs-localvocal/src/transcription-filter.cpp:436
        gf = 0x7fff280664d0
        step_by_step_processing = <optimized out>
        src = {samples_per_sec = 48000, format = AUDIO_FORMAT_FLOAT_PLANAR, speakers = SPEAKERS_STEREO}
        dst = {samples_per_sec = 16000, format = AUDIO_FORMAT_FLOAT_PLANAR, speakers = SPEAKERS_MONO}
#8  0x00007ffff6787cb2 in  () at /usr/local/lib/libobs.so.0
#9  0x00007ffff6788149 in obs_source_create () at /usr/local/lib/libobs.so.0
#10 0x0000555555684395 in  ()
#11 0x0000555555684666 in  ()
#12 0x00007ffff456cee3 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#13 0x00007ffff4e32b22 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#14 0x00007ffff4e37db1 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#15 0x00007ffff5720b8a in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#16 0x00007ffff572131b in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#17 0x00007ffff55c8554 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
--Type <RET> for more, q to quit, c to continue without paging--c
#18 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#19 0x00007ffff557b931 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#20 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#21 0x00007ffff55783e8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#22 0x00007ffff55d658f in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#23 0x00007ffff55d72f5 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#24 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#25 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#26 0x00007ffff4b8e28b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#27 0x00007ffff4bd653c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#28 0x00007fffe97b52fa in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#29 0x00007ffff251c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff251ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff251cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff4707f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#33 0x00007ffff452d57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#34 0x00007ffff572364f in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#35 0x00007ffff572376f in QMenu::exec(QPoint const&, QAction*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#36 0x0000555555685d1c in  ()
#37 0x00005555555f0c43 in  ()
#38 0x00007ffff456cc18 in  () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#39 0x00007ffff56826f2 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#40 0x00007ffff567a7fa in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#41 0x00007ffff567abba in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#42 0x00007ffff568766f in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#43 0x00007ffff55c8554 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#44 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#45 0x00007ffff557b931 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#46 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#47 0x00007ffff55783e8 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#48 0x00007ffff55d5f95 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#49 0x00007ffff55d72f5 in  () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#50 0x00007ffff5582a53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#51 0x00007ffff45238b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#52 0x00007ffff4b8e28b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#53 0x00007ffff4bd653c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#54 0x00007fffe97b52fa in  () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#55 0x00007ffff251c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007ffff251ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#57 0x00007ffff251cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#58 0x00007ffff4707f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#59 0x00007ffff452d57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#60 0x00007ffff45266a8 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#61 0x00005555555e7645 in main ()
(gdb) 

@ogmkp 🤔
what Linux distro are you running?

Debian 12 stable, it's mentioned 5 times ;)

I'm currently learning how to make some deep debugging.
There memory adress that crash the obs program:

0x00007fff69226e8d <ggml_type_sizef+13> vxorps %xmm1,%xmm1,%xmm1
Seems AVX2: https://docs.oracle.com/cd/E36784_01/html/E36859/gntbd.html

I wanna try your latest main build on a AVX machine.

@ogmkp can you try to compile and run Whisper.cpp ? https://github.com/ggerganov/whisper.cpp
because thats what i'm doing internally when i build.
if that works for you - then we need to find the right compile flags
it's very possible that for your distro it would simply not works as a prebuilt binary, rather we will need a flatpak or pacstall, or simply asking people to build from scratch (it's quite simple, just takes a but of time)

I tested https://github.com/royshil/obs-localvocal/actions/runs/6307868348#artifacts on an AVX, AVX2 Intel machine on Debian 12.
No crash, still testing (captions comes with latency but more quickly than 0.0.2 and theres a a lot of recognition mistakes already related to #9).

I look at Whisper.cpp, I don't know how it works but I will look at.

@ogmkp @BriegerCA Cab we close this issue?
For me the Linux build is stable (Ubuntu 22.04)

@BriegerCA wonderful!

We didn't get your attached image here
But - let's open a separate issue for this request, since I'd like to close this one which relates to the Linux crash

@ogmkp @BriegerCA Cab we close this issue? For me the Linux build is stable (Ubuntu 22.04)

It's ok for me, I consider using localvocal on an AVX machine is mandatory.
Thanks !

resolved