python-soundfile icon indicating copy to clipboard operation
python-soundfile copied to clipboard

Writing to ogg crashes Python

Open User670 opened this issue 5 years ago • 5 comments
trafficstars

Windows 10 x64, Python 3.8.1. PySoundFile installed with pip install pysoundfile.

With Python's interactive interpreter from the command line (directly typing python in cmd), I opened an ogg file (about 37 seconds long, sample rate 48000, 6 channels), and wrote the same data back to another ogg. This caused python to exit without printing any error message. Writing the same data to a wav file does not cause any error whatsoever.

If there is any other information I need to provide to help solve the issue, please let me know :-/

User670 avatar May 14 '20 06:05 User670

Try installing pip install soundfile instead, which is the current and correct version.

If the problem persists, could you upload that ogg file somewhere so we can have a look?

bastibe avatar May 14 '20 09:05 bastibe

Problem persists. https://drive.google.com/open?id=1NpRpaugoo98U8cCmb7EgCETLeKennxaw

User670 avatar May 14 '20 09:05 User670

Does the problem occur for any kind of ogg file, or is it specific to this data or sample rate or number of channels?

At any rate, this problem is likely a bug in libsndfile, not SoundFile.

bastibe avatar May 26 '20 07:05 bastibe

I have such a crash only when I compile my Qt application with cx_freeze and then try to write an .ogg file. Other file types write without problems. Also if I run my application as a script in the interpreter, no crashes, writes .ogg just fine.

kbasaran avatar Jun 08 '21 07:06 kbasaran

This sounds like there is a conflict between a version of libvorbis loaded by Qt and by libsndfile. Conflicts such as these are colloquially known as "DLL Hell". Essentially, C libraries export a list of symbols (functions, constants, etc), and if you load a C library twice, only one set of symbols can be active. If you load two different versions of the library, you have a problem.

bastibe avatar Jun 08 '21 14:06 bastibe