Bug 2360501 - hp-toolbox shows traceback when closing and there is no HP device
Summary: hp-toolbox shows traceback when closing and there is no HP device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 42
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:7f48b7a825db2978047c5d3873b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-16 23:02 UTC by sunymon
Modified: 2025-06-04 03:34 UTC (History)
5 users (show)

Fixed In Version: hplip-3.25.2-5.fc43 hplip-3.25.2-5.fc42 hplip-3.25.2-5.fc41
Clone Of:
Environment:
Last Closed: 2025-05-26 15:05:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (754 bytes, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details
File: environ (1.83 KB, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details
File: mountinfo (3.54 KB, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details
File: open_fds (5.90 KB, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details
File: namespaces (171 bytes, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details
File: backtrace (856 bytes, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details
File: cpuinfo (3.06 KB, text/plain)
2025-04-16 23:02 UTC, sunymon
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.