community icon indicating copy to clipboard operation
community copied to clipboard

segmentation fault python error with soundLoader and MIDI file

Open ricrudo opened this issue 3 years ago • 4 comments
trafficstars

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()

ricrudo avatar Mar 05 '22 15:03 ricrudo

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?

misl6 avatar Mar 09 '22 18:03 misl6

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

ricrudo avatar Mar 11 '22 05:03 ricrudo

Not able to reproduce it with a demo midi file. Can you attach a midi file that is actually failing on your side?

misl6 avatar Mar 13 '22 09:03 misl6

Since github doesn't accept .mid as a attach file, this is a wetransfer link https://we.tl/t-dH4r3MXfMq

ricrudo avatar Mar 13 '22 11:03 ricrudo