recovering corrupted session

13 replies [Last post]
nickj4096
User offline. Last seen 14 hours 19 min ago. Offline
Joined: 2012-10-25
Posts:

Hi,
I have an Ardour session that crashed and which I now can't open. other sessions seem to work normally. I'm looking for suggestions for how to recover the data. (I'd also be interested in submitting a bug report, except that the initial crash happened on an outdated version and I haven't reproduced that yet.)

Initial crash: I was doing some recording and editing in Ardour. I selected a range (on the order of a minute long) over three or four tracks, copied it, and pasted it to just after itself. At this point I heard a buzz (I assume it was XRuns) and the GUI went at least partially unresponsive for a few seconds (can't remember exact details of this). At this point I ctrl+s'd (not sure if good idea, but I didn't know when I'd last saved) and closed Ardour.

Subsequent crashes: When I try to open the session in question, the little Ardour splash screen shows up as usual, and then (usually after it displays "Setup Editor") a bunch of XRuns happen and Ardour closes (link to Jack output below). Other sessions, old and new, open as normal. I have not been able to reproduce the initial crash / set corruption in other sessions.

System: Arch Linux on Lenovo T420s. When the initial crash occurred my system was some months out of date and I believe I was running Ardour 3.5.308. Subsequently I updated Arch; I now have Ardour 3.5.380 (update had no apparent effect on re-opening the corrupted set). Currently running jack2 1.9.9.5; not sure what release it was during initial crash. For audio hardware, during initial crash I was using a Zoom H2 for external soundcard and mic. During subsequent attempts to open the set I've tried running jack with the H2 and with my internal soundcard (HDA Intel).

Data:
Ardour session in question: http://njoliat.the-nsa.org/ardour_issue/cph_organ_jam_bak.tar.gz
Just the XML files from session: http://njoliat.the-nsa.org/session_files/
Jack output during an attempted-session-opening crash: http://pastebin.com/rfyrqBsx
(I haven't gotten a decent stack trace yet as I'm running the Arch package; if/when I do I'll add that.)

Here are a few things I've tried so far; not sure if they're relevant:
* temporarily moving session-folder/instant.xml and ~/.config/ardour3/instant.xml out of the way
* replacing session.ardour with session.ardour.bak
* removing the plugins (namely 12-band EQ, Compressor, and Analyzer, all by Calf) from the .ardour file.

Thanks!

nickj4096
User offline. Last seen 14 hours 19 min ago. Offline
Joined: 2012-10-25
Posts:

sorry, the link to the XML files from the session is wrong; here is the correct link: http://njoliat.the-nsa.org/ardour_issue/session_files/

veda_sticks
User offline. Last seen 2 days 21 hours ago. Offline
Joined: 2011-03-11
Posts:

ive never tried to fix a corrupted ardour session but i had something similar happen to kdenlive before they found a way to stop it happening.

If you open the xml in a text editor that supports xml (i think kate might understand the formattting) it should up some syntax errors in the file which i corrected to get the session working again.

ofcoarse this may only work with kdenlive or other programs so it may not be the case for ardour.

but its worth a shot, any errors should be highlights in red, you can reference that with a known good file to see if you can work out whats wrong.

seablade
User offline. Last seen 5 hours 30 min ago. Offline
Joined: 2007-01-22
Posts:

@nickj4096

First off make a backup of your session file.

Second we need to see the console output of Ardour, and yes a stack trace would help tremendously.

Since you made a backup of the session file, remove all the references to plugins in the session file and see if it opens then? The most common cause of this is a plugin issue. You can restore from the backup you made depending on the outcome.

Seablade

nickj4096
User offline. Last seen 14 hours 19 min ago. Offline
Joined: 2012-10-25
Posts:

Thanks for the help!

@seablade: I tried recording some console output.
Console output of "usr/lib/ardour3 ~/session_file": http://njoliat.the-nsa.org/ardour_issue/cmd_out

Also tried using "--debug all", which caused Ardour to spew output for a few minutes (until I killed it) instead of crashing quickly. Here's the output of that, with a few million lines of "DEBUG::TempoMath: Add Beat at 163|4 @ 15624000" (or "@ [other integer]") deleted. http://njoliat.the-nsa.org/ardour_issue/cmd_out_debug_all

Here's the same thing but after I removed the plugins and references to their id's.
http://njoliat.the-nsa.org/ardour_issue/cmd_out_plugins_rmd_debug_all
(Here's the modified session file for that http://njoliat.the-nsa.org/ardour_issue/cph_organ_jam.ardour.no_plugins)
One thing which might be relevant is that with this version (plugins removed and --debug all), instead of the typical XRun buzz sound, when it's hanging and spewing messages I can actually hear the feedback from Ardour's track monitoring.

(For another variation, instead of editing the XML I used the "-d" cmd option: http://njoliat.the-nsa.org/ardour_issue/cmd_out_d_P_D)

Anyway does this seem helpful at all, or is it still not much good without a trace?

I'm afraid I'm actually a little confused about what version of Ardour I need in order to get a backtrace; i.e. whether or not I need to build it myself. This page https://ardour.org/debugging_ardour.html says "If you built Ardour yourself and did not explicitly turn debugging off, then your version will have debug symbols available. If you got Ardour from ardour.org, then (... mumble ...)", so I wasn't really sure what that was supposed to mean. I tried running my Arch package version with just "--debug" as mentioned later down on that page but it said it the option required an argument. Anyway, would you recommend trying this with a version downloaded from the site?

nickj4096
User offline. Last seen 14 hours 19 min ago. Offline
Joined: 2012-10-25
Posts:

@seablade
here is the trace: http://pastebin.com/3P3imcky

paul
paul's picture
User offline. Last seen 2 days 15 hours ago. Offline
Joined: 2006-03-16
Posts:

You're using a version of Ardour which allows absurd zoom levels. The zoom level in your session's instant.xml and the instant.xml file in ~/.config/ardour3 needs to be changed to a value like "512" rather than the crazy value it has now. Both files need to be corrected before the problem will go away.

This has already been fixed in the ardour git repository.

nickj4096
User offline. Last seen 14 hours 19 min ago. Offline
Joined: 2012-10-25
Posts:

@paul
thanks for the reply. I set the zoom levels in session/instant.xml and in ~/.config/ardour3/instant.xml to 512 but I still get a crash on attempting to open. here are new console output and backtrace:
http://njoliat.the-nsa.org/ardour_issue/cmd_out_fixed_zoom.txt
http://njoliat.the-nsa.org/ardour_issue/backtrace_fixed_zoom.txt

paul
paul's picture
User offline. Last seen 2 days 15 hours ago. Offline
Joined: 2006-03-16
Posts:

Same cause. Email the files in question to me (paul@linuxaudiosystems.com)

paul
paul's picture
User offline. Last seen 2 days 15 hours ago. Offline
Joined: 2006-03-16
Posts:

Put a little differently, you have a region positioned roughly 6 million years into the timeline ..... I can fix this.

nickj4096
User offline. Last seen 14 hours 19 min ago. Offline
Joined: 2012-10-25
Posts:

for general thread closure: I was able to repair the session file with Paul's suggestion; it was a matter of finding the region-length timestamp that was 6 million years in frames and editing it down. thanks all!

veda_sticks
User offline. Last seen 2 days 21 hours ago. Offline
Joined: 2011-03-11
Posts:

geeez 6 million years in the future!

mental!

linuxdsp
linuxdsp's picture
User offline. Last seen 11 hours 1 min ago. Offline
Joined: 2009-02-04
Posts:

geeez 6 million years in the future

At last, the year of the Linux desktop... :)

seablade
User offline. Last seen 5 hours 30 min ago. Offline
Joined: 2007-01-22
Posts:

@linuxdsp

Well played sir... I grant you one internets!

Seablade