PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.51k stars 306 forks source link

assert fails in pyinstaller compiled binary #978

Open hananbeer opened 2 weeks ago

hananbeer commented 2 weeks ago

I have a python script that works in the interpreter and it uses PyAudioWPatch (a windows patch of pyaudio, which may or may not be related)

but whenever I use pyinstaller it keeps crashing at random times, sometimes with this assert: https://github.com/PortAudio/portaudio/blob/57aa393109ec996799d3a5846c9ecb0a65b64644/src/common/pa_front.c#L233

it seems pretty inconsistent as sometimes there is no error at all, but at least sometimes as this assert suggests it fails enumerating the devices / getting device count / (unlikely but) the default device index is out of bounds?

the mac version of pyinstaller works so it seems specific to windows.

RossBencina commented 6 days ago

The obvious possibilities are that it is a bug in the host api that is initializing that hostApi->info struct, or the memory is getting corrupted somehow.

I don't know what pyinstaller is. Are you always using the same PortAudio binary or does that vary between the setup that works and the setup that fails the assert?