Any Way to Recover "Orphaned Files"?

Linux Version: Linux Mint 18.2
Audacity Version: 2.3.2 (the latest in the repository)
Source: Distribution Repository

I have never, in my entire life, simultaneously loved and hated a single piece of software more than I love/hate Audacity :laughing:

When it’s working, Audacity is perfect. It’s exactly the tool I need, and no other tool can even seem to compare (especially now that I have a few Nyquist scripts/plug-ins that generous people on this forum have shared with me).

The problem is, it crashes several times per hour. It crashes by freezing, so even if I run it from the command line there is absolutely no output indicating what went wrong. But even that is really just an annoyance, because usually it recovers my file. Even if I choose not to recover it, I usually only lose my work from that session: I still have my original file.

However, twice in the past week Audacity has crashed in a way that it loses all the track info. When I come back to the file it tells me that everything has been orphaned, and nothing I’ve tried doing afterwards fixes things. I then have a file with tracks of the exact right length … but no audio in them.

I did change the name of a different project in the same folder recently, but I did not rename that particular project. I also didn’t do anything else that I’ve read could cause this.

So two questions:

A) Is there any way to recover this entire file’s worth of work? The data seems like it’s all still there, just “orphaned” (which I assume means not associated with any track). Is there any way I can listen to the tracks (I tried listening to the files in the data folder but that didn’t work) and somehow tell Audacity “this file is track #1, that file is track #2, …”? Or better yet, any way to have Audacity figure it out for me?

B) What can I do to prevent this in the future? Again, I <3 Audacity, and I don’t want to change to a different program! But obviously crashing multiple times per hour and losing an entire file (for me 15-20 minutes of audio, which takes several hours of effort) on a weekly basis is no bueno.

So two questions:

Only one:

How do I keep Audacity from crashing?

Did you build your machine? Is there an exhaustive Linux memory checker? The one that loops and you leave running all night?

Video and audio production programs take lots of elbow room. Creating a spreadsheet may not take up lots of memory, but if you’re trying to create a multi-hour, multi-channel stereo production, you’re going to go right out to the extremes of memory in a heartbeat. Any memory problems waiting out there have the signature of “only failing every other day or so.”

usually it recovers my file.

I have never needed Audacity to recover my files on multiple machines in all three operating systems. Your machine is broken.

This is where the Linux forum elves step in and start you with diagnostics and repair before you create any more damage.

Start with the memory checker. That can turn up a whole raft of problems.

Are you using Cloud Storage or Network Connected Drives? You should probably stop. Audacity doesn’t always get along with those.

Koz

Screen Shot 2019-06-25 at 17.24.51.png
Adapt that to your machine.

Koz

First off, thanks so much for responding.

Second, Ubuntu no longer provides a memory tester on their live CD (which of course, Murphy’s Law, I had to download, make a live USB boot disk, and boot to actually discover). For future reference I would suggest you refer people (including anyone reading this later on) to download the (free version of) MemTest https://www.memtest86.com/download.htm. That will give you a zip file with a “memtest86-usb.img” image file in it. You can burn that to a DVD … or you can use the package usb-creator-gtk (or usb-creator-kde, whichever floats your boat) to make a bootable USB stick out of it.

I did that, booted up mem test, and got 91% through it before I had to reboot for work. Tonight after I’m done I’ll boot up into it again and run the full test suite … but given that it got 91% through without finding anything, and given that this is a professionally built laptop and not a home-built desktop (I’ve built plenty of desktops myself, this just happens not to be one of them) I don’t think my memory is the problem.

But I will try to confirm that 100% tonight. Thanks again.

I don’t think my memory is the problem.

I don’t either, but I’ve had enough of those fail to want to make sure before galloping off with exotic tests and odd assumptions.

but given that it got 91% through without finding anything

Doesn’t count.

Memcheck “Charging Rhinoceros” test failed memory location: bank 4 element 37. Pass 26, 04:36 hours.

I’m making up the details, but not the event. Memcheck requires that the rest of the machine be in top condition, too. If it’s not you get migrating errors.

There is no reason for Memcheck to ever fail.

I do wonder why Steve isn’t here yet. He’s the Linux Practitioner.

Koz

Charging Rhinoceros

Did you look at the test suite? The individual tests all have adorable names like “Rippling Checkerboard” and “Wandering Digits.”

Koz

Sorry for not responding sooner. I completed a scan (100%) and it found nothing. Any other suggestions would be welcome.

Just to recap:

