Bug 2010154 - [abrt] screenkey: key_press(): labelmanager.py:319:key_press:AttributeError: 'NoneType' object has no attribute 'decode'
Summary: [abrt] screenkey: key_press(): labelmanager.py:319:key_press:AttributeError: ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: screenkey
Version: 34
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rajeesh
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:74d5341884f3394c951d9920573...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-04 04:35 UTC by Ulrich Drepper
Modified: 2023-06-01 00:47 UTC (History)
1 user (show)

Fixed In Version: screenkey-1.4-2.fc33 screenkey-1.4-2.fc34 screenkey-1.4-2.fc35 screenkey-1.4-2.el8
Clone Of:
Environment:
Last Closed: 2021-10-21 17:06:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (608 bytes, text/plain)
2021-10-04 04:35 UTC, Ulrich Drepper
no flags Details
File: environ (2.42 KB, text/plain)
2021-10-04 04:35 UTC, Ulrich Drepper
no flags Details
File: mountinfo (3.32 KB, text/plain)
2021-10-04 04:35 UTC, Ulrich Drepper
no flags Details
File: namespaces (172 bytes, text/plain)
2021-10-04 04:35 UTC, Ulrich Drepper
no flags Details
File: open_fds (1.54 KB, text/plain)
2021-10-04 04:35 UTC, Ulrich Drepper
no flags Details

Description Ulrich Drepper 2021-10-04 04:35:46 UTC
Version-Release number of selected component:
screenkey-1.2-4.fc34

Additional info:
reporter:       libreport-2.15.2
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-screenkey-11299.scope
cmdline:        /usr/bin/python3 -s /usr/bin/screenkey --start-disabled
crash_function: key_press
exception_type: AttributeError
executable:     /usr/bin/screenkey
interpreter:    python3-3.9.7-1.fc34.x86_64
kernel:         5.13.19-200.fc34.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
labelmanager.py:319:key_press:AttributeError: 'NoneType' object has no attribute 'decode'

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/Screenkey/inputlistener.py", line 193, in _event_callback
    self.callback(data)
  File "/usr/lib/python3.9/site-packages/Screenkey/labelmanager.py", line 319, in key_press
    symbol = event.symbol.decode()
AttributeError: 'NoneType' object has no attribute 'decode'

Local variables in innermost frame:
self: <Screenkey.labelmanager.LabelManager object at 0x7fb60c244d60>
event: <Screenkey.inputlistener.KeyData object at 0x7fb60a2eb430>

Comment 1 Ulrich Drepper 2021-10-04 04:35:49 UTC
Created attachment 1828806 [details]
File: backtrace

Comment 2 Ulrich Drepper 2021-10-04 04:35:50 UTC
Created attachment 1828807 [details]
File: environ

Comment 3 Ulrich Drepper 2021-10-04 04:35:51 UTC
Created attachment 1828808 [details]
File: mountinfo

Comment 4 Ulrich Drepper 2021-10-04 04:35:53 UTC
Created attachment 1828809 [details]
File: namespaces

Comment 5 Ulrich Drepper 2021-10-04 04:35:54 UTC
Created attachment 1828810 [details]
File: open_fds

Comment 6 Rajeesh 2021-10-05 07:53:49 UTC
Reported upstream: https://gitlab.com/screenkey/screenkey/-/issues/159

Comment 7 Rajeesh 2021-10-06 13:48:10 UTC
Upstream asks:

Any chance to get more details on what was done to make it crash?
There's probably some odd keyboard or mouse event which is not handled correctly.

Could you provide some background on which actions triggered this, or if you have any specific keyboard/mouse setup?

Comment 8 Ulrich Drepper 2021-10-12 06:26:50 UTC
At that time I didn't do anything with the program.  I keep it running in the background at all times, not showing keys.  If the code in that still collects keystrokes it could of course be some interaction with my system.  There isn't anything special, though, if the code only looks at keystrokes.  I have all kinds of USB devices attached, some might also act as HIDs, but they shouldn't produce obscure data.

Until this morning screenkey didn't show anything anymore and I think that I haven't changed anything since the crash.  The reason is the "start_disabled" entry in the config file which I hoped would start the program in a mode where it is by default not in the "show keys" mode.  That seems not to be the case.  But that setting shouldn't have any effect which could cause the bug, could it?

Because the program is running in the background it's really hard to get better information unless the program collects it itself.  For python code this often means adding checks for the conditions explicitly.  If you add something to that extend and the problem persists I can provide better information.

Comment 9 Rajeesh 2021-10-12 15:50:02 UTC
Thanks for the details.

Upstream mentions that the newer versions are immune to this problem, yet the root cause is not identified (https://gitlab.com/screenkey/screenkey/-/issues/159#note_701242787).

If you can, try to revert this commit https://gitlab.com/screenkey/screenkey/-/commit/99a8a365de0b3880165392a2ba12c3632bbdbd71 and reproduce the issue?

I will try to build a version on copr with this patch reverted in the weekend, for easier testing.

Comment 10 Ulrich Drepper 2021-10-13 07:24:14 UTC
(In reply to Rajeesh from comment #9)

> If you can, try to revert this commit
> https://gitlab.com/screenkey/screenkey/-/commit/
> 99a8a365de0b3880165392a2ba12c3632bbdbd71 and reproduce the issue?

Do you really mean "revert"?  The version I have installed (which is the latest officially released) does not have this extra check installed.

Comment 11 Rajeesh 2021-10-13 09:43:37 UTC
Ouch.

I have missed to notice (or missed to update) the two new releases after 1.2. Would update to 1.4 this weekend; and we can check if the problem persists.

Comment 12 Fedora Update System 2021-10-14 06:59:54 UTC
FEDORA-2021-a117f3b672 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a117f3b672

Comment 13 Fedora Update System 2021-10-14 07:05:45 UTC
FEDORA-2021-a9f674059b has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a9f674059b

Comment 14 Fedora Update System 2021-10-14 07:11:37 UTC
FEDORA-2021-24aa95b578 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-24aa95b578

Comment 15 Fedora Update System 2021-10-14 07:18:36 UTC
FEDORA-EPEL-2021-d4829075fa has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-d4829075fa

Comment 16 Fedora Update System 2021-10-14 15:50:54 UTC
FEDORA-2021-24aa95b578 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-24aa95b578`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-24aa95b578

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

Comment 17 Fedora Update System 2021-10-14 15:57:49 UTC
FEDORA-2021-a9f674059b has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a9f674059b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a9f674059b

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

Comment 18 Fedora Update System 2021-10-14 16:13:40 UTC
FEDORA-EPEL-2021-d4829075fa has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-d4829075fa

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

Comment 19 Fedora Update System 2021-10-14 18:54:52 UTC
FEDORA-2021-a117f3b672 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a117f3b672`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a117f3b672

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

Comment 20 Fedora Update System 2021-10-21 17:06:53 UTC
FEDORA-2021-24aa95b578 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2021-10-23 03:21:25 UTC
FEDORA-2021-a9f674059b has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2021-10-29 23:05:24 UTC
FEDORA-2021-a117f3b672 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2023-06-01 00:47:43 UTC
FEDORA-EPEL-2021-d4829075fa has been pushed to the Fedora EPEL 8 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.