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

GSequecner+ Surge 1.9 crashes while AudioProcessor::process() while called ParameterChanges::addParameterData() before #5001

Closed
joelkraehemann opened this issue Sep 6, 2021 · 17 comments
Labels
Bug Report Item submitted using the Bug Report template Linux Issues which only occur on Linux

Comments

@joelkraehemann
Copy link

joelkraehemann commented Sep 6, 2021

Bug Description:

Surge crashes while AudioProcessor::process() while called ParameterChanges::addParameterData() before.

Surge Version

Latest Release: 1.9.0 (2021-04-21 )

  • Version:
  • Plugin Type: VST3
  • Bitness: 64-bit

Reproduction Steps:
Steps to reproduce the behavior:

  1. Go to 'gsequencer, add surge and some notes to the piano roll'
  2. Click on 'any control of AgsLiveVstBridge'
  3. SIGSEGV core-dumped

Expected Behavior:
Don't crash while your module gets loaded within main thread, get instantiated by any thread and processed by another thread.

Screenshots:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f9a017ee00c in ?? () from /usr/lib/vst3/Surge.vst3/Contents/x86_64-linux/Surge.so
[Current thread is 1 (Thread 0x7f99e53df700 (LWP 758152))]
(gdb) bt
#0  0x00007f9a017ee00c in  () at /usr/lib/vst3/Surge.vst3/Contents/x86_64-linux/Surge.so
#1  0x00007f9a01a1a557 in  () at /usr/lib/vst3/Surge.vst3/Contents/x86_64-linux/Surge.so
#2  0x00007f9a01a1d277 in  () at /usr/lib/vst3/Surge.vst3/Contents/x86_64-linux/Surge.so
#3  0x00007f9a406009ad in ags_fx_vst3_audio_signal_stream_feed (fx_notation_audio_signal=<optimized out>, source=0x7f99c0855d30, note=<optimized out>, pattern_mode=<optimized out>, x0=<optimized out>, x1=<optimized out>, y=60, delay_counter=<optimized out>, offset_counter=2, frame_count=13312, delay=<optimized out>, buffer_size=1024) at ags/audio/fx/ags_fx_vst3_audio_signal.c:601
#4  0x00007f9a405ee90a in ags_fx_notation_audio_signal_stream_feed (fx_notation_audio_signal=0x7f99c0735620, source=0x7f99c0855d30, note=0x56416f8e1600, pattern_mode=0, x0=0, x1=4, y=60, delay_counter=1, offset_counter=2, frame_count=13312, delay=5.859375, buffer_size=1024) at ags/audio/fx/ags_fx_notation_audio_signal.c:424
#5  0x00007f9a405eed9d in ags_fx_notation_audio_signal_real_run_inter (recall=0x7f99c0735620) at ags/audio/fx/ags_fx_notation_audio_signal.c:297
#6  0x00007f9a4060033c in ags_fx_vst3_audio_signal_real_run_inter (recall=0x7f99c0735620) at ags/audio/fx/ags_fx_vst3_audio_signal.c:231
#7  0x00007f9a404880e2 in ags_recall_real_run_inter (recall=<optimized out>) at ags/audio/ags_recall.c:5495
#8  0x00007f9a404880e2 in ags_recall_real_run_inter (recall=<optimized out>) at ags/audio/ags_recall.c:5495
#9  0x00007f9a405ff9b3 in ags_fx_vst3_channel_processor_run_inter (recall=0x7f9a2004e7b0) at ags/audio/fx/ags_fx_vst3_channel_processor.c:292
#10 0x00007f9a40488d11 in ags_recall_set_staging_flags (staging_flags=65696, recall=0x7f9a2004e7b0) at ags/audio/ags_recall.c:3180
#11 ags_recall_set_staging_flags (recall=0x7f9a2004e7b0, staging_flags=65696) at ags/audio/ags_recall.c:3085
#12 0x00007f9a4038a308 in ags_channel_real_play_recall (channel=<optimized out>, recall_id=<optimized out>, staging_flags=65696) at ags/audio/ags_channel.c:11253
#13 0x00007f9a409f265f in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007f9a40a043b9 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007f9a40a0ac6f in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007f9a40a0b1df in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007f9a403949b5 in ags_channel_play_recall (channel=0x56415314fae0, recall_id=0x56416f961840, staging_flags=65696) at ags/audio/ags_channel.c:11294
#18 0x00007f9a403988a5 in ags_channel_recursive_do_run_stage_down_input (channel=channel@entry=0x56413e29f2e0, recycling_context=recycling_context@entry=0x56416f86b760, sound_scope=sound_scope@entry=2, staging_flags=staging_flags@entry=65696) at ags/audio/ags_channel.c:14874
#19 0x00007f9a40398bbb in ags_channel_recursive_do_run_stage_down (channel=channel@entry=0x56413e29f2e0, recycling_context=recycling_context@entry=0x56416f8816a0, sound_scope=sound_scope@entry=2, staging_flags=staging_flags@entry=65696) at ags/audio/ags_channel.c:14788
#20 0x00007f9a4039a9a1 in ags_channel_real_recursive_run_stage (staging_flags=65696, sound_scope=2, channel=0x56413e29f2e0) at ags/audio/ags_channel.c:15814
#21 ags_channel_real_recursive_run_stage (channel=0x56413e29f2e0, sound_scope=2, staging_flags=65696) at ags/audio/ags_channel.c:15651
#22 0x00007f9a409f265f in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007f9a40a043b9 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007f9a40a0ac6f in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007f9a40a0b1df in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007f9a4039ac0b in ags_channel_recursive_run_stage (channel=0x56413e29f2e0, sound_scope=2, staging_flags=65696) at ags/audio/ags_channel.c:15972
#27 0x00007f9a404e5eeb in ags_audio_thread_run (thread=<optimized out>) at ags/audio/thread/ags_audio_thread.c:694
#28 0x00007f9a409f2598 in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#29 0x00007f9a40a043b9 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#30 0x00007f9a40a0ac6f in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#31 0x00007f9a40a0b1df in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#32 0x00007f9a4028a687 in ags_thread_run (thread=0x5641396b2650) at ags/thread/ags_thread.c:3037
#33 0x00007f9a4028a8c3 in ags_thread_loop (ptr=0x5641396b2650) at ags/thread/ags_thread.c:2827
#34 0x00007f9a4092826d in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f9a4023cea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#36 0x00007f9a407e3def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Computer Information (please complete the following information):

  • OS: debian unstable
  • Host: Advanced Gtk+ Sequencer
  • Version: 3.10.18

