Bug in Code (Typo in self.conntected Variable)

  • Hi,


    There is an issue in the file Standby.py, located at /usr/lib/enigma2/python/Screens, related to an incorrect variable name assignment. Specifically, the code contains the following line:

    Code
    self.conntected=False

    The correct variable name should be self.connected, but a typo has caused it to be incorrectly written as conntected (with an extra "t").

    This results in the assignment of False to a non-existent attribute, which prevents the expected behavior of the program and can lead to potential runtime errors. The intended functionality appears to involve updating the connected state, which manages the connection to the event system, but due to the typo, this update does not occur as expected.


    Impact:

    • The error prevents the proper removal from events in the TryQuitMainloop class.
    • This can lead to memory leaks or unexpected behavior, as events remain subscribed even though they should be removed.
    • It may cause issues in the system when performing shutdown or reboot operations.


    To resolve this issue, the code should be updated as follows:

    Code
    self.connected = False

    This change ensures that the correct connected attribute is being updated, allowing proper removal of events and restoring expected system behavior.

    Best regards.

    Edited 2 times, last by Andro1 ().

  • there will be no updates in the future anymore



    this code can also be found in a "frozen" enigma2 dated on May 2019 - so if this is a bug, it's a very "old" one ..


    Code
    root@dm820:~# dpkg -l enigma2
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                                        Version                    Architecture               Description
    +++-===========================================-==========================-==========================-============================================================================================
    ii  enigma2                                     4.3.2r5-r0   mipsel                     Framebuffer-based digital media application
    root@dm820:~# 
    Code
    root@dm820:~# grep conntected $(find /usr/lib/enigma2/python/ -iname "*.py")
    /usr/lib/enigma2/python/Screens/Standby.py:            self.conntected=False
    /usr/lib/enigma2/python/Components/NimManager.py:        # remove nims, that have a conntectedTo reference on
    root@dm820:~# 



    If this is not a feature but a bug with safety a quick 'n dirty adjustment executed in the terminal

    Code
    PY="/usr/lib/enigma2/python/Screens/Standby.py"
    if grep "self.conntected=False" $PY & >/dev/null; then sed -i 's/self.conntected=False/self.connected = False/' $PY;fi
    systemctl restart enigma2

    Gruß Fred

    Die Dreambox ist tot, es lebe die Dreambox

    Edited 5 times, last by Fred Bogus Trumper ().

  • what is the failure that is caused by this bug? i've used oe2.5 for 6 years now, and never experienced a problem during shutdown.

    The issue caused by self.conntected=False (which should be self.connected = False) might not be immediately noticeable to the user in all cases, but it could affect certain scenarios and become apparent in the following situations:

    1. Attempting to Stop Recording or Close the Application

    • If there is an active recording or background process (e.g., a task in job_manager or a new recording process), the user may experience delays or unresponsiveness when trying to stop the recording or close the application.
    • If the code fails to correctly detach events due to the incorrect self.conntected variable, the application might continue waiting for a response or fail to act on commands like "shutdown" or "stop recording".

    2. Closing the Standby Screen or Switching to Another State

    • When trying to close the Standby screen or switch to another state (e.g., resuming playback or returning from standby mode), if the connected state isn't properly updated, the application may remain in an inconsistent state or fail to respond properly to transitions (such as resuming the previous service or returning to the previous state).
    • The user may not immediately notice this, but if there is a service running when exiting Standby, or if the user tries to resume from Standby, things may not behave as expected.

    3. Displaying Confirmation Messages for Shutdown or Reboot

    • If the code includes a confirmation message ("Really shutdown now?"), the user might notice a delay in the message appearing or unexpected behavior after responding to the message.
    • Due to the incorrect self.conntected variable, the message might not close as expected or might close incorrectly.

    4. Tasks or Functions Dependent on the connected State

    • If there are other tasks or functions dependent on the event being correctly attached or detached, such as managing recordings or stopping background jobs, these may fail or not execute as expected.
    • The user might not notice an immediate impact, but these functions might not work correctly in the background, causing delays or incorrect behavior.

    5. Memory Leaks or Incomplete Operations

    • If tasks are not properly canceled or connections are not detached due to the incorrect connected variable, it could lead to memory leaks or pending operations, which might degrade system performance or slow down the device over time.
    • The user might not notice the issue immediately, but over time, the system could slow down or become unresponsive due to these "orphaned" tasks.
  • Auch wenn wahrscheinlich kein fix in die alte OE geben wird, finde ich es sehr informativ, das einige User sich die mühe machen, solche "bug" zur finden und zur publizieren.

    Auch an alle die ein "fix" publizieren.

    E2 Box: Two, One, DM 8000, DM7080HD, DM 7025(+), DM 7020HD(v2), DM9x0, DM820HD, DM 800SE(v2), DM 800HD, DM52x, DM500HD(v2)
    E1 Box: DM 7020, DM 7000, DM 5620-S, TRIAX 272-S, DM 600PVR, DM 500+, DM 500-S

    Sonstiges: DM100, DM Tastatur, Logi K600 BT Tastatur
    Sat: WaveFrontier T90 23.5E <=> 30.0W

  • I noticed that there is an issue with the samba file at the path /etc/init.d/samba for the DM520.

    The file path is incorrectly written inside the file.


    When trying to stop the service, I get the following result:

    Code
    root@dm520:
    /etc/init.d/samba stop
    
    /etc/init.d/samba: line 15: /usr/bin/ps: No such file or directory
    /etc/init.d/samba: line 16: /usr/bin/grep: No such file or directory
    /etc/init.d/samba: line 17: /usr/bin/sed: No such file or directory
    root@dm520:


    But it seems that this issue has been resolved in DM ONE and DM TWO (Unstable & AIO):

  • "ridiculous" :thumbs_down:

    Code
     Copyright (c) Timo Knuutila <knuutila@cs.utu.fi>     1996.

    DM 800 Flodder, DM 920, DM one und two alle mit orig. Image und SSD ...


    Das dicke Ende kommt meist zum Schluß ... :smiling_face_with_sunglasses:

  • It kept giving me error messages in /var/log/samba.

    Since I don’t use it, I disabled it using the following commands:

    Code
    systemctl disable nmb
    systemctl disable smb
  • No system is free from errors.

    If you delve deeper into the system, you might discover some issues such as:

    • A problem in the file /usr/lib/tmpfiles.d/etc.conf at line 14.
    • A typo in "filescan_open" in the file /usr/lib/enigma2/python/Screens/DefaultWizard.py.
    • Other errors in DreamBLE, OpenGL ES, and eglGetDisplay.

    Nothing is perfect.

  • I used commands to check whether the DM520 has any errors, and the results are as follows:


    journalctl | grep -i "failed" >> /media/hdd/failed.log &


    journalctl | grep -i "error" >> /media/hdd/error.log &

    Code
    Jan 26 15:42:49 dm520 enigma2[150]: EGL Error: 0 ((null))
    Jan 26 15:42:49 dm520 enigma2[150]: WARNING: eglGetError not implemented!
    Jan 26 15:51:57 dm520 kernel[145]: [  565.637000] audio ch0: pts error 0 PTS 0x78cf7e9e, STC 0x78cf600c, type 0
    Jan 26 15:54:14 dm520 kernel[145]: [  692.228000] audio ch0: pts error 0 PTS 0x1c4a1776, STC 0x1c4a15c8, type 0
    Jan 26 15:54:14 dm520 kernel[145]: [  692.440000] audio ch0: pts error 1 PTS 0xd89e995e, STC 0xd89e9502, type 0
    Jan 26 15:54:15 dm520 kernel[145]: [  693.232000] audio ch0: reset pts error counter


    journalctl | grep -i "warning" >> /media/hdd/warning.log &

    Code
    Jan 26 15:42:49 dm520 enigma2[150]: WARNING: eglGetDisplay not implemented!
    Jan 26 15:42:49 dm520 enigma2[150]: WARNING: eglGetError not implemented!
    Jan 26 15:43:08 dm520 enigma2[150]: WARNING! ConfigEnableDisable is deprecated, please use ConfigOnOff instead!
    Jan 26 15:43:11 dm520 enigma2[150]: warning, skin is missing element RassLogo in <class 'Screens.RdsDisplay.RdsInfoDisplay'>
    Jan 26 15:43:11 dm520 enigma2[150]: warning, skin is missing element state in <class 'Screens.PVRState.TimeshiftState'>
    Jan 26 15:43:13 dm520 enigma2[150]: warning, skin is missing renderer <Components.Renderer.extvolumeText.extvolumeText object at 0x6afd1cb0> in <class 'Screens.Volume.Volume'>
    Jan 26 15:52:51 dm520 enigma2[150]: libpng warning: iCCP: known incorrect sRGB profile
    Jan 26 15:54:05 dm520 enigma2[150]: libpng warning: iCCP: known incorrect sRGB profile

    :person_shrugging:

  • This is not my problem, it's an issue with the image and the default skin.


    The developer added 9 "wait" files to the spinner folder, and now the system is telling me that the file wait10.png is missing. How can I get it?!

    The developer did not add the file notification_mail.png. How can I get it?!

    The developer did not add the files (ico_dvb_s-fs8, ico_dvb_c-fs8, ico_dvb_t-fs8, ico_service_group-fs8). How can I get them?!

    The developer did not add RassLogo and state. How can I get them?!


    This is the developer's issue; they defined the files but didn't add them.


    Recently, I installed the Zombi-Shadow-FHD skin, and the system is telling me that the extvolumeText render is missing, but when I searched inside the skin, I found it in its correct place! How could this happen?!


    The problems are related to the mistakes of the previous developers who are now gone, leaving us with these annoying issues.

  • The developer added 9 "wait" files to the spinner folder, and now the system is telling me that the file wait10.png is missing. How can I get it?!

    The developer did not add the file notification_mail.png. How can I get it?!

    The developer did not add the files (ico_dvb_s-fs8, ico_dvb_c-fs8, ico_dvb_t-fs8, ico_service_group-fs8). How can I get them?!

    The developer did not add RassLogo and state. How can I get them?!

    Generate them yourself? If warnings that do have zero impact on any functionality of your dreambox are an issue for you, then it's a simple two liner (and one import) to get rid of most of them. E.g. the icons for reception type have been added that skinners who would like to show them in channellist can do that easily but they have never been included by default.


    Jan 26 15:43:08 dm520 enigma2[150]: WARNING! ConfigEnableDisable is deprecated, please use ConfigOnOff instead!

    This is a warning that is very helpful and tells devs that they should no longer use ConfigEnableDisable. This is not a but but a very important information.

    Gruss
    Dre


    Boxen (im Einsatz): DM920, DM900, DMOne
    Developer Project Merlin - we are OpenSource

  • Generate them yourself? If warnings that do have zero impact on any functionality of your dreambox are an issue for you, then it's a simple two liner (and one import) to get rid of most of them. E.g. the icons for reception type have been added that skinners who would like to show them in channellist can do that easily but they have never been included by default.


    This is a warning that is very helpful and tells devs that they should no longer use ConfigEnableDisable. This is not a but but a very important information.

    Well, regarding the messages about the missing UI files, they can be added easily. However, what I meant is that as long as these files are defined in the system, they should be included with the image. Or if the developer doesn’t want to add them, they could be referenced as an informational message or a warning, not as a failed message as if they are critical and required by the system!


    As for other messages like 'VIDEO0 got pts failed,' 'RFKILL,' 'Harddisk.py,' 'eStaticServiceDVBBouquetInformation,' 'eglGetError,' 'eglGetDisplay,' etc., are they related to issues with the drivers, kernel, or something else?

  • dhwz
    Your responses do not help me understand the results I got.

    You're suggesting that I have a problem understanding the meaning of these warnings or errors, and that my interest in understanding the reasons behind these results isn't important to me as a user!!


    Could you please explain how you arrived at these conclusions?!


    If you could help me understand the reasons behind these results and possible solutions, it would be incredibly helpful.

    If your focus is on assessing my understanding or the reason for my interest, it might be more helpful to refrain from further comments on that.