ARDOUR in debug mode

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

Post Reply
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

ARDOUR in debug mode

Post by lilith »

Hi,

here (https://ardour.org/debugging_ardour) it is explained how to run Ardour in debug mode under linux, but it's not 100% clear to me. Is it possible to start Ardour (I did not build it by myself) via gdb with

/opt/Ardour_<VERSION>/bin/ardour<N> --gdb

?

I also read somewhere that in debug mode it's not possible to use Jack. Is this still true?

Cheers
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: ARDOUR in debug mode

Post by ssj71 »

If ardour is in your path you can just do

Code: Select all

ardour --gdb
You can use jack, but sometimes when it hits a breakpoint JACK will kill the process, so you only get 1 shot virtually. I think it depends on which jack version and your settings because I've had it just work fine and I've had jack kill ardour when the debugger stops it.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: ARDOUR in debug mode

Post by tramp »

ssj71 wrote:You can use jack, but sometimes when it hits a breakpoint JACK will kill the process, so you only get 1 shot virtually.
When I debug a jack application I use the "dummy" driver with high period/frames settings, that avoid that JACK kill the process.
On the road again.
User avatar
sysrqer
Established Member
Posts: 2519
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: ARDOUR in debug mode

Post by sysrqer »

It says on the page you linked:
Be sure to start JACK without the --realtime / -R switch. Also the client timeout variable should be set to a large value such as 5000 (--timeout / -t).
I thought that you need to run a debug version of ardour for the output to be meaningful.

Also, if you're reporting anything to do with Calf plugins then I wouldn't bother wasting your time. There is somewhat of a blame game going on and the ardour devs openly recommend to not use them.
User avatar
lilith
Established Member
Posts: 1698
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Has thanked: 117 times
Been thanked: 57 times
Contact:

Re: ARDOUR in debug mode

Post by lilith »

Thank's guys,

it seems to work.

@sysrqer: This was also my thought at first, but it's obviously not necessary. For Qtraction it's necessary to built it with debug properties, but for Ardour this doesn't seem to be the case.

When trying to run ardour from /opt/ardour/bin/ardour-5.12.0

I get an error message:

error while loading shared libraries: libardourcp.so: cannot open shared object file: No such file or directory

Anyone knows the reason for this?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
edit: I was wrong: https://community.ardour.org/node/15626
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: ARDOUR in debug mode

Post by ssj71 »

I suppose I haven't noticed because the only time I'm debugging ardour, I'm really debugging my own plugins in ardour...
but yes you need a debug version of ardour if you are actually debugging ardour.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: ARDOUR in debug mode

Post by sadko4u »

For debugging plugins, I've implemented JACK wrapping layer. And it's much easier to debug anything, because plugin is running as a standalone application. Also the startup time is much more fast rather than starting Ardour and creating plugin instance.
The only FINAL debugging I perform already for LV2 and VST loaded by the host. In most cases there are no problems with LV2 and VST after all has become working in standalone (JACK) mode.
LSP (Linux Studio Plugins) Developer and Maintainer.
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: ARDOUR in debug mode

Post by ssj71 »

I do most of my debugging in jalv which isn't much more than a jack wrapper. Occasionally though there is some issue reported that only appears in ardour, so I test there. I agree Ardour isn't the first place to debug a plugin.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: ARDOUR in debug mode

Post by tramp »

sadko4u wrote:For debugging plugins, I've implemented JACK wrapping layer. And it's much easier to debug anything, because plugin is running as a standalone application. Also the startup time is much more fast rather than starting Ardour and creating plugin instance.
As a first step that may be sufficient, equal to use jalv, but later on you need to check how multiple instances of your plug behave in a multi plugin host (symbol visibility in UI, for example) .
Then, the jack dummy driver will be your friend to debug in Ardour. :)
On the road again.
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: ARDOUR in debug mode

Post by ssj71 »

tramp wrote:you need to check how multiple instances of your plug behave in a multi plugin host (symbol visibility in UI, for example)
Can't any of these sort of issues be avoided by not using static global variables? Not that testing is bad, but I thought that multiple instances is exactly why we avoid those in plugins...
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: ARDOUR in debug mode

Post by sadko4u »

tramp wrote:As a first step that may be sufficient, equal to use jalv, but later on you need to check how multiple instances of your plug behave in a multi plugin host (symbol visibility in UI, for example) .
Then, the jack dummy driver will be your friend to debug in Ardour. :)
In most cases it doesn't matter. My usual debug case:
- Start JACK with dummy driver.
- Start Ardour and create test project.
- Compile plugins and launch the selected plugin from Eclipse IDE in debug mode.
- Connect outputs of Ardour to inputs of plugin.
- ...
- Profit.

The 99% of bugs can be found and eliminated in the standalone plugin instance with IDE. All other bugs require to launch Ardour in debug mode and run LV2/VST plugin instance under Ardour.
LSP (Linux Studio Plugins) Developer and Maintainer.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: ARDOUR in debug mode

Post by tramp »

ssj71 wrote:
tramp wrote:you need to check how multiple instances of your plug behave in a multi plugin host (symbol visibility in UI, for example)
Can't any of these sort of issues be avoided by not using static global variables? Not that testing is bad, but I thought that multiple instances is exactly why we avoid those in plugins...
When you create your own widgets and include them into the UI, it could lead to issues without using global vars.
No problem when you load them from a library (static or dynamic).
On the road again.
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: ARDOUR in debug mode

Post by ssj71 »

tramp wrote: When you create your own widgets and include them into the UI
It must depend on what toolkit you use.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Post Reply