Your machine is broken.

It’s not, it’s working just fine with every other program I use. Furthermore:

Start with the memory checker. That can turn up a whole raft of problems.

Did that, it passed with flying colors. Machine != broken.

Are you using Cloud Storage or Network Connected Drives? You should probably stop. Audacity doesn’t always get along with those.

Not using those.

So is there anything I can do except wait for this mythical Steve? Is there nothing at all in-between “your computer is broken” and “your computer is possessed by the devil and can’t run Audacity”? Like anything else I can try that might help?

As I said, I’ve tried other programs and they’re all a nightmare compared to Audacity. I’m willing to try anything, but I just don’t know what to do with software that crashes frequently without giving any debug info whatsoever that I could use to figure out what’s wrong.

Have you said what you’re trying to do (specifically)?
What are your settings in the device toolbar?

Like anything else I can try that might help?

You’re having an odd/serious problem with Audacity on Linux and the only real support is the forum. We would normally be waiting for someone to arrive that has the same machine config that you do to compare notes. This isn’t a help desk although it can seem like one because of the resident Elves Who Have Seen Everything.

But if this fails…

All most of us can do is shoot for generic concepts such as:

I tried listening to the files in the data folder but that didn’t work

That could be the Kiss Of Death. The snippets in the _data folder are 6 second actual sound files (except for some graphic files) If they don’t play, that’s not good news.

And that snaps us back to why your machine and Audacity are unstable. Question 1.

Koz

I tend to either be in “initial recording mode”, or “fixing the audio” mode.

In the recording mode, precisely because of the crashes, I just record one track after another (I used to edit as I went but I don’t anymore). I’m usually able to get an entire 15 minutes or so of audio recorded by doing that.

Then I edit to fix stuff. By far my biggest editing operation is using the Noise Reduction effect or just manually deleting tiny bits of tracks, to remove “clicks” that seem to naturally get added (unless I’m extremely careful with my mouth movements as I speak). I also use Normalize and Amplify some to make the audio of each track be the same, and sometimes when I amplify a given track too much I then have to go back and remove noise from every silent part of the track, to get rid of general background noise.

I also rearrange tracks (I align them pretty frequently), but that rarely seems to cause problems. It’s more like I’ll be “fixing” a track, with noise reduction and manual deleting, and then I’ll hit play (maybe for the thirtieth time, maybe for the three hundred and thirtieth … it’s hard to predict), and when I stop playing Audacity freezes.

EDIT: I just froze now after doing some editing, restarted Audacity, and it froze after just playing a part of a track once. So unless it’s possible for me to break things in a way that they stay broken even in-between runs of Audacity, it doesn’t seem like I have to do anything at all special (just play part of a track and stop … it’s always the stop that’s the problem) to get a freeze.

Because of the freeze, there appears to be no way to get any kind of debugging info, which makes it all the harder to figure out what’s going on.

As for my device toolbar, it’s set to ALSA, microphone icon, “default: Line: 0”, “1 (Mono) Recording Channel”, volume icon, and default. I don’t even have any other options instead of ALSA, which seems a little odd since I think I use PulseAudio for everything, but then ALSA (being older) seems like it should be more stable.

Really the only at all unique thing about my setup is that I have an external USB sound card (which only records in mono) … but the whole reason I use that is that I get better audio quality on my recordings than with my built-in sound card.

And as a programmer the last thing I want to be is a burden. At the very least as a very technical user I should be able to take even the slightest “you can learn more by doing X, or you might have luck with trying Y” suggestion here and run with it myself.

But as I said, a huge part of how I debug as a programmer is to look at the error output, and there is literally none in this case. If someone could point me to a log file or something somewhere I would be all over it, but right now all I have is command line output, and when Audacity freezes and I have to kill it that leads to nothing useful at the command line.

And as a programmer the last thing I want to be is a burden.

Hardly that. The support record goes to Ian in Hollywood (a real place) who wanted to read for audiobooks in his apartment. Just over a year and 39 forum chapters—and we succeeded. But he had a ton of interacting conventional problems and he was on Windows. Even I had a passable idea what he was doing.


You are missing the one sentence job.

Such as: “I’m reading for audiobooks.”

-or-

“I’m creating a music radio show for the public library.”

You can use more than one sentence, but you get the idea. This sounds so far a lot like one poster in Maine who created actual broadcast radio shows in his living room and then shipped them to the station.

I have an external USB sound card (which only records in mono)

Whose name is?

Koz

Linux has logs. What do they say?

