Please attempt to recreate this corruption, and as soon as you do, make the session file available for download.
Yeah, lots of operations on region(s) in my case too.
Found my corrupted session. Here it is:
I really need a session that has just one operation that causes the corruption carried out.
This type of bug has happened to me a bunch of times, none of which I can pin-point the source cause of, however isn’t this just a terrible way of handling an error? Bricking an entire project because one region; one port mis-connection or whatever this initial error message box says, does brick the entire project. There should just be a user intervention fix allowed; allow us to delete the region, reconnect a routing port etc, but bricking the entire project and having to manually delete a region from a text file is pain and a half. I love ardour its the best thing going for me but this particular error is a huuge timesink in a lot of cases.
thank you for looking into these things btw
The bug that I finally identified, entirely thanks to another user who identified a single operation that would trigger it, is a bug at the deepest levels of our code that cannot be considered “recoverable”.
I could have done a “fix” earlier that would have reset the region length to match the source length upon this error being discovered during loading BUT … that would have ensured that the actual bug (which a very important and serious one) was never found.
Sometimes truly horrible bugs happen and the active help and participation of our wonderful users is the only thing that offers a path to actually finding and fixing them.
To be fair, the project isn’t “bricked” because of this bug; it’s just not recoverable by a single mouse click or two.
The fix is fairly straightforward for anyone who is able to launch Ardour from the command line and can use an editor to search-and-replace :
Run Ardour from a Terminal and there will be messages like
“Region NNN has length XXX which is longer than its (first?) source’s length of ZZZ”
Open the .ardour session file in a text editor (after making a backup), and search/replace the duration XXX with ZZZ for all affected regions.
Here’s a Linux script that should be able to fix a broken session.
#!/bin/bash
test $# -ne 2 && echo " Usage: $0 <ardour session file> <error message file>" && exit 1
test ! -r "$1" && echo "ERROR: Session file $1 doesn't exist" && exit 2
test ! -r "$2" && echo "ERROR: Error file $2 doesn't exist" && exit 3
grep -q \@a $2
test $? -ne 0 && echo "ERROR: Can't find a fitting time stamp in $2. Is this really a proper error file?" && exit 4
Date=`date +%Y%m%d%H%M%S`
cp "$1" "${1}-$Date" && echo "" && echo "Backed up the original file $1 to ${1}-$Date" && echo ""
grep "which is longer than its" "$2"| sort | uniq | \
while read Line
do
Err=`sed 's/ /\n/g' <<< "$Line" | grep \@ | cut -d\@ -f1`
OK=`awk '{print $NF}' <<< "$Line" `
echo "Changed $Err to $OK"
sed -i "s/$Err/$OK/g" "$1"
done
echo ""
Start Ardour from the terminal, pipe the stderr output to a log file and run the script with the session file and log file as arguments.
E.g.
/path/to/ardour /path/to/session/file >& ErrorFile
bash ScriptFile /path/to/session/file ErrorFile
That is fair, pardon any frustration from me from earlier. Its just frustrating to repair this particular type of issue, and I love the DAW all round, its really something.
I just more or less think a user intervention menu or something so we can bypass this without doing some grep command, I feel like that would reduce a lot of the complaints. I totally understand after trying to make my own DAW at points how this type of data can get out of sync due to the threading requirements of Audio and GPU accel audio-waveform-drawing. A simple box however that just lets people bypass this error would be helpful is all I really meant
Edit; I can try to implement this but tbh I am not familiar with the Ardour codebase as much as some others
The bug was nothing to do with data getting of sync. It was a conceptual “thinko”.
We use superclocks to represent audio time (282240000 per second). However, this is capable of representing fractional samples at any real world sample rate, and a fractional number of samples is not, in a digital audio system, a real thing. We allowed things with audio durations to have durations of fractional samples, which is impossible; when we had to convert those things into actual files on disk, which can only contain an integer number of samples, a conflict was born …
Ah I see; thank you for the insight on this
Audiophiles: hold my beer!
![]()
Cheers,
Keith
Hi,
I got the same problem; however, in my case, I’m pretty sure that it happened when saving on Ardour 8.11. I’m almost sure also that the regions concerned weren’t even modified by stretching or pitch-shifting…
It happened after importing session from pro tools (when open it again after saving).
Solved it by deleting the regions, since I can’t launch ardour with command line (is it possible on Windows?), and can’t see which length I need to replace.
Here is on region that causes the crash:
`<Region name="Cardio_182 L" muted="0" opaque="1" locked="0" video-locked="0" automatic="0" whole-file="0" import="0" external="1" sync-marked="0" left-of-split="0" right-of-split="0" hidden="0" position-locked="0" valid-transients="0" start="a0" length="a101384982720@a0" sync-position="a0" ancestral-start="a0" ancestral-length="a0@a0" stretch="1" shift="1" layering-index="0" tags="" contents="0" rgroup="0" envelope-active="0" default-fade-in="0" default-fade-out="0" fade-in-active="1" fade-out-active="1" fade-before-fx="0" scale-amplitude="1" id="14830" type="audio" first-edit="nothing" source-0="12056" master-source-0="12056" channels="1"/>`
And here’s the ardour project (if someone wan’t to investigate further):
The errors are
Region Cardio_182 L has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Cardio_182 R has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Cello_182 has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region FAR_182 L has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region FAR_182 R has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Horns_182 L has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Horns_182 R has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Omni_182 R has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Omni_185 L has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Rev_181 L has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Rev_181 R has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Violon 1_183 has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Violon 2_182 has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Winds_135 L has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
Region Cello_182.1 has length a101384982720@a0 which is longer than its (first?) source's length of a101384976840
so do an Edit/Replace from a101384982720 to a101384976840 in Notepad and you should be good to go
You can start Ardour from cmd (Command Prompt) in Windows
You just need to know where you’ve installed it to and then type something like
“C:\Program Files\Ardour8\ardour.exe” and hit Enter
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.