New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waveform plugin: NaN ValueError thrown repeatedly under some conditions #2195

Closed
declension opened this Issue Jan 12, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@declension
Member

declension commented Jan 12, 2017

I got repeated (every second) exceptions (as below) being thrown and the dialog produced, but I can't reproduce now. It was after the Pulse sound source changed whilst QL was paused for a long time (BT headphones disconnected), not sure if that was the trigger.

Traceback (most recent call last):

  File "/home/nick/workspace/quodlibet/quodlibet/quodlibet/ext/events/waveformseekbar.py", line 258, in do_draw
    self.draw_waveform(cr, width, height, elapsed_color, fg_color)

  File "/home/nick/workspace/quodlibet/quodlibet/quodlibet/ext/events/waveformseekbar.py", line 221, in draw_waveform
    cr.line_to(x, ceil(half_height + val))

ValueError: cannot convert float NaN to integer

@declension declension self-assigned this Jan 12, 2017

lazka added a commit that referenced this issue Jan 22, 2017

Waveform plugin: fix Float NaN exception.
 * If there are somehow no samples to draw, use single pixel height,
 rather than worry about NaNs etc.
 * Also do division only once.

 Fixes #2195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment