- removed issue_update
Recurring exceptions and other bugs in [IconCheckPoller]
Components.Lcd.IconCheckPoller.JobTask() can cause recurring exceptions. The direct cause is that LinkState can be set to integer 0, and it is then indexed on:
LinkState = LinkState[:1]
LinkState is also being calculated incorrectly, because it is initially read as a newline-terminated string from a /sys/class file, but it is then compared to a string without newline termination without it first being stripped of trailing whitespace. These errors can result in LinkState being forced to 0 when it should not be.
If /sys/class/net/eth0/operstate is read and contains "down" (and is compared correctly), then the link state value written to /proc/stb/lcd/symbol_network will be 'd', rather than '0' or '1' as intended.
If a WLAN device is present, but not configured, but the Ethernet connection is up and running, the LinkStatus will be reported only for the WLAN device. The link should be shown as up if either WLAN or Ethernet is up. In the current code, this will also force LinkStatus to be set to integer 0 and cause the exception.
For flexibility, the code should probably enumerate the attached network devices. There's existing code to do that.
Extract from debug log:
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 524, in __bootstrap
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 504, in run
--- <exception caught here> ---
File "/usr/lib/python2.7/site-packages/twisted/python/threadpool.py", line 19
1, in _worker
result = context.call(ctx, function, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 118,
in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 81, i
n callWithContext
return func(*args,**kw)
File "/usr/lib/enigma2/python/Components/Lcd.py", line 60, in JobTask
exceptions.TypeError: 'int' object has no attribute '__getitem__'
Reproduction steps
Enable debug logging on the T3 using Open Webif if it is not enabled.
Attach a USB WLAN dongle, but do not configure it. This will force LinkStatus to be set to integer 0.
Wait at least 30 seconds for the icon check to run.
Examine the debug log. Searching for the string "Components/Lcd.py" should find the exceptions being generated.
I've set Reproducability to Always, because these conditions should always trigger the exception.
Comments (3)
-
reporter -
reporter - removed issue_update
The issue was updated with the following change(s):
- This issue's description has been changed
-
- changed status to resolved
- Log in to comment
The issue was updated with the following change(s):