ryukau / VSTPlugins

Uhhyou Plugins VST 3 repository.

Home Page:https://ryukau.github.io/VSTPlugins/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin UI disappears and crashes reaper on linux

muziker opened this issue · comments

On linux and in reaper, plugins can be run in 3 modes: separate processes, dedicated processes, native only ( without bridging).

In all these modes, the VSTPlugins UI appears, but if the GUI is closed and reopened, only sliders of the UI appear, everything else is blank. Occasionally reaper crashes but usually the audio gets stuck and plays the same buffer all the time.

I've applied the cairocontext patch to vstgui4 but not the fedora patch as indicated in the build instructions.

vstsdk 3.7.3

Thanks for the report.

I'll make a VM to test this issue. Could you provide following information?

  • Linux distribution and version
  • Reaper version
  • VSTGUI version

VSTGUI version is available on vst3sdk/vstgui4/vstgui/lib/vstguibase.h.

ubuntu 20.04 , reaper 6.47, vstgui 4.10.3

It seems like a bug on REAPER, so it's probably better to report on REAPER forum.

I tested with a AGain VST3 on REAPER. AGain VST3 is an example plugin bundled with VST 3 SDK. AGain crashed the same way as my plugins.

Environment

  • Fedora 35
  • REAPER v6.53/linux-x86_64 rev 3923c1
  • VST 3 SDK 3.7.4 (commit d821ee6)
  • VSTGUI 4.10.3 (commit 6431f630)

Steps to reproduce

  1. Open REAPER
  2. Load an AGain VST3 to mixer.
  3. Repeat open/close AGain VST3 GUI.

Command Line Output at Crash

$ ./reaper
[AGainController] received: AGain::setActive (true)
[AGainController] received: AGain::setActive (false)
[AGainController] received: AGain::setActive (true)
JSON Parsing Error: Invalid value.
	At byte offset: 0
JSON Parsing Error: Invalid value.
	At byte offset: 0
JSON Parsing Error: Invalid value.
	At byte offset: 0
