[pyddr-discuss] Another set of crashes
Andrea Landaker
qirien at icecavern.net
Sun Feb 8 10:46:37 EST 2004
> Erm. Is something missing from this email? (Like the stack trace, and a
> description of the problem.)
Doh! I thought I hit "Save as Draft", but maybe it got sent accidentally
instead. My apologies! :-(
Anyway, here's the real crash info. :-)
pyDance has been crashing randomly while I am playing songs. It seems to
happen most often near the end of a harder song, but that could just be the
ones I remember because they're the most frustrating. :-) The odd thing is,
I can't reproduce it on the same song at the same place - sometimes it will
crash, and sometimes it will run just fine. I have seen this error on both
SM and DWI files.
Here's the stack trace I get:
------------BEGIN STACK TRACE--------------------
Playing /home/qirien/.pydance/songs/anime/Obsession/obsession.dwi
.Hack/Sign - Obsession by See-Saw
open /dev/sequencer: No such device or address
Traceback (most recent call last):
File "/usr/games/pydance", line 194, in ?
if __name__ == '__main__': main()
File "/usr/games/pydance", line 184, in main
menudriver.do(screen, (songs, crs, screen))
File "/usr/share/games/pydance/menudriver.py", line 262, in do
me.display()
File "/usr/share/games/pydance/menus.py", line 185, in display
ev = self.items[curitem].activate(ev)
File "/usr/share/games/pydance/menus.py", line 57, in activate
text, subtext = self.callbacks[ev](*self.args)
File "/usr/share/games/pydance/menudriver.py", line 155, in wrap_ctr
Obj(*args)
File "/usr/share/games/pydance/gameselect.py", line 203, in __init__
self.loop()
File "/usr/share/games/pydance/gameselect.py", line 225, in loop
MODES.get((VALUES[0][indices[0]],
File "/usr/share/games/pydance/songselect.py", line 232, in __init__
self.loop()
File "/usr/share/games/pydance/songselect.py", line 320, in loop
self._configs, self._config, self._game)
File "/usr/share/games/pydance/dance.py", line 215, in play
if dance(screen, songdata, players, prevscr, first, game):
File "/usr/share/games/pydance/dance.py", line 335, in dance
for plr in players: plr.get_next_events(song)
File "/usr/share/games/pydance/player.py", line 335, in get_next_events
self.judge)
File "/usr/share/games/pydance/player.py", line 367, in _get_next_events
self, song)
File "/usr/share/games/pydance/arrows.py", line 234, in __init__
AbstractArrow.__init__(self, arrow, beats[1], secret, player, song)
File "/usr/share/games/pydance/arrows.py", line 32, in __init__
self.endbeat = beat / 4
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
------------END STACK TRACE--------------------
So, I looked at the code in arrows.py, and before line 32, I added a few
prints to see what beat was, and it turns out that sometimes beat is None
(which I guess is the equivalent of null), and that of course causes the
program to crash.
MODIFIED CODE:
# Barf. Sometimes beat means 16th notes, for historical
# reasons. Here it sanely means quarter notes.
print "init-arrow; beat:"
print beat
self.endbeat = beat / 4
NEW OUTPUT:
Playing /home/qirien/.pydance/songs/classical/winter/winter.dwi
WINTER by Banya
open /dev/sequencer: No such device or address
init-arrow; beat:
32.0
.
.
.
.
init-arrow; beat:
1160.0
init-arrow; beat:
1162.0
init-arrow; beat:
None
(then the same stack trace).
If you need the SM or DWI files that cause the crash, I can provide them; just
let me know. I didn't see a bug-tracking system for pyDance; otherwise I
would have submitted this there. :-)
--
Andrea Landaker
http://www.icecavern.net/~qirien/
More information about the pyddr-discuss
mailing list