HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: torturesauce on 2021-04-20 16:08:24

Title: Foobar crashes when deleting files from File Operations
Post by: torturesauce on 2021-04-20 16:08:24
Hello, all! Fb2k has been driving me nuts lately. After I convert some files from WAV to FLAC and then using File Operations -> Delete Files, it crashes after deleting a few files. I am forced to shut it down via Task Manager, then redo the same process for the remaining files. It usually doesn't crash after the second or third attempt. I've been having this problem since version 1.5; I use the latest 1.6.6 beta 2 and the problem persists. I have the latest Free Encoder Pack.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: A_Man_Eating_Duck on 2021-04-21 02:02:22
Did you submit the foobar2000 crash logs?
Title: Re: Foobar crashes when deleting files from File Operations
Post by: torturesauce on 2021-04-21 02:55:36
Did you submit the foobar2000 crash logs?

Sorry, I should have said "freezes" instead of "crashes". It doesn't show me the "foobar has crashed" window that allows me to submit crash logs, nor are there any files on my "crash reports" folder. It just freezes and I have to shut it down with Task Manager.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: kode54 on 2021-04-21 04:21:54
It would help if you could right click on the process in Task Manager and save a dump from the process where it's locked up, then share it.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: anamorphic on 2021-04-21 13:10:27
Also see the debug info at the end of pinned support topic (https://hydrogenaud.io/index.php?topic=67779.0).
Title: Re: Foobar crashes when deleting files from File Operations
Post by: torturesauce on 2021-04-21 16:05:31
It would help if you could right click on the process in Task Manager and save a dump from the process where it's locked up, then share it.

I just made one, and it's 800MB...
Title: Re: Foobar crashes when deleting files from File Operations
Post by: torturesauce on 2021-04-21 16:29:37
It would help if you could right click on the process in Task Manager and save a dump from the process where it's locked up, then share it.

I just made one, and it's 800MB...

Removed a bunch of unnecessary components. It still crashes, but the dump is now 667MB.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: jazzthieve on 2021-04-21 17:00:24
How many files are you attempting to delete at once? Hundreds to thousands or just a couple of dozen?
Title: Re: Foobar crashes when deleting files from File Operations
Post by: Case on 2021-04-21 17:02:29
To my knowledge memory dump created with 64-bit Task Manager won't be debuggable. If you wish Peter to debug the hang cause, you need to use 32-bit task manager. There are instructions for that here (https://hydrogenaud.io/index.php?topic=114002.msg938774#msg938774).
Title: Re: Foobar crashes when deleting files from File Operations
Post by: mjm716 on 2021-04-22 03:26:39
I have a similar ongoing issue for some time now. It doesn't crash/lock me however, so I've just lived with it.

When I delete via FO, usually more than 50 at a time, I can see the files disappearing from the playlist and then a progress window will appear, with the bar progressing until just before the end when it stops and the window remains on screen. Cancel/close do not function on the window.

The files will be gone and I can continue using FB normally, but need to restart to remove the "processing files" window.

Occasionally the same thing happens when I rename many files (100s).

Nothing via console or log.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: torturesauce on 2021-04-29 19:17:32
Sorry for the late reply. Here (https://drive.google.com/file/d/1yJjcvZDmMdRCvELSD4A21B9qeBGASqQo/view?usp=sharing) is the crash dump (160MB .7z, almost 800MB when uncompressed). Or should I send it to Peter directly?

How many files are you attempting to delete at once? Hundreds to thousands or just a couple of dozen?

It happens either when I try to delete hundreds of files or only a few.

Title: Re: Foobar crashes when deleting files from File Operations
Post by: Peter on 2021-04-30 14:11:34
Thanks for the details.

The operation seems to be stuck in DeleteFileW(), the Windows function that deletes a file from your disk.
This seems like a problem with your system, there's not much I can do about it, other than special fixes around it so it can't freeze the entire foobar2000 application.

As a workaround, I recommend setting foobar2000 to recycle instead of delete:
Preferences / Advanced / Tools / File Operations / Deletion Type
Title: Re: Foobar crashes when deleting files from File Operations
Post by: torturesauce on 2021-04-30 18:44:58
As a workaround, I recommend setting foobar2000 to recycle instead of delete:
Preferences / Advanced / Tools / File Operations / Deletion Type

Thank you very much! I will do that!
Title: Re: Foobar crashes when deleting files from File Operations
Post by: elcosomalo on 2021-12-27 21:32:30
Mine is doing the same on my media server. And foobar seems to not like saving settings/playlists and other stuff in real time which means that everything since the last start is lost. Its worth mentioning that the app is not closed in any moment since its being used as server so after 3 weeks of use maybe I delete one file and it makes it crash foobar making all my playlists editions gone (also creating a new problem: deleted files are still being shown on the playlists).
Gonna try the advanced settings method but since I already had it set to send to recycler bin I will try the other setting to delete directly.

It would be good if you could change the app behaviour, save playlists and settings in realtime instead of doing that on a clean close.

Title: Re: Foobar crashes when deleting files from File Operations
Post by: kode54 on 2021-12-28 00:10:51
The configuration in 1.6.x and older is too complex in design to support real time saving as settings are changed. An upcoming alpha, similar to what the macOS and mobile versions already do, saves all settings and playlists in real time, but that's a long ways off being ready, as far as I know.

The problem with saving and loading in real time is that the settings files have to be designed for real time modifications, including insertions and deletions of individual settings as they're altered. The older versions use binary files with binary identifiers for every variable, and are designed for the whole set to be serialized at once on save, and read completely on startup only.

There's still the issue of the crashing, which shouldn't be happening either way.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: anamorphic on 2021-12-28 10:34:50
And foobar seems to not like saving settings/playlists and other stuff in real time which means that everything since the last start is lost.
I suggest to use foo_jesus (https://www.foobar2000.org/components/view/foo_jesus) for auto-saves (configure in Preferences > Advanced > Autosave...), or manually [hold SHIFT key] > File > Save Configuration every so often.
Title: Re: Foobar crashes when deleting files from File Operations
Post by: elcosomalo on 2021-12-28 15:41:59
And foobar seems to not like saving settings/playlists and other stuff in real time which means that everything since the last start is lost.
I suggest to use foo_jesus (https://www.foobar2000.org/components/view/foo_jesus) for auto-saves (configure in Preferences > Advanced > Autosave...), or manually [hold SHIFT key] > File > Save Configuration every so often.

Thanks for that! I will try it as a workaround