Bug 2232504

Summary: [abrt] variety: autoscroll_step(): ThumbsWindow.py:382:autoscroll_step:ZeroDivisionError: float division by zero
Product: [Fedora] Fedora Reporter: vikram goyal <vikigoyal>
Component: varietyAssignee: MartinKG <mgansser>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: mgansser, vikigoyal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/89303be2ae205ae2261041db9ab7fc4c64381b6
Whiteboard: abrt_hash:d652f8f6ebf7570a4f6a462b2ff5f8d39ae0625c;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: namespaces
none
File: backtrace
none
File: cpuinfo
none
File: mountinfo
none
File: open_fds
none
File: environ none

Description vikram goyal 2023-08-17 07:23:18 UTC
Description of problem:
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.

Version-Release number of selected component:
variety-0.8.10-1.fc38

Additional info:
reporter:       libreport-2.17.11
kernel:         6.4.10-200.fc38.x86_64
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-variety
uid:            1000
reason:         ThumbsWindow.py:382:autoscroll_step:ZeroDivisionError: float division by zero
executable:     /usr/bin/variety
type:           Python3
package:        variety-0.8.10-1.fc38
runlevel:       N 5
exception_type: ZeroDivisionError
crash_function: autoscroll_step
interpreter:    python3-3.11.4-1.fc38.x86_64
comment:        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.
cmdline:        /usr/bin/python3 /usr/bin/variety --profile /home/user/.config/variety/

Truncated backtrace:
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
    args[0](*args[1:])
  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

Comment 1 vikram goyal 2023-08-17 07:23:23 UTC
Created attachment 1983738 [details]
File: os_info

Comment 2 vikram goyal 2023-08-17 07:23:24 UTC
Created attachment 1983739 [details]
File: namespaces

Comment 3 vikram goyal 2023-08-17 07:23:26 UTC
Created attachment 1983740 [details]
File: backtrace

Comment 4 vikram goyal 2023-08-17 07:23:28 UTC
Created attachment 1983741 [details]
File: cpuinfo

Comment 5 vikram goyal 2023-08-17 07:23:30 UTC
Created attachment 1983742 [details]
File: mountinfo

Comment 6 vikram goyal 2023-08-17 07:23:33 UTC
Created attachment 1983743 [details]
File: open_fds

Comment 7 vikram goyal 2023-08-17 07:23:35 UTC
Created attachment 1983744 [details]
File: environ

Comment 8 MartinKG 2023-08-17 07:37:30 UTC
upstream ticket: https://github.com/varietywalls/variety/issues/639