Additional Information:

gsequencer's VST3 support is new. Further the plugin runs fine, except when you edit a control.

@joelkraehemann joelkraehemann added the Bug Report Item submitted using the Bug Report template label Sep 6, 2021
@baconpaul
Copy link
Collaborator

Two quick things

  1. How do you run gsequencer? Is it an ubuntu 20 package? where do I get it to build? etc...
  2. We've been rewriting everything in JUCE and our next release will have the JUCE vst3 support which, of course, is at least more uniform but almost definitely also more robust than our old 1.9 vintage hand rolled. Can you try a build of the synth from head and see if it crashes similarly?
    Thank you

@baconpaul baconpaul changed the title Surge crashes while AudioProcessor::process() while called ParameterChanges::addParameterData() before GSequecner+ Surge 1.9 crashes while AudioProcessor::process() while called ParameterChanges::addParameterData() before Sep 6, 2021
@baconpaul baconpaul added the Linux Issues which only occur on Linux label Sep 6, 2021
@joelkraehemann
Copy link
Author

  1. https://flathub.org/apps/details/org.nongnu.gsequencer.gsequencer
  2. thank you for your information

Do you have a binary with debugging symbols? I tried the version from git Surge XT, but it doesn't show any controls ...

@baconpaul
Copy link
Collaborator

we don't distribute a debug binary

