Skip to content

Hard crash after sound finishes playing with python 3.12 #72

@scottnm

Description

@scottnm

overview

simpleaudio 1.0.4 seems to crash for me when using python 3.12

the same crash does not reproduce in python 3.11

the crash does not appear to be any form of python failure that I can either catch as an exception or intercept with a python debugger

example

Here's the sample code I'm testing with

try:
    wav_file = simpleaudio.WaveObject.from_wave_file('test.wav')
    print('playing sound(s) using simpleaudio')
    play_obj = wav_file.play()
    play_obj.wait_done()
    print('done')
    play_obj.stop()
    print('stopped')
except BaseException as ex:
    print(f"caught exception {ex}")

when run from a python 3.12 environment with simpleaudio 1.0.4, this is the output

> python .\main.py
playing sound(s) using simpleaudio

here's the same run but from a python 3.11 environment

> python .\main.py
playing sound(s) using simpleaudio
done
stopped

Repro Environment information

  • full python versions: 3.11.0 and 3.12.1
  • OS: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions