Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: 1.4 beta 6: configuration lost (Read 2333 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

1.4 beta 6: configuration lost

I got a startup message that fb2k could not open (... corrupted file or something) and if I choose to continue I might lose my config.
Which I did: the media library database and all, but not the theme. Never seen before.

For the sake of debugging: is there anywhere any log I can open and post here?


Re: 1.4 beta 6: configuration lost

Reply #2
What had happened? Did your machine shut down or crash? If foobar2000 had crashed but its internal crash handler didn't catch it there might be some info in the Windows event log's application section. But to my knowledge manually killing foobar2000 or it crashing cannot corrupt configs. It requires OS losing power during cache flush.

Re: 1.4 beta 6: configuration lost

Reply #3
OK, let us just write it off as a BSOD+pebcak: I did have a recent BSOD (that triggered this posting 17 hours earlier), but I played music for hours after that, before this happened. But could I have played Spotify only, half a Saturday without even touching fb2k until this late? Sounds totally unbelievable, given my listening habits, but let us just assume I did.

Re: 1.4 beta 6: configuration lost

Reply #4
I'm going to assume you forgot to launch foobar sooner.

Btw, the device you mentioned BSODing looks like it would work fine with the built-in Windows drivers. Remove the third party ASIO drivers and I bet the crashing stops.

Re: 1.4 beta 6: configuration lost

Reply #5
I'm going to assume you forgot to launch foobar sooner.
Yeah ... crazy as it sounds ;-)

Btw, the device you mentioned BSODing looks like it would work fine with the built-in Windows drivers. Remove the third party ASIO drivers and I bet the crashing stops.
Thanks for the tip, but there was no ASIO after the Windows reinstall. I know I am off topic to fb2k, but to follow-up anyway; during the last hour I have tried the following:
- pnputil did reveal a third-party driver from "Galaxy Far East Corp.", and I uninstalled this. (Then according to pnputil, everything else is either from Microsoft or Microsoft-signed)
- Rebooted.
- Plugged the USB cable into said device. Instant BSOD!
- A couple of reboots, "uninstall" device using Device Manager, scan for hardware changes, hotplugging attempts (no BSOD this time) in other USB ports and all that, and then tried to update driver: Device Manager gives me the same from Galaxy Far East Corp.
- I OK'ed to install this driver, and then I tried to look for a rollback (to see if Windows had even attempted to use the Windows USB Audio driver); nothing such.

So it causes BSOD even before Windows tries to run any 3rd party driver on it, and Windows does not want to use its own USB-audio driver on it.

But then I got it working, Windows refused to use both this and the other (MD-PORT, with the Windows USB-audio driver) at once; both are installed as devices with Device Manager, but only one could show up under playback devices. Known problem for a few years, and the following solution worked again:
- Installed ASIO4all:
- Let ASIO4all take control over one of them; for the hell of it, I chose the other device (the MD-PORT) first, and then replugged the HA INFO (no BSOD, lucky me)
- ... and I have both!

I don't know why I can't have both devices (connected to different USB root hubs, even) - nor why using ASIO should fix it. But now I can direct Spotify (which isn't even ASIO-aware!) to the MD-PORT and fb2k via WASAPI to the HA INFO U2. Which is pretty much what I want to do.

Just waiting for all the annoyances to reappear after next reboot though.

Re: 1.4 beta 6: configuration lost

Reply #6
Well, I never lost foobar config, no matter if I encountered power cut, reset, hang cause by other app etc. It was even hard to have it broken when I got faulty processor (L2 cache broken) - I encountered many BSODs and unexpected black screens before it got corrupted once.

But today, I faced this situation after pressing "Reset" button on my box. And I am using foobar 1.4 beta 6 right now... What happened:
I got one problematic HDD - it may be faulty (interface/connector) it it may have broken cable (to be further investigated). I got opened files from that disk when it supposedly stopped responding (files were not related to foobar - just some photos and an exec). Explorer and that exec stopped responding. As I couldn't kill Explorer and that exec I decided to restart PC. First I closed all apps including foobar. And when PC was shutting down it got stuck during "Logging off" screen. After waiting patiently 5 minutes, I just hit "Reset" button on my box. Windows (Win7 x64 PL) haven't started successfully - it got stuck during that waving Win7 logo on black background. I ordered another reset and removed that faulting disk. When Windows booted and I logged in, it turned out that foobar config was indeed lost together with theme file... From my perspective this is something related to beta6, as in similar situation on 1.3.17 I haven't lost my config.


Re: 1.4 beta 6: configuration lost

Reply #8
Just today I found one apparent glitch in media library state writer that could result in broken/incomplete config left on the disk - *IF* we crashed before media library state was saved completely. This is fixed for 1.4 beta 7.

Additionally, I'm adding long-awaited transacted filesystem use for configuration updates, so these issues will hopefully be gone, unless running in portable mode from USB stick or alike.

In the PC-reset case shown above, more than one distinct part of the configuration got corrupted.
They are all saved in sequential manner - think of an array: {general_config, playlists, library_state, theme, playcounts_etc} - not necessarily in this order but you get the idea. The next one begins saving when we have just finished saving the previous one. This way, an unexpected foobar2000 process exit in mid-rewrite cannot possibly corrupt more than one part. What must have happened was that our data was still in some layer of OS or hardware write cache when the PC was reset - from our point of view it was already written because we moved to writing another thing.
Microsoft Windows: We can't script here, this is bat country.

Re: 1.4 beta 6: configuration lost

Reply #9
Later I have found something that I forgot to mention... Not only foobar lost it's config. Firefox lost GUI customizations (while bookmarks and history looks ok) and other software got simply empty config... Looks like the fact that certain HDD became unresponsive caused overall hang in disk read/write operations on OS level. So I closed apps, their asked OS to do its job and quit, but OS got stuck during disk communication routines execution. Does it make sense? I don't know Windows internals so good...

Re: 1.4 beta 6: configuration lost

Reply #10
Hi Peter

Will it be long b4 you make the new Beta available or?

Just today I found one apparent glitch in media library state writer that could result in broken/incomplete config left on the disk - *IF* we crashed before media library state was saved completely. This is fixed for 1.4 beta 7.

Additionally, I'm adding long-awaited transacted filesystem use for configuration updates, so these issues will hopefully be gone, unless running in portable mode from USB stick or alike.

Re: 1.4 beta 6: configuration lost

Reply #11
Beta 7 posted.

There have been multiple changes aimed at preventing configuration data loss after a crash:
  • Transacted NTFS used for saving configuration by default - unless running on Windows XP, or running portable from non-NTFS device. This should - at least in theory - prevent incomplete configuration files from being ever left behind.
  • Fixed a bug that could leave library in inconsistent state if we crashed in mid-write ( thought transacted NTFS would have mitigated this as well ).
  • New way of storing playlists - playlists that have not been altered are not rewritten on every shutdown anymore.
Microsoft Windows: We can't script here, this is bat country.