community
community copied to clipboard
segmentation fault python error with soundLoader and MIDI file
Software Versions
- Python: 3.9.10
- OS: macOS 10.15.7
- Kivy: 2.0.0
- Kivy installation method: pip3 install kivy
Describe the bug
When playing a MIDI file, the most of the times the app is closed and I am getting segmentation fault python . The sound is actually played, but when it ends python is closed.
Code and Logs and screenshots
from kivy.app import App
from kivy.core.audio import SoundLoader
from kivy.uix.button import Button
class play_btn(Button):
def __init__(self, **kwargs):
super(Button, self).__init__(**kwargs)
self.sound = SoundLoader.load('contorno.mid')
def on_release(self):
self.sound.play()
class myApp(App):
def build(self):
return play_btn()
myApp().run()
Considering that we updated SDL dependencies and that on macOS midi support is available via SDL, can you check if is still an issue on Kivy 2.1.0?
I am getting the same error.
This is what I have in my virtual environment after I run pip3 install kivy in case you want to check it.
certifi=2021.10.8 charset-normalizer=2.0.12 docutils=0.18.1 idna=3.3 Kivy=2.1.0 Kivy-Garden=0.1.4 pip=21.2.4 Pygments=2.11.2 requests=2.27.1 setuptools=58.1.0 urllib3=1.26.8
Not able to reproduce it with a demo midi file. Can you attach a midi file that is actually failing on your side?
Since github doesn't accept .mid as a attach file, this is a wetransfer link https://we.tl/t-dH4r3MXfMq