'it doesn't show any controls' is concerning though - what does that mean. Have you made sure first that it works in reaper, bitwig, carla, or ardour?

@baconpaul
Copy link
Collaborator

(those are 4 environments in which we regularly work and test is why I picked them)

@joelkraehemann
Copy link
Author

joelkraehemann commented Sep 6, 2021

I have a generated user interface, which does implement Atk interfaces ...

The AgsLiveVst3Bridge does generic UI. Are you on IRC?

@joelkraehemann
Copy link
Author

we don't distribute a debug binary

'it doesn't show any controls' is concerning though - what does that mean. Have you made sure first that it works in reaper, bitwig, carla, or ardour?

There is no need for such environments and I know what my sequencer is capable of.

@mkruselj
Copy link
Collaborator

mkruselj commented Sep 6, 2021

We use Discord, not IRC 🙂

Can you try Surge XT nightly instead and see if it also happens there or not? We won't be updating the old VSTGUI+hand-rolled wrappers anymore.

There is no need for such environments and I know what my sequencer is capable of.

Sure there is if you want to verify if things are properly installed etc. If other hosts load Surge properly, that means it might also be an issue on your side rather than our side... This is a basic procedure to narrow down host-specific issues.

At any rate, I wanna bet Surge XT won't show this behavior you're experiencing.

@joelkraehemann
Copy link
Author

joelkraehemann commented Sep 6, 2021

I have a discord account. Where is your channel? I would love you to assist me to build it from source ... It makes everything just easier.

@joelkraehemann
Copy link
Author

surge

@mkruselj
Copy link
Collaborator

mkruselj commented Sep 6, 2021

https://discord.gg/aFQDdMV But also build procedure is outlined in our README file? 🙂

@baconpaul
Copy link
Collaborator

we don't distribute a debug binary
'it doesn't show any controls' is concerning though - what does that mean. Have you made sure first that it works in reaper, bitwig, carla, or ardour?

There is no need for such environments and I know what my sequencer is capable of.

I don't know if you intended to sound rude here, but you did. If you persist in doing so I will not be available to help you.

@joelkraehemann
Copy link
Author

we don't distribute a debug binary
'it doesn't show any controls' is concerning though - what does that mean. Have you made sure first that it works in reaper, bitwig, carla, or ardour?

There is no need for such environments and I know what my sequencer is capable of.

I don't know if you intended to sound rude here, but you did. If you persist in doing so I will not be available to help you.

Might be the reaction of recommending non-free platforms. I don't want you to feel uncomfortable. I would love to support your synth in my sequencer.

So why am I not welcome?

@baconpaul
Copy link
Collaborator

Carla and Ardour are free.
You are welcome of course, but you are not welcome to my time if you persist on being rude and ignoring our advice, like you did here and on our discord. But I haven't blocked you from any of our forum, just muted you from my personal notifications.

@mkruselj
Copy link
Collaborator

mkruselj commented Sep 6, 2021

Also, regarding your comment on JUCE accessibility - it's not available on Linux so it shouldn't affect presenting parameters to host in any way.

@joelkraehemann
Copy link
Author

joelkraehemann commented Sep 6, 2021

I have some plugins from Arturia I could try to get them working ... They export their ports on the Steinberg::Vst::IEditController, but anyway I take a look at Juce. Thank you!

@baconpaul
Copy link
Collaborator

Right so the IEditController API has getParam*

Make sure you cast with the VST3 com api not with dynamic cast also. There's a variety of ways that a plugin can 'be' an IEC and not all of them are inheritance I think. But if you get a pointer you are fine.

Finally, most plugins assume that the parameter query apis will happen on the audio thread and almost none of them are coded for thread safety (but the UI thread -> audio thread generally has a thread safe pattern).

FOSS plugins which support VST3 include odin2, dexed, surge, tuning-workbench-synth and more.

@mkruselj
Copy link
Collaborator

mkruselj commented Sep 6, 2021

Fixed on Joel's side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template Linux Issues which only occur on Linux
Projects
None yet
Development

No branches or pull requests

3 participants