Bug 2360501

Summary: hp-toolbox shows traceback when closing and there is no HP device
Product: [Fedora] Fedora Reporter: sunymon
Component: hplipAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 42CC: jridky, sunymon, tkorbar, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/f53d0623a55dcd339172fb3338d8b91a2fe98b4
Whiteboard: abrt_hash:7f48b7a825db2978047c5d3873bf230ed72e66d5;VARIANT_ID=workstation;
Fixed In Version: hplip-3.25.2-5.fc43 hplip-3.25.2-5.fc42 hplip-3.25.2-5.fc41 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-26 15:05:01 UTC 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: environ
none
File: mountinfo
none
File: open_fds
none
File: namespaces
none
File: backtrace
none
File: cpuinfo none

Description sunymon 2025-04-16 23:02:07 UTC
Version-Release number of selected component:
hplip-gui-3.25.2-1.fc42

Additional info:
reporter:       libreport-2.17.15
kernel:         6.14.2-300.fc42.x86_64
cmdline:        /usr/bin/python3 /usr/bin/hp-toolbox
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-hplip-18724.scope
uid:            1000
reason:         devmgr5.py:1879:updatePrintControlTab:AttributeError: 'NoneType' object has no attribute 'device_type'
executable:     /usr/bin/hp-toolbox
type:           Python3
package:        hplip-gui-3.25.2-1.fc42
runlevel:       N 5
exception_type: AttributeError
crash_function: updatePrintControlTab
interpreter:    python3-3.13.2-2.fc42.x86_64

Truncated backtrace:
devmgr5.py:1879:updatePrintControlTab:AttributeError: 'NoneType' object has no attribute 'device_type'

Traceback (most recent call last):
  File "/usr/share/hplip/ui5/devmgr5.py", line 407, in initalUpdate
    self.updateCurrentTab() #when we have a device present initailly, we should always update the current tab to show action items
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/share/hplip/ui5/devmgr5.py", line 581, in updateCurrentTab
    self.TabIndex[self.Tabs.currentIndex()]()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/share/hplip/ui5/devmgr5.py", line 1879, in updatePrintControlTab
    if self.cur_device.device_type == DEVICE_TYPE_PRINTER:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'device_type'

Local variables in innermost frame:
self: <ui5.devmgr5.DevMgr5 object at 0x7f3db89f9520>

Comment 1 sunymon 2025-04-16 23:02:10 UTC
Created attachment 2085306 [details]
File: os_info

Comment 2 sunymon 2025-04-16 23:02:12 UTC
Created attachment 2085307 [details]
File: environ

Comment 3 sunymon 2025-04-16 23:02:13 UTC
Created attachment 2085308 [details]
File: mountinfo

Comment 4 sunymon 2025-04-16 23:02:14 UTC
Created attachment 2085309 [details]
File: open_fds

Comment 5 sunymon 2025-04-16 23:02:16 UTC
Created attachment 2085310 [details]
File: namespaces

Comment 6 sunymon 2025-04-16 23:02:17 UTC
Created attachment 2085311 [details]
File: backtrace

Comment 7 sunymon 2025-04-16 23:02:19 UTC
Created attachment 2085312 [details]
File: cpuinfo

Comment 8 Zdenek Dohnal 2025-04-17 07:40:02 UTC
Hi,

can you reproduce the issue?

If you can, would you mind telling me the exact set of steps how you can get the crash?

Thank you in advance!

Comment 9 David W. Legg 2025-05-22 13:52:17 UTC
Started HP GUI. No printers found. CLosed it again. Crash.


reporter:       libreport-2.17.15
kernel:         6.14.6-300.fc42.x86_64
cmdline:        /usr/bin/python3 /usr/bin/hp-toolbox
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-hplip
uid:            1000
reason:         devmgr5.py:1879:updatePrintControlTab:AttributeError: 'NoneType' object has no attribute 'device_type'
executable:     /usr/bin/hp-toolbox
type:           Python3
package:        hplip-gui-3.25.2-4.fc42
runlevel:       N 5
exception_type: AttributeError
crash_function: updatePrintControlTab
interpreter:    python3-3.13.3-2.fc42.x86_64
comment:        Started HP GUI. No printers found. CLosed it again. Crash.

Comment 10 Zdenek Dohnal 2025-05-26 11:46:04 UTC
Thank you, David! Now I can see the traceback and the problem.

Going to create patch for that soon and I'll send it upstream.

Comment 11 Fedora Update System 2025-05-26 13:39:29 UTC
FEDORA-2025-f9d0330fd7 (hplip-3.25.2-5.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f9d0330fd7

Comment 12 Fedora Update System 2025-05-26 13:55:58 UTC
FEDORA-2025-62baab1b09 (hplip-3.25.2-5.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-62baab1b09

Comment 13 Fedora Update System 2025-05-26 14:09:40 UTC
FEDORA-2025-e4778229a2 (hplip-3.25.2-5.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-e4778229a2

Comment 14 Fedora Update System 2025-05-26 15:05:01 UTC
FEDORA-2025-f9d0330fd7 (hplip-3.25.2-5.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2025-05-27 01:08:37 UTC
FEDORA-2025-62baab1b09 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-62baab1b09`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-62baab1b09

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2025-05-27 01:41:29 UTC
FEDORA-2025-e4778229a2 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-e4778229a2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-e4778229a2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2025-06-04 02:10:26 UTC
FEDORA-2025-62baab1b09 (hplip-3.25.2-5.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2025-06-04 03:34:24 UTC
FEDORA-2025-e4778229a2 (hplip-3.25.2-5.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.