Deflectouch icon indicating copy to clipboard operation
Deflectouch copied to clipboard

Game crashes if no audio support

Open CrazyPyro opened this issue 12 years ago • 3 comments

Audio support should be an optional thing. But if there is not audio support, then all calls to SoundLoader.load will return None, which causes problems later when you try to call play() on them without checking. Perhaps wrap these calls?

CrazyPyro avatar May 09 '12 06:05 CrazyPyro

[INFO ] Kivy v1.3.0-dev [INFO ] [Logger ] Record log in /home/neil/.kivy/logs/kivy_12-05-09_88.txt [INFO ] [Factory ] 107 symbols loaded [WARNING] [Audio ] Unable to use as loader! [WARNING] [Audio ] Unable to use as loader! ... [WARNING] [Audio ] Unable to found a loader for <sound/deflectouch.ogg> Traceback (most recent call last): File "main.py", line 542, in Deflectouch().run() File "/usr/lib64/python2.7/site-packages/kivy/app.py", line 464, in run root = self.build() File "main.py", line 476, in build self.music.volume = self.config.getint('General', 'Music') / 100.0 AttributeError: 'NoneType' object has no attribute 'volume'

CrazyPyro avatar May 09 '12 06:05 CrazyPyro

BTW, cool game. I'm reading it to try to get the hang of Kivy programming, as it's better than their examples.

CrazyPyro avatar May 09 '12 06:05 CrazyPyro

Thanks :) Unfortunately, I won't have the time to debug this by catching an exception because i've lots of things going on at the moment. But thanks anyway for setting up the issue.

stocyr avatar May 09 '12 07:05 stocyr