Screen Shot 2019-07-01 at 18.44.46.png
Koz

PulseAudio uses ALSA as it’s back end.

The problem is probably due to an old Audacity/PulseAudio problem.

Which version of Audacity do you have?
Please post the output from “Audio device info” (it’s probably in the “Help” menu).

First off, thanks everyone for all the help! Wall of text incoming (a mix of quotes, replies, and audio diagnostics at the end).

I am recording (approximately) 15 minute lessons for an Introduction to Web Development course. Once the audio file is assembled I then output a WAV file and use FFMPEG to combine it with a screen capture of a Google Slides presentation.

Sabrent … is the companyname/name on the USB device. I could probably find the specific model number with some arcane Linux command or by rebooting and checking the BIOS (if the audio diagnostics below don’t provide that; let me know).

The problem is, even though I 100% believe you that logs exist, I’m still no closer to getting them to you than before when I wrote:

As a side note, it seems like a Help => Logs menu item would solve this, and probably wouldn’t be hard to implement, but I have no idea how often this comes up (and therefore whether it would save effort or not).

I did find two “log files” at the command line:

/usr/share/doc/audacity/changelog.Debian.gz
/usr/share/doc/audacity-data/changelog.Debian.gz

… but I highly doubt they’re what you’re referring to. So if you could just give me a menu path, a command I could run, or a system path (or even a relative one like ~/.audacity-data/logs) or something I would love to provide you with logs (and would be curious to see what they say myself).

Ah, that makes sense (and based on my very limited experience with Linux audio systems, I agree :slight_smile:).

There’s an About, which tells me I’m using Audacity 2.3.2, and then under Help => Diagnostics => Audio Device Info it tells me …


==============================
Default recording device number: 10
Default playback device number: 10
==============================
Device ID: 0
Device name: HDA Intel PCH: ALC892 Analog (hw:0,0)
Host name: ALSA
Recording channels: 2
Playback channels: 0
Low Recording Latency: 0.00870748
Low Playback Latency: -1
High Recording Latency: 0.0348299
High Playback Latency: -1
Supported Rates:
==============================
Device ID: 1
Device name: HDA Intel PCH: ALC892 Digital (hw:0,1)
Host name: ALSA
Recording channels: 0
Playback channels: 2
Low Recording Latency: -1
Low Playback Latency: 0.00870748
High Recording Latency: -1
High Playback Latency: 0.0348299
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 2
Device name: HDA NVidia: HDMI 0 (hw:1,3)
Host name: ALSA
Recording channels: 0
Playback channels: 8
Low Recording Latency: -1
Low Playback Latency: 0.00870748
High Recording Latency: -1
High Playback Latency: 0.0348299
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    176400
    192000
==============================
Device ID: 3
Device name: HDA NVidia: HDMI 1 (hw:1,7)
Host name: ALSA
Recording channels: 0
Playback channels: 8
Low Recording Latency: -1
Low Playback Latency: 0.00870748
High Recording Latency: -1
High Playback Latency: 0.0348299
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    176400
    192000
==============================
Device ID: 4
Device name: USB 2.0 Camera: Audio (hw:2,0)
Host name: ALSA
Recording channels: 1
Playback channels: 0
Low Recording Latency: 0.00870748
Low Playback Latency: -1
High Recording Latency: 0.0348299
High Playback Latency: -1
Supported Rates:
==============================
Device ID: 5
Device name: USB Audio Device: - (hw:3,0)
Host name: ALSA
Recording channels: 1
Playback channels: 2
Low Recording Latency: 0.00870748
Low Playback Latency: 0.00870748
High Recording Latency: 0.0348299
High Playback Latency: 0.0348299
Supported Rates:
    44100
    48000
==============================
Device ID: 6
Device name: sysdefault
Host name: ALSA
Recording channels: 128
Playback channels: 0
Low Recording Latency: 0.0213333
Low Playback Latency: -1
High Recording Latency: 0.0213333
High Playback Latency: -1
Supported Rates:
==============================
Device ID: 7
Device name: iec958
Host name: ALSA
Recording channels: 0
Playback channels: 2
Low Recording Latency: -1
Low Playback Latency: 0.00870748
High Recording Latency: -1
High Playback Latency: 0.0348299
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 8
Device name: spdif
Host name: ALSA
Recording channels: 0
Playback channels: 2
Low Recording Latency: -1
Low Playback Latency: 0.00870748
High Recording Latency: -1
High Playback Latency: 0.0348299
Supported Rates:
    32000
    44100
    48000
    88200
    96000
    192000
