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

Termination with divide by zero when starting up #525

Closed
pnex2000 opened this Issue Oct 5, 2013 · 2 comments

Comments

3 participants
@pnex2000

pnex2000 commented Oct 5, 2013

I'm trying out mopidy on a Raspberry Pi with USB audio (using the Pi Musicbox 0.4-alpha distribution based on Debian) and when starting up, mopidy crashes in a division by zero error, coming from audio/actor.py, function _rescale, line 544.

I did a quick hack where 'if (old_max - old_min) == 0: return value', which seems to work nicely, but without knowing the code and the effects of my fix I'm not submitting a PR at this time.

The sound is played using alsa. Using Raspberry Pi's built-in analog audio there was no problem.

@ghost ghost assigned adamcik Oct 6, 2013

@adamcik

This comment has been minimized.

Member

adamcik commented Oct 6, 2013

I would like to know some of the info about the audio setup so I can make a test case for this and fix our code. Could you run amixer -i -a none and share the results in this bug and let me know which track mopidy chooses?

adamcik added a commit to adamcik/mopidy that referenced this issue Oct 6, 2013

audio: Handle min=max when scaling volumes (fixes: mopidy#525)
Also add gobject.threads_init() so we can run the audio actor test on its own.

jodal added a commit that referenced this issue Oct 6, 2013

Merge pull request #528 from adamcik/fix/bug-525-mixer-divide-by-zero
audio: Handle min=max when scaling volumes (fixes: #525)
@jodal

This comment has been minimized.

Member

jodal commented Oct 6, 2013

Fixed by pull request #528

@jodal jodal closed this Oct 6, 2013

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