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

Hi,

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,

Ardour3-3.5.35

on,

$ 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

Cheers.

@paul

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 (http://tracker.ardour.org/view.php?id=5414#bugnotes) 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) (http://tracker.ardour.org/view.php?id=5414#bugnotes)
follows…

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 editor_drag.cc 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, time_selection.cc 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 time_selection.cc.

"
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 editor_drag.cc.
ie.,

"
— editor_drag.cc 2014-02-19 18:22:52.000000000 +0000
+++ editor_drag.cc.new 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;

}

void
"

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.

Brian

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: http://tracker.ardour.org/view.php?id=5414

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