-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken with libFLAC 1.4.0 through 1.4.2 ("internal psf_fseek() failed") #488
Comments
Here's the tool I'm using to search for these examples:
(My first attempt took 5 hours to run on a 300 MB file, this one takes 4 minutes.) |
Here are the exact commands you can run to check if your installation is affected:
|
On MacOS 14.6 Beta (23G5061b) M1 Max: soundfile==0.11.0python3 -c 'import soundfile; soundfile.SoundFile("83801243_0010r.dat").seek(267184)' Runs without error. soundfile==0.12.1python3 -c 'import soundfile; soundfile.SoundFile("83801243_0010r.dat").seek(267184)' Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/tompollard/projects/wfdb-python/env/lib/python3.9/site-packages/soundfile.py", line 802, in seek
_error_check(self._errorcode)
File "/Users/tompollard/projects/wfdb-python/env/lib/python3.9/site-packages/soundfile.py", line 1407, in _error_check
raise LibsndfileError(err, prefix=prefix)
soundfile.LibsndfileError: Internal psf_fseek() failed. Latest version of soundfileInstalling the latest version of soundfile from the top of https://github.com/bastibe/python-soundfile raises the same error :/
(Master branch, commit: 8ebb523725e315f24c5592677353c43c4562be54) Latest commit on soundfile branch v1.2.2Installing the version of soundfile at: https://github.com/bastibe/python-soundfile/commits/v1.2.2/ also raises the error.
(v1.2.2 branch, commit: cbaaad4fd06366b7624d0ce08354463ec7917a17) |
@bemoody have you following the discussion at: bastibe/python-soundfile#274 ? Sounds related? |
Not entirely following but it looks like that is a bug in libsndfile's float-to-integer conversion. That doesn't seem relevant. |
@tompollard: In the libsndfile-binaries repository there is a script for building
after which you should be able to reinstall and test the package as before. |
Hi @tompollard , Did |
@eagomez2: to the best of my knowledge, |
I though it was working because I was not hitting the error that I could earlier replicate in my script, but after running for some hours more I still hit the same error, even using |
Sorry I wasn't clear. Yes, if you are using Debian 10, then you're susceptible to either bug #486 or #488, depending on which version of soundfile you installed. soundfile 0.11.0 would work if you upgraded your system to Debian 13, which isn't yet released. There is also an unreleased version of soundfile that fixes the bugs for Linux x86-64, Linux arm64, Windows x86, Windows x86-64, and MacOS x86-64. That's the version that Tom mentioned above, which you can install by running
|
Thank you! So far I bypassed the problem by reading the entire file and then selecting the section I want by indexing, but I will give it a try to the aforementioned solutions. |
Some versions of libFLAC report an error when we try to seek to particular sample numbers:
(All tested only on Linux amd64.)
In the case of wfdb-python, this manifests as an exception "internal psf_fseek() failed" (but see also issue #486, which appears to be something different.)
Some examples from
mimic4wdb/0.1.0
:It'd be good to figure out why these examples are broken, and find a minimal example that we can use as a test case (and also share with the upstream flac and soundfile developers.)
The text was updated successfully, but these errors were encountered: