museumsvictoria / spatial_audio_server

An audio backend for the multi-layered soundscape of Beyond Perception: Seeing the Unseen, a permanent exhibition at Scienceworks in Melbourne, Australia.
81 stars 14 forks source link

Crash when NGON rotate set to zero #188

Closed paxofsnax closed 5 years ago

paxofsnax commented 5 years ago

Audio Server Crashed when NGON vertices set to 0 with and errant drag to far to the left ns Rotate set to Zero. thread 'soundscape' panicked at 'attempt to calculate the remainder with a divisor of zero', src/lib/soundscape/movement/ngon.rs:195:39 note: Run withRUST_BACKTRACE=1for a backtrace. thread 'main' panicked at 'failed to send movement update to soundscape thread: "SendError(..)"', libcore/result.rs:945:5 logout

paxofsnax commented 5 years ago

I will test and see if I can reproduce this issue/ crash on another clone of the Audio Server file and computer.

mitchmindtree commented 5 years ago

Thanks for the report!

The Ngon vertices parameter allows for controlling the number of vertices used to describe an equilateral polygon that is used to represent the path of a virtual sound source around the centre of an installation. I wonder if the correct fix for this is just to change the minimum bound of the slider to a value of 1 or 2, as I guess a polygon with 0 sides doesn't make a lot of sense? I'll leave this issue open as a reminder to address this!

paxofsnax commented 5 years ago

Got another of theses errors just selecting a source - thread 'soundscape' panicked at 'attempt to calculate the remainder with a divisor of, src/lib/soundscape/movement/ngon.rs:74:19