Exit code -1073741571 (0xC00000FD) when writing OGG files with python-soundfile
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- audio-video-rtc, backend
Research direction
Start by reading the linked python-soundfile issue and its maintainer response, then trace libsndfile's OGG/Vorbis writing path and relevant tests. Reproduce the crash with the reported repeated writes and check whether the process still exits with 0xC00000FD; done means the cause is identified and the crash is fixed or documented with a reproducer.
Written by the indexing model from the issue text.
Description
I use python-soundfile library and trying to write OGG file to BytesIO buffer, however every time I call sf.write(format="ogg") on my audio data, I get exit code -1073741571 (0xC00000FD).
Here's my function:
def attempt_convert_to_vorbis(audio_data: np.ndarray, samplerate: int, uses_librosa_format: bool) -> None | bytes:
if uses_librosa_format:
audio_data = audio_data.T
vorbis_buffer = io.BytesIO()
for i in range(0, 101):
print(f"{i}%.")
sf.write(vorbis_buffer, audio_data, samplerate, format="ogg", subtype="vorbis", compression_level=0.01*i)
print("Wrote Vorbis data to buffer.")
vorbis_buffer.seek(0)
vorbis_data, _ = sf.read(vorbis_buffer)
print("Read Vorbis data from buffer.")
if np.array_equal(audio_data, vorbis_data):
print("Vorbis data is identical to original.")
return vorbis_buffer.read()
return None
Even if I add try-except chunk for this call, the process just finishes with same exit code. Same thing happens if I remove compression_level, subtype and replace BytesIO buffer with actual file path.
I've first opened this issue on python-soundfile issues page. The maintainer responded to it saying it's probably libsndfile issue.
- Dominant language
- C
- Stars
- 1.7k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libsndfile/libsndfile
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
libsndfile/libsndfile#1239 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
libsndfile/libsndfile#1238 · 2 comments ·
-
NULL pointer dereference in alac_pakt_read_decode() via unchecked alac_pakt_alloc() returnPossibly taken @Perennos claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
libsndfile/libsndfile#1220 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
libsndfile/libsndfile#1182 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
libsndfile/libsndfile#1165 ·
All issues in libsndfile/libsndfile
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Broken links in reference manualPossibly taken @farisbasha claimed this 14 days ago. Opencore:meson
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mpv-player/mpv#18934 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100