kelvinlawson/pykaraoke — Issue #10: Unresponsive after playing a MIDI file without lyrics
Author: kelvinlawson
Created: 2011-11-15 08:55:43+00:00
State: open

Reported on mailing list by Pietro Battiston:

> there are some MIDI files (I can provide an example only privately,
since they are not free) for which, when played, PyKaraoke only shows
the error
>"ERROR: Could not parse the MIDI file"
and then, in another MessageDialog, the error
>"No lyrics in the track".
>Now, that would be fair to me... the only problem is that then,
pykaraoke is stuck: not unresponsive, but it won't play any other file,
and will print forever in the terminal:
>Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.7/pykaraoke.py", line 3815, in
handleIdle
> position = self.Player.GetPos()
> File "/usr/lib/pymodules/python2.7/pykar.py", line 1072, in GetPos
> if self.useMidiTimer:
>AttributeError: midPlayer instance has no attribute 'useMidiTimer'

> Interestingly, if I played some MIDI _before_ trying to play the faulty
one, then in the background that will play again, but without showing
the lyrics (and i will not be able to stop it in any way).

> You may think it is stupid to play faulty MIDI files, or MIDI files
without lyrics... but when I have a huge library it's impossible to try
all of them before, and then it's also annoying to have to restart the
program (and loose the queue) any time a faulty one is chosen...

> Maybe an alternative fix could be to (optionally) run some "validity
check" on MIDI files when refreshing the library?

> by the way, thanks for the nice app

> Pietro