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: foobar2000 v1.6b2 - Soft fader output failure: bad allocation (Read 1818 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Was playing some 2-channel 24-bit 96KHz tracks, seeking through them and skipping to other tracks when suddenly the next track never started playing. Tried playing some 2-channel 16-bit 48KHz tracks and those were stalled when trying to play them too.

30 seconds or so later, the following was shown in the console:

Quote
Soft fader output failure: bad allocation
Unrecoverable playback error: bad allocation

No other files were playable until I the above failure console messages were shown.

Afterwards (potentially unrelated), some tracks would no longer show an image in the Album Art Viewer panel, either showing nothing or showing "[no image]" (only JPGs were affected, PNGs still showed). I updated one of the underlying JPGs (went from low-res to high-res) and as soon as foobar2000 received focus it silently crashed. Although the "crash reports" folder's last modified time was the exact time that the crash occurred, unfortunately no crash files were written to disk.

Guessing this was a memory corruption issue.

Fading settings are unchanged aside from seek fade out being set to 0ms.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #1
Since I can't edit my own post anymore, the Album Art Viewer issue and foobar2000 silently crashing are definitely related to the soft fader failure. Had the exact same scenario happen again.

 

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #2
Thanks for the bug report.

It looks like a memory leak issue - not sure if soft fader failing is a symptom or the cause of this; same for album art viewer.

If you see it again, please make a full dump of your foobar2000 process before killing it instructions and upload it for me to look into.
Since it may contain sensitive info, you can upload a password protected archive and send me the password privately.
Microsoft Windows: We can't script here, this is bat country.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #3
Seems to be fixed in beta 3.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #4
I was able to work around the memory leak but I still don't understand why it was happening in first place (calculated output latency becoming +inf).
I added various checks for math errors in relevant code; if you see any error messages about output latency, please report them.
Microsoft Windows: We can't script here, this is bat country.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #5
I no longer get the soft fader failure but there still seems to be some kind of memory leak going on. After skipping enough tracks foobar2000.exe uses about 2GB of memory and the Album Art Viewer panel no longer decodes large images. Sent you another dump via PM.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #6
Beta 4 posted, evil memory leak has been addressed. Thanks for your patience.
Microsoft Windows: We can't script here, this is bat country.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #7
Randomly received another soft fader failure, this time on beta 8 (didn't know 10 was out).

Soft fader output failure: Output reported nonsensical latency
Unrecoverable playback error: Output reported nonsensical latency

Took a month of playback for this error to occur so we'll see if it's reproducible in beta 10.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #8
Thanks for the report.

Was this with the default output as before?
Microsoft Windows: We can't script here, this is bat country.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #9
Yes, still set to 'Default : Primary Sound Driver'. Buffer length is 8s, fading is enabled and set to 100ms for everything but fade out on seek which is 0ms.

Re: foobar2000 v1.6b11 - buffer length

Reply #10
Apologies for using this thread, it seemed to me not worth to start a new one.

Quote
from the beta change log:
beta 11      Smooth playback: lowest buffer length is now 200ms to prevent audio glitching with overkill settings.
I just want to note that the output buffer still can be set to 50 ms (not that I use a value like that).
So either I don't understand what was meant or the change isn't there.
In theory, there is no difference between theory and practice. In practice there is.

Re: foobar2000 v1.6b2 - Soft fader output failure: bad allocation

Reply #11
Each of my output implementations has some minimum allowed latency value that it accepts (determined by testing); if asked to run with even lower latency, it uses the lowest allowed value instead without complaining. Apparently I forgot to do this for smooth playback renderer, which was just fixed (200ms lower limit).
Microsoft Windows: We can't script here, this is bat country.