Broken poject with Ardour 8.11.0?

unfortunately my project is broken, can it still be repaired?

I use self compiled Ardour 8.11.0 “Sonora Portraits” on ubuntu

Session “/home/atuc/Ardour/an_oozing_nothingness (snapshot strophe+bridge7)” did not load successfully:
Cannot initialize session/engine: Invalid or corrupt session state.

—ERROR: Could not set session state from XML
ERROR: Session: failed to load active playlists
ERROR: Session: cannot create Playlist from XML description.
ERROR: Playlist: cannot create region from XML
ERROR: Session: cannot create Region from XML description. Can not load state for region 'Nektar 20 K Ride F 04.3'

Same here. It’s an old bug about rounding errors in regions, I think it was.

Session "/Users/jegelie/Music/Fusion Of Elements WORK IN PROGRESS/3MIT-TIME/Track C wetransfer_foe-20250104_2025-01-08_1052/Track C (snapshot Track C)" did not load successfully:
Cannot initialize session/engine: Invalid or corrupt session state.

---ERROR: Could not set session state from XML
ERROR: Session: failed to load active playlists
ERROR: Session: cannot create Playlist from XML description.
ERROR: Playlist: cannot create region from XML
ERROR: Session: cannot create Region from XML description. Can not load state for region 'Astonished_Emotional_Female_voice_over_radio_in_awe_and_wonder__wowing_and_cheering_VERY_ENTHUSIASTICALLY_in_an_imaginary_language__how_fantastic_the_first_human_experience_is_in_a_time_machine.3@197-112'

do you have an idea, how to fix it.?
is it possible to edit the ardour file?

Yes it is possible to edit the ardour file. I got mine up and running by searching for the <Region …> entries, there’s two of them. I deleted the both. It’s a dirty workaround which will set you back a bit, but at least the project is not totally lost. Be sure to always work on a COPY of your original *.ardour file!

First entry is only <Region ...yadayadayada... />, delete it.
Second entry is <Region ...yadayadayada..> and lots of xml tags and </Region>, delete all between (and including) <Region ...> and </Region>.

This will result in your project without the culprit (most likely the last entered region…)

Alternatively you could follow Robin Gareus’ solution: in this post

thank you!!
i was to fast, i started ardour with an older snapshot.

but i think its another issue in my case, its not an lenght issue. the deleting of the regions does not help.

i deletetd this region:
<Region name="Nektar 20 K Ride F 04.3" muted="0" opaque="1" locked="0" video-locked="0" automatic="0" whole-file="1" 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="a1612800000@a74833920000" sync-position="a0" ancestral-start="a0" ancestral-length="a0@a0" stretch="1" shift="1" layering-index="12" 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="666036" type="audio" first-edit="nothing" source-0="666032" source-1="666034" master-source-0="666032" master-source-1="666034" channels="2"/>

Session “/home/alex/Ardour/an_oozing_nothingness (snapshot strophe+bridge7)” did not load successfully:
Cannot initialize session/engine: Invalid or corrupt session state.

—ERROR: Could not set session state from XML
ERROR: Session: failed to load active playlists
ERROR: Session: cannot create Playlist from XML description.
ERROR: Playlist: cannot create region from XML

Try starting Ardour via a terminal. The extra verbose output might show some light on why it can’t load the session. This is interesting, you could have found a new bug.

the terminal output is not reallyl helpfull:
after deleting the last region i get this in terminal:

INFO: Loading menus from /usr/local/etc/ardour8/ardour.menus
ERROR: Playlist: cannot create region from XML
ERROR: Session: cannot create Playlist from XML description.
ERROR: Session: failed to load active playlists
ERROR: Could not set session state from XML

You can just change the length field and then the session will load with the regions.
The cause of the problem is that a region can indicate it is longer than the file providing the audio data, so changing the region to indicate it is the same length or slightly shorter than the audio data solves the problem.

i changed this:
length=“a1612800000@a74833920000” → length=“a16128000@a748339200”

after that, it shows this:
ERROR: Playlist: cannot create region from XML
ERROR: Session: cannot create Playlist from XML description.
ERROR: Session: failed to load active playlists
ERROR: Could not set session state from XML

Try A16127FFFFF@a74833920000

The lengths do not use hexadecimal, only decimal. The correct value is precisely the value for the Source (file) length. Typically there is more than one place that needs editing.

would it be possible for someone to read the ardour file and see if it can still be saved?

There was once a similar issue affecting AAF imports but the AAF dev managed to fix it. In that particular case, it happened when a timeline region’s length spanned the full length of the underlying audio (in other words, the timeline region within the AAF file was unedited). I can’t remember now if the miscalculation was occurring within Ardour’s code or his AAF code but either way, he fixed it quite simply by limiting a timeline region’s length so that it could never be longer than the underlying audio.

Couldn’t Ardour perform a similar check? Or does Ardour see the problem, even with edited clips?

after deleting all regions with the name `Nektar* and lines with error messages, it has now worked. i can continue working on it again.

i hope this doesn’t happen too often? if it does, maybe there should be a repair function or tool?

It shouldn’t happen for projects created in 8.11, or ones that are working in 8.11, and it only manifests under certain circumstances for ones created in older versions.

ok, the project was created with 8.10.
hope it not happen again

and to be clear about what those conditions were:

  • the session is using musical (beat) time as the default time domain
  • the user performs an edit to an audio region that requires us to write a new audio file to disk. This includes region reversal, pitch-shifting and timestretching.
  • the region length, being based on some integer number of beats, is not an integer number of samples

If you never do all of the above in a session, the problem does not occur even in versions older than 8.11.

Now, it no longer occurs in 8.11 either, even if you do all of the above.

1 Like

It happened to me several days ago. The session has been created in Ardour 8.10 but the corruption happened after upgrade to 8.11. Actually, this was the first time I had such problem ever and it was ironically 8.11…

Pretty sure these were met.

Not sure about this, though. Fixed it manually, and don’t have the broken one at hand. But I probably can extract if from a backup and send you for analysis, if you think it is relevant.

I am sorry to be doubtful, but I am. The code in 8.11 was changed so that it no longer possible to get a fractional number of samples from a musical (beat) time, ever.

It was the same for me, the projekt was created with 8.10, but it happend with 8.11
i had used a region reverse, then it happened, whether that was the cause i don’t know