==============================
Device ID: 9
Device name: pulse
Host name: ALSA
Recording channels: 32
Playback channels: 32
Low Recording Latency: 0.00870748
Low Playback Latency: 0.00870748
High Recording Latency: 0.0348299
High Playback Latency: 0.0348299
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
    176400
    192000
==============================
Device ID: 10
Device name: default
Host name: ALSA
Recording channels: 32
Playback channels: 32
Low Recording Latency: 0.00870748
Low Playback Latency: 0.00870748
High Recording Latency: 0.0348299
High Playback Latency: 0.0348299
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
    176400
    192000
==============================
Selected recording device: 10 - default
Selected playback device: 10 - default
Supported Rates:
    8000
    9600
    11025
    12000
    15000
    16000
    22050
    24000
    32000
    44100
    48000
    88200
    96000
    176400
    192000
==============================
Available mixers:
==============================
Available recording sources:
0 - Line:0
1 - Mic:0
2 - Internal Mic:0
==============================
Available playback volumes:
0 - Master:0
1 - Headphone:0
2 - Speaker:0
3 - PCM:0
4 - Front:0
5 - Surround:0
6 - Center:0
7 - LFE:0
8 - Line:0
9 - Line Boost:0
10 - Mic:0
11 - Mic Boost:0
==============================
Recording volume is native
Playback volume is native

That surprised me. Is that from Panda Jim’s PPA? (not important, just interested).

Re. Audio device info and the device toolbar settings:

“default” is the system default sound system, which on Ubuntu (and most other modern Desktop distributions) is PulseAudio (same as “pulse”).

Do you use the USB Audio Device for recording and playback? If so, try setting the device toolbar to use “Device ID: 5 USB Audio Device: - (hw:3,0)”.

A bit of background:
The “hw” devices in the list represent physical hardware devices. By selecting “hw” devices in the device toolbar, you tell Audacity to use the device directly through ALSA, bypassing PulseAudio.

The main benefit of doing this is stability. ALSA drivers are usually rock solid stable.
The downside is that you lose the advanced mixing options that are provided by Pulse Audio. This usually means that only one application can access the device at a time - if any other application is accessing the device, then Audacity will not be able to access the device (and will show an appropriate error message.

It’s from the PPA: http://ppa.launchpad.net/unbutuhandbook1/audacity/ubuntu enial main (ubuntuhandbook1/audacity). I have no idea where I got that repository from; I think I was trying to solve my problems a few months back, and figured “maybe a newer version would help”, so I found some random repository with a newer version and used it.

I have absolutely no attachment to that repo and will happily try any other.

I do use the USB device, and I’ve tried changing that to “USB Audio Device: - (hw:3,0)” (and that background was interesting, thank you).

However, I don’t think that can be the cause of the problem, because it’s never (or almost never) recording that causes the crash, it’s playing back the audio (and specifically stopping the playback which causes the freeze).

Also, the only other app that uses sound that I run while doing Audacity work is Chrome (sometimes I also have a game in WINE, but testing has shown that whether the game is up or not I have the issue). It’s certainly possible that Chrome could be “colliding” with Audacity somehow, but it’d have to be on a background level (ie. I’m not playing Youtube videos while I record or anything).

Thank you for the complete details.

Wall of text incoming

Instead of quote tags for long passages, you can use code tags instead. The shortcut key is left arrow, slash, right arrow, but of course, you can type it manually.


Screen Shot 2019-07-02 at 10.47.54.png
Close the tag at the end. I patched your posting. I hope you don’t mind. We don’t normally do that, but this seemed appropriate.

Koz

Thanks for doing that for me. I’m actually familiar with these tags from a similar vBulletin forum … I just didn’t think to use code in this case :frowning:

That’s here: Audacity Audio Editor and Recorder : Panda Jim
This is a long established PPA. I’ve used it myself in the past.

The one thing to be wary of, (with any PPA), is that the PPA builds are not official releases, and no-one tests them, so you can easily end up with buggy pre-release versions.

A good way to use PPAs, is to enable the PPA when there’s a release build that you want, then disable the PPA. Your installed app will then remain at the same version, until either you re-enable the PPA, or the official Ubuntu release version catches up.

Which playback device do you use? Look for the “hw” device in the Audio Device Info that corresponds to the physical device that you use for playback.

“Freezing on stop” is a classic symptom of the Audacity/PulseAudio problem.