[Scummvm-tracker] [ScummVM :: Bugs] #15587: GUI: reducing the volume of a channel manually to zero produces a zero division

ScummVM :: Bugs trac at scummvm.org
Wed Dec 11 15:58:23 UTC 2024


#15587: GUI: reducing the volume of a channel manually to zero produces a zero
division
------------------------+---------------------
Reporter:  neuromancer  |       Owner:  (none)
    Type:  defect       |      Status:  new
Priority:  normal       |   Component:  GUI
 Version:               |  Resolution:
Keywords:               |        Game:
------------------------+---------------------
Comment (by antoniou79):

 I am unable to reproduce this on mine, with a MSYS2/MINGW64 Windows 10
 build from current master HEAD (2.10.0git).

 I've tested with volume sliders on the launcher from Global Options, Game
 specific options and the in-game ScummVM GMM menu for volume. I also
 tested with a few other GUI sliders since this issue might not be specific
 to only volume sliders.

 For setting the value to 0, I've tested with:
 1. clicking on the edge of the slider (tricky but 0 can be achieved with a
 bit of patience)
 2. clicking within the widget, holding and dragging the slider to its edge
 (easier way to get 0)
 3. using mouse scroll wheel to go to 0.

 All the above worked without crash.

 Looking at the code, y seems to be initialized (within the BE_RESET()) to
 the value of the "r" method argument, so if r was -1 then that would
 result to (y + 1) being zero and hence the division by zero issue.

 https://github.com/scummvm/scummvm/blob/4440b3ca24ab35ca3f86b3ce44a2baf643acb6a7/graphics/VectorRendererSpec.cpp#L3234

 But I can't tell off hand what would cause r to be -1 or which use case
 that would be.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15587#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list