programming error: request for non-existent audio range (0)!


Has anyone seen this one,

Open a session in Ardour,

Set range mode (‘r’).

Select a range within the bounds of an existing object.

Hit shift d and then duplicate in the dialog.

Ardour crashes with,

programming error: request for non-existent audio range (0)!

press to exit


I’m running,



$ uname -a
Linux Bernabeu 3.11.0-18-generic #32~precise1-Ubuntu SMP Thu Feb 20 17:54:21 UTC 2014 i686 i686 i386 GNU/Linux



Hi Paul,

I looked into this further and believe I’ve found the cause of the problem.
I prepared an update for the bug on mantis ( but have added it here as I don’t seem to have a login over there.

Apologies in advance if this update doesnt belong here.
I’m new here, and just trying to help where I can.

Cheers, Brian

Update for
programming error: request for non-existant audio range (0) (

The problem starts when a drag event is triggered with the users selection of the range to be duplicated.

‘clicked_selection’ is set to zero at line 3956 in as part of the SelectionDrag::finished(…) callback.

This occurs even if the user action is a time selection.

After this the logic subsequently breaks down in ‘TimeSelection::operator[] (uint32_t which)’, line 33, as ‘which’ (set from clicked_selection) now contains zero, the original clicked_selection id having been over written and lost. Hence the ‘non-existent audio range (0)!’ crash seven lines after.

You can see this with a couple of added debug cout lines after the loop start, line 35

std::cout << "which = " << which << std::endl;
std::cout << “URHERE i = " << i->id << " (” << i->start << “,” << i->end << “)” << std::endl;

You will see it iterating past the users time selection (identified by the start and end sample values) before finally crashing.

To fix this issue I tried moving where clicked_selection is zero’d (together with stop_canvas_autoscroll() for good measure) before the previous closing ‘}’ in

— 2014-02-19 18:22:52.000000000 +0000
+++ 2014-04-04 09:36:20.649246999 +0100
@@ -3950,10 +3950,13 @@
s->request_stop (false, false);

  •   _editor->stop_canvas_autoscroll ();
  •   _editor->clicked_selection = 0;
  • }
  • _editor->stop_canvas_autoscroll ();
  • _editor->clicked_selection = 0;



This seems to resolve the issue, duplicate works fine, no crash.
I don’t not know yet what if any, other functionality this patch may break.
I’ll leave it in my build here and test it more as I use Ardour.


I can copy that into the bug report, as ive already added to a bug report relating to this.

Cheers Veda_sticks

Yes this happens every time I try and do that in Ardour 3.5.357. Is it in Mantis? If not you should report it

Sorry for double post, I found it here:

It was reported over a year ago but does not seem to have been addressed

Also, it turns out it was me that posted it and I forgot about it haha >_<

same thing happens to me, I’ll check mantis if its not there ill add a bug report or add to an existing report. This is repeatable by 3 people on different machines using the same version so its a bug,.

Thanks guys! Glad to know its not just me. Cheers

sorry, typo, should have said ‘Ardour3-3.5.357’, Cheers