Best way to debug a plugin?

i try to use a plugin (midi->midi) in ardour. I wrote this plugin in c++ using JUCE. It crashes when i use two instances of the plugin on different tracks.
I put some output messages (cout) in the code of the plugin to find where the problem is, but it seems that the crash occurs not in the plugin but in Ardour. Is there a way to have some debug messages from ardour to help?
I am new with writting plugins, so can i ask please what is the usual common practice to debug plugins?
Thanks a lot,

PS: the only last message i get before crash is:

(ardour-7.4.0:16480): Gtk-CRITICAL **: 12:03:38.161: gtk_box_pack: assertion 'child->parent == NULL' failed
Erreur de segmentation (core dumped)
faure@admine-XPS-13-9380:~$ ardour-request-device: watched PID no longer exists - releasing device.

In short:

or if you build Ardour from source, run Ardour inside gdb: ./gtk2_ardour/ardbg.
When it crashes, back on the gdb prompt: backtrace will show where the crash happened.
Also check thread apply all backtrace.

Thanks! This helps.
It is also possible with binary ardour, with

Ardour7 --gdb


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.