Invalid or corrupt session state

I get this error when trying to open a very recent project I am working on.

Session "/home/…/home-rec-02122024 (snapshot home-rec-02122024)" 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 'Take54_perc-1.6'
ERROR: Session: cannot create Region from XML description. Can not load state for region 'Take54_perc-1.2'
...

Here is my file: cl
Any idea how to open my file?

Yet another instance of rounding errors when using MusicTime for Audio :frowning:

Fixed session file (replaced “a139003289” with “a139003200”) at Wild Mint

Region Take54_perc-1.6 has length a139003289@a79589311402 which is longer than its (first?) source's length of a139003200
Region Take54_perc-1.3 has length a139003289@a74843341985 which is longer than its (first?) source's length of a139003200`
Region Take54_perc-1.2 has length a139003289@a76114229192 which is longer than its (first?) source's length of a139003200
1 Like

Thank you very much @x42!
Can I do something about using MusicTime or not, to avoid this in the future?

There is an option for this when creating a session. The default used to be “BeatTime”

You can later change it later in Session > Properties > Misc.

1 Like

Hi @x42
I’ve the same thing described by tarball on a file, with ardour 8.10 (but I have a backup, so no need to correct, I’ll record again)

In the backup file, which is ok , I look at Session> Properties > Misc and the “Default time domain” can be only “Muscial (beats) time” , which is selected , or “Audio (wallclock) time”.

Can you tell which setting is the best according to you for recording all instruments except drumkits with drumgizmo?

Prefer “Audio (wallclock) Time”.

Thanks Robin, I’ll do this ! :slightly_smiling_face: :pray:

Hi @x42

After setting audio (wallclock) time, and recording again, I have the same issue :frowning:

Can you help me?
There is the .ardour file :

Thanks in advance :pray:

I figured I’d reply to this topic since I woke up this morning to the same bug. How can I get a full dump of all the regions that need fixing? and then what exactly do I need to fix? You said it’s a rounding issue, but wanna make sure I do it right.

Also does this mean we should NEVER use Beat Time for sessions?

EDIT: I tried simply deleting all lines in the session file relating to the corrupted regions, on a copy of the session file. I now only get the “Could not state session state from XML” set of errors without the list of regions. But I still can’t open it.

Is there any way I can get the session back? it’s a time sensitive project for a client.

I tried with the debug version to find what was not OK

(https://ardour.org/debugging_ardour.html )

And in the console I found :
Region AudioIn-94.1 has length a3072182400@a73664640000 which is longer than its (first?) source’s length of a2873573640

So I opened the .ardour file , and I removed this XML Region :slight_smile: , and the session start again :grin:

Now I’ll have to try to correct with the good time (like Robin did)

How were you able to get the backtrace on the console? I tried using the debug version, but I couldn’t get GDB to give me a backtrace. Do I have to force Ardour to crash?

For me there was no need of gdb :

  • I started a Terminal,
  • In the terminal : /usr/local/bin/Ardour9 myCorruptedFile.ardour
  • when the error occured, I looked the console in the terminal, there was :

> Region AudioIn-94.1 has length a3072182400@a73664640000 which is longer than its (first?) source's length of a2873573640

Then I edited myCorruptedFile.ardour, at the line with <Region name=“AudioIn-94.1”, there was :

<Region name="AudioIn-94.1" muted="0" opaque="1" locked="0" video-locked="0" automatic="0" whole-file="0" import="0" external="0" sync-marked="0" left-of-split="0" right-of-split="0" hidden="0" position-locked="0" valid-transients="0" start="a0" length="a3072182400@a73664640000" sync-position="a0" ancestral-start="a0" ancestral-length="a0@a0" stretch="1" shift="1" layering-index="52" tags="" contents="0" rgroup="320832" 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="5007909" type="audio" first-edit="nothing" source-0="5007601" master-source-0="5007601" channels="1">

I changed it into :
<Region name="AudioIn-94.1" muted="0" opaque="1" locked="0" video-locked="0" automatic="0" whole-file="0" import="0" external="0" sync-marked="0" left-of-split="0" right-of-split="0" hidden="0" position-locked="0" valid-transients="0" start="a0" length="a2873573640@a73664640000" sync-position="a0" ancestral-start="a0" ancestral-length="a0@a0" stretch="1" shift="1" layering-index="52" tags="" contents="0" rgroup="320832" 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="5007909" type="audio" first-edit="nothing" source-0="5007601" master-source-0="5007601" channels="1">

And then, always with ardour , I tried to reopen the file, and it was ok

And it’s ok now with my “casual” Ardour

Maybe, the same thing occurs (error in terminal) when you use the “casual” ardour , I didn’t try :laughing:

1 Like

Question: It’s possible if this error (invalid or corrupt session state) occurs only if you are loading snapshots?

I had other similar problems today (corrected for now), after recording session…

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 'AudioIn-131.1'

Region AudioIn-134.1 has length a4082601600@a73664640000 which is longer than its (first?) source’s length of a3009048840

Region AudioIn-136.1 has length a4656960000@a73664640000 which is longer than its (first?) source’s length of a3409453320

And no need of the debug version of ardour : launch it in a terminal, you 'll see the errors :wink:

1 Like

Thank you sooooo much! It took me in hour to fix all the regions. After a while it’d keep crashing just for an extra region it hadn’t informed me on first. And after a few edits (NVim saved me) I ended up getting the session back!

My client is gonna be happy now.

Cool, it works. Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.