What encoder did you use with foobar2000 to create alac files? Foobar2000 itself can't do it.
I use ffmpeg.exe
QuoteI use ffmpeg.exeHow old is it? Built-in fb2k ALAC decoder doesn't have problems with up-to-date ffmpeg.
Since the opening of the ALAC codec I've been using refalac instead of ffmpeg to create ALAC files, maybe you can try that instead of ffmpeg ALAC. I don't know whether current ffmpeg uses the now open ALAC sources, or still the old reverse-engineered one, but I favour the official implementation.
If all you're seeing is "error flushing the decoder: <details>", it has absolutely no impact on the decoded data.