varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.21k stars 146 forks source link

ThumbsWindow.py:382:autoscroll_step:ZeroDivisionError: float division by zero #639

Open martinkg opened 1 year ago

martinkg commented 1 year ago

Version of Variety

variety-0.8.10

Describe the bug

Clicked on Variety icon & selected History. From the presented images in History , I deleted all the images one by one. Deleting the last image crashed Variety.

backtrace file ThumbsWindow.py:382:autoscroll_step:ZeroDivisionError: float division by zero

Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/variety/Util.py", line 876, in cb args0 File "/usr/lib/python3.11/site-packages/variety/ThumbsWindow.py", line 407, in _go self.autoscroll_step( File "/usr/lib/python3.11/site-packages/variety/ThumbsWindow.py", line 382, in autoscroll_step speed = 30 * (current - right_limit) 3 / (total_size - right_limit) 3


ZeroDivisionError: float division by zero

Local variables in innermost frame:
self: <ThumbsWindow.ThumbsWindow object at 0x7f57b8dea640 (variety+ThumbsWindow+ThumbsWindow at 0x555fb6119ba0)>
adj: <Gtk.Adjustment object at 0x7f57b8e7c240 (GtkAdjustment at 0x555fb62e3690)>
total_size: 0
current: 18.0
left_limit: 0.0
right_limit: 0.0