reaper: cairo-xcb-screen.c:219: _get_screen_index: Assertion `!"reached"' failed.
Aborted (core dumped)

Stacktrace

Following stacktrace is obtained from AGain VST3.

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fbd9d6458f3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007fbd9d5f86a6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fbd9d5e27d3 in __GI_abort () at abort.c:79
#4  0x00007fbd9d5e26fb in __assert_fail_base
    (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:92
#5  0x00007fbd9d5f1396 in __GI___assert_fail
    (assertion=assertion@entry=0x7fbd9c813f2d "!\"reached\"", file=file@entry=0x7fbd9c81cfdf "cairo-xcb-screen.c", line=line@entry=219, function=function@entry=0x7fbd9c81d5d0 <__PRETTY_FUNCTION__.0.lto_priv.64> "_get_screen_index") at assert.c:101
#6  0x00007fbd9c7cca63 in _get_screen_index (xcb_screen=0x37d2344, xcb_connection=<optimized out>)
    at /usr/src/debug/cairo-1.17.4-4.fc35.x86_64/src/cairo-xcb-screen.c:219
#7  _cairo_xcb_screen_get (xcb_connection=xcb_connection@entry=0x2d85270, xcb_screen=xcb_screen@entry=0x37d2344)
    at /usr/src/debug/cairo-1.17.4-4.fc35.x86_64/src/cairo-xcb-screen.c:256
#8  0x00007fbd9c7cfb8e in cairo_xcb_surface_create (connection=0x2d85270, drawable=39845889, visual=0x37d2374, width=350, height=120)
    at /usr/src/debug/cairo-1.17.4-4.fc35.x86_64/src/cairo-xcb-surface.c:1226
#9  0x00007fbd55c4571c in VSTGUI::X11::DrawHandler::DrawHandler(VSTGUI::X11::ChildWindow const&) (this=0x26da0e8, window=...)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11frame.cpp:114
#10 0x00007fbd55c45efc in VSTGUI::X11::Frame::Impl::Impl(unsigned long, VSTGUI::CPoint, VSTGUI::IPlatformFrameCallback*)
    (this=0x26da0c0, parent=37750319, size=..., frame=0x37dd270) at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11frame.cpp:265
#11 0x00007fbd55c449a5 in VSTGUI::X11::Frame::Frame(VSTGUI::IPlatformFrameCallback*, VSTGUI::CRect const&, unsigned int, VSTGUI::IPlatformFrameConfig*)
    (this=0x3723670, frame=0x37dd270, size=..., parent=37750319, config=0x7ffe2305ad90, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11frame.cpp:581
#12 0x00007fbd55c30901 in VSTGUI::makeOwned<VSTGUI::X11::Frame, VSTGUI::IPlatformFrameCallback*&, VSTGUI::CRect const&, unsigned long&, VSTGUI::IPlatformFrameConfig*&>(VSTGUI::IPlatformFrameCallback*&, VSTGUI::CRect const&, unsigned long&, VSTGUI::IPlatformFrameConfig*&) ()
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/../../vstguibase.h:475
#13 0x00007fbd55c2fde2 in VSTGUI::LinuxFactory::createFrame(VSTGUI::IPlatformFrameCallback*, VSTGUI::CRect const&, void*, VSTGUI::PlatformType, VSTGUI::IPlatformFrameConfig*) const (this=0x235dd40, frame=0x37dd270, size=..., parent=0x240062f, parentType=VSTGUI::PlatformType::kDefaultNative, config=0x7ffe2305ad90)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/linuxfactory.cpp:92
#14 0x00007fbd55b8eb21 in VSTGUI::CFrame::open(void*, VSTGUI::PlatformType, VSTGUI::IPlatformFrameConfig*) (this=
    0x37dd250, systemWin=0x240062f, systemWindowType=VSTGUI::PlatformType::kDefaultNative, config=0x7ffe2305ad90)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/cframe.cpp:206
#15 0x00007fbd55991c05 in VSTGUI::VST3Editor::open(void*, VSTGUI::PlatformType const&) (this=
    0x219bf20, parent=0x240062f, type=@0x7ffe2305ae9c: VSTGUI::PlatformType::kDefaultNative)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/plugin-bindings/vst3editor.cpp:1198
#16 0x00007fbd559a6eb7 in Steinberg::Vst::VSTGUIEditor::attached(void*, char const*) (this=0x219bf20, parent=0x240062f, type=0xc6dd88 "X11EmbedWindowID")
    at /home/cu/Desktop/vst3sdk/public.sdk/source/vst/vstguieditor.cpp:181
#17 0x000000000096ff07 in  ()
#18 0x0000000000957726 in  ()
#19 0x00000000007a6d08 in  ()
#20 0x00000000007ac5f3 in  ()
#21 0x00000000007b23f8 in  ()
#22 0x00000000007b302b in  ()
#23 0x00007fbd9d340be2 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#24 0x000000000075f579 in  ()
#25 0x00000000007a994d in  ()
#26 0x00000000004b87bf in  ()
#27 0x00000000004c733f in  ()
#28 0x00000000004ca0f6 in  ()
#29 0x00000000004d04d8 in  ()
#30 0x0000000000a94ae2 in  ()
#31 0x0000000000a9c5ab in  ()
#32 0x00000000004ccd37 in  ()
#33 0x00000000004d04d8 in  ()
#34 0x0000000000860f70 in  ()
#35 0x00007fbd9d3506b3 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#36 0x00007fbd9d350b27 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#37 0x00007fbd9d350fad in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#38 0x00007fbd9c91a543 in _gdk_event_emit (event=0x2081c60) at ../gdk/gdkevents.c:73
#39 _gdk_event_emit (event=0x2081c60) at ../gdk/gdkevents.c:67
#40 0x00007fbd9c96d406 in gdk_event_source_dispatch.lto_priv () at ../gdk/x11/gdkeventsource.c:313
#41 0x00007fbd9caef0af in g_main_dispatch (context=0x2089740) at ../glib/gmain.c:3381
#42 g_main_context_dispatch (context=0x2089740) at ../glib/gmain.c:4099
#43 0x00007fbd9cb44308 in g_main_context_iterate.constprop.0
    (context=context@entry=0x2089740, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#44 0x00007fbd9caec8a3 in g_main_context_iteration (context=0x2089740, may_block=0) at ../glib/gmain.c:4240
#45 0x00007fbd9d352eba in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#46 0x00007fbd9d332d42 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#47 0x000000000040d806 in  ()
#48 0x00007fbd9d5e3560 in __libc_start_call_main (main=main@entry=0x40ce40, argc=argc@entry=1, argv=argv@entry=0x7ffe2305f868)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#49 0x00007fbd9d5e360c in __libc_start_main_impl (main=0x40ce40, argc=1, argv=0x7ffe2305f868, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe2305f858) at ../csu/libc-start.c:409
#50 0x000000000041a71a in _start ()

Following stacktrace is obtained from LatticeReverb. Almost identical as above.

(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f9db03de8f3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f9db03916a6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f9db037b7d3 in __GI_abort () at abort.c:79
#4  0x00007f9db037b6fb in __assert_fail_base
    (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:92
#5  0x00007f9db038a396 in __GI___assert_fail
    (assertion=assertion@entry=0x7f9daf5acf2d "!\"reached\"", file=file@entry=0x7f9daf5b5fdf "cairo-xcb-screen.c", line=line@entry=219, function=function@entry=0x7f9daf5b65d0 <__PRETTY_FUNCTION__.0.lto_priv.64> "_get_screen_index") at assert.c:101
#6  0x00007f9daf565a63 in _get_screen_index (xcb_screen=0x3a1a604, xcb_connection=<optimized out>)
    at /usr/src/debug/cairo-1.17.4-4.fc35.x86_64/src/cairo-xcb-screen.c:219
#7  _cairo_xcb_screen_get (xcb_connection=xcb_connection@entry=0x42effc0, xcb_screen=xcb_screen@entry=0x3a1a604)
    at /usr/src/debug/cairo-1.17.4-4.fc35.x86_64/src/cairo-xcb-screen.c:256
#8  0x00007f9daf568b8e in cairo_xcb_surface_create (connection=0x42effc0, drawable=54525953, visual=0x3a1a634, width=750, height=570)
    at /usr/src/debug/cairo-1.17.4-4.fc35.x86_64/src/cairo-xcb-surface.c:1226
#9  0x00007f9d6ab28586 in VSTGUI::X11::DrawHandler::DrawHandler(VSTGUI::X11::ChildWindow const&) (this=0x3e36908, window=...)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11frame.cpp:114
#10 0x00007f9d6ab28d66 in VSTGUI::X11::Frame::Impl::Impl(unsigned long, VSTGUI::CPoint, VSTGUI::IPlatformFrameCallback*)
    (this=0x3e368e0, parent=52430031, size=..., frame=0x3bf5f40) at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11frame.cpp:265
#11 0x00007f9d6ab276f7 in VSTGUI::X11::Frame::Frame(VSTGUI::IPlatformFrameCallback*, VSTGUI::CRect const&, unsigned int, VSTGUI::IPlatformFrameConfig*)
    (this=0x3bf6c40, frame=0x3bf5f40, size=..., parent=52430031, config=0x7fff0ef068e0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11frame.cpp:581
#12 0x00007f9d6ab079c3 in VSTGUI::makeOwned<VSTGUI::X11::Frame, VSTGUI::IPlatformFrameCallback*&, VSTGUI::CRect const&, unsigned long&, VSTGUI::IPlatformFrameConfig*&>(VSTGUI::IPlatformFrameCallback*&, VSTGUI::CRect const&, unsigned long&, VSTGUI::IPlatformFrameConfig*&) ()
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/../../vstguibase.h:475
#13 0x00007f9d6ab06e36 in VSTGUI::LinuxFactory::createFrame(VSTGUI::IPlatformFrameCallback*, VSTGUI::CRect const&, void*, VSTGUI::PlatformType, VSTGUI::IPlatformFrameConfig*) const (this=0x3f1fff0, frame=0x3bf5f40, size=..., parent=0x32004cf, parentType=VSTGUI::PlatformType::kDefaultNative, config=0x7fff0ef068e0)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/platform/linux/linuxfactory.cpp:92
#14 0x00007f9d6aaa85cf in VSTGUI::CFrame::open(void*, VSTGUI::PlatformType, VSTGUI::IPlatformFrameConfig*) (this=
    0x3bf5f20, systemWin=0x32004cf, systemWindowType=VSTGUI::PlatformType::kDefaultNative, config=0x7fff0ef068e0)
    at /home/cu/Desktop/vst3sdk/vstgui4/vstgui/lib/cframe.cpp:206
#15 0x00007f9d6aa04636 in Steinberg::Vst::PlugEditor::open(void*, VSTGUI::PlatformType const&) (this=
    0x370a630, parent=0x32004cf, platformType=@0x7fff0ef0697c: VSTGUI::PlatformType::kDefaultNative)
    at /home/cu/Desktop/VSTPlugins/LatticeReverb/source/../../common/gui/plugeditor.hpp:86
#16 0x00007f9d6aa9ed6b in Steinberg::Vst::VSTGUIEditor::attached(void*, char const*) (this=0x370a630, parent=0x32004cf, type=0xc6dd88 "X11EmbedWindowID")
    at /home/cu/Desktop/vst3sdk/public.sdk/source/vst/vstguieditor.cpp:181
#17 0x000000000096ff07 in  ()
#18 0x0000000000957726 in  ()
#19 0x00000000007a6d08 in  ()
#20 0x00000000007ac5f3 in  ()
#21 0x00000000007b23f8 in  ()
#22 0x00000000007b302b in  ()
#23 0x00007f9db00d9be2 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#24 0x000000000075f579 in  ()
#25 0x00000000007a994d in  ()
#26 0x00000000004b87bf in  ()
#27 0x00000000004c733f in  ()
#28 0x00000000004ca0f6 in  ()
#29 0x00000000004d04d8 in  ()
#30 0x0000000000a94ae2 in  ()
#31 0x0000000000a9c5ab in  ()
#32 0x00000000004ccd37 in  ()
#33 0x00000000004d04d8 in  ()
#34 0x0000000000860f70 in  ()
#35 0x00007f9db00e96b3 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#36 0x00007f9db00e9b27 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#37 0x00007f9db00e9fad in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#38 0x00007f9daf6b3543 in _gdk_event_emit (event=0x29859e0) at ../gdk/gdkevents.c:73
#39 _gdk_event_emit (event=0x29859e0) at ../gdk/gdkevents.c:67
#40 0x00007f9daf706406 in gdk_event_source_dispatch.lto_priv () at ../gdk/x11/gdkeventsource.c:313
#41 0x00007f9daf8880af in g_main_dispatch (context=0x2987300) at ../glib/gmain.c:3381
#42 g_main_context_dispatch (context=0x2987300) at ../glib/gmain.c:4099
#43 0x00007f9daf8dd308 in g_main_context_iterate.constprop.0
    (context=context@entry=0x2987300, block=block@entry=0, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#44 0x00007f9daf8858a3 in g_main_context_iteration (context=0x2987300, may_block=0) at ../glib/gmain.c:4240
#45 0x00007f9db00ebeba in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#46 0x00007f9db00cbd42 in  () at /home/cu/Desktop/reaper_linux_x86_64/REAPER/libSwell.so
#47 0x000000000040d806 in  ()
#48 0x00007f9db037c560 in __libc_start_call_main (main=main@entry=0x40ce40, argc=argc@entry=1, argv=argv@entry=0x7fff0ef0b348)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#49 0x00007f9db037c60c in __libc_start_main_impl (main=0x40ce40, argc=1, argv=0x7fff0ef0b348, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0ef0b338) at ../csu/libc-start.c:409
#50 0x000000000041a71a in _start ()

I also tested with sfizz on REAPER, but it didn't crash. sfizz is using their own fork of VSTGUI, so it might be the reason.

This issue has same root cause of issue #16. The crash can be patched for next release of Uhhyou Plugins. See the issue above this comment.

I added ci/linux_patch/x11frame.cpp.diff to patch the bug, and updated build instruction. It's working on Fedora. Please let me know if it works on your environment.

I close this issue. The patch is merged to VSTGUI (link).