Ardour 8.10: Invalid or corrupt session state

With my session file after I closed it normally, the day after I get this error:

Session “/data/music_kl/99_idea54 (snapshot 99_idea54)” 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 ‘Take273_drum1-1.13’
ERROR: Session: cannot create Region from XML description. Can not load state for region ‘Take273_drum1-1.11’

How I can recover my session files?

Thanks in advance

Got the same issue as well. Ardour 8.10:

—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 'Take44_SY99-1.4'

Already tried loading the .BAK file, gives the same error.

Look at this thread:

You can into an edge-case bug.

Region Take271_drum1-1.15 has length a165282228@a37460945355 which is longer than its (first?) source's length of a165280920
Region Take271_drum1-1.15 has length a165282228@a37460945355 which is longer than its (first?) source's length of a165280920
Region Take271_drum1-1.16 has length a165282228@a37460945355 which is longer than its (first?) source's length of a165280920
Region Take273_drum1-1.11 has length a39823637@a47769921691 which is longer than its (first?) source's length of a39819360
Region Take273_drum1-1.11 has length a39823637@a47769921691 which is longer than its (first?) source's length of a39819360
Region Take273_drum1-1.13 has length a85527273@a47809745328 which is longer than its (first?) source's length of a85524600
Region Take273_drum1-1.13 has length a85527273@a47809745328 which is longer than its (first?) source's length of a85524600

I have replaced the respective duration with the slightly shorter ones:

Fixed session file: The choice

Hmm… Do you know why this error occurs sometimes?

Is this something that could be scripted and given to users to self-fix?

Cheers,

Keith

Hi, I have 2 projects I can’t open for this same reason. Sorry, I haven’t understood any of the fix solutions as described in this forum to date. What options do I have to fix my files? Thanks very much.

To minimize the issue, use “AudioTime” when creating a session (dropdown in the new-session dialog). The underlying bug is a rounding error when using BeatTime (bar/beat/ticks).

If you have a session that does not load, you can either post it here and @paul or me or someone can have a look.

Alternatively: 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

You then 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.

Hi Robin, thanks, that’s very helpful and has worked. A bit of a pain going through that, and it takes 2 passes, but better than losing my work. If it helps, the first file was a snapshot and in Audio Time. The 2nd - not a snapshot but a first save of a project and in Beat Time.

Why attempt to trim the region content at its beginning or end at all?

Following the tape-machine paradigm there should be a leader and trailer to spool the tape onto its reels.