Jump to content


Photo

HdmiCEC crash - RC 9.0


  • Please log in to reply
29 replies to this topic

#1 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 13:02

I am currently on RC 9.0. Sometimes, the Plugin Menu displays this message:

 

Some plugins are not available:
SystemPlugins/HdmiCEC ('utf-8' codec can't decode byte 0xff in position 0: invalid start byte)

 

I tried to reproduce it. It seems to happen, when I turn on the box and the TV-set from deep stand-by. (first the box, then the TV-set)

 

    My HDMI-CEC settings are:

Enabled                         yes
Put TV in standby               yes
Wakeup TV from standby          yes
Wakeup command for TV           Image View On
Regard deep standby as standby  Yes
Switch TV to correct input      yes

    All other options are no/Disabled. And there is nothing else connected to the HDMI ports, just the box and the TV.


Edited by Stan, 23 August 2023 - 13:06.


Re: HdmiCEC crash - RC 9.0 #2 WanWizard

  • PLi® Core member
  • 68,911 posts

+1,750
Excellent

Posted 23 August 2023 - 13:04

Can you restart in debug mode, triggger the message, and check if the debug log contains more information?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: HdmiCEC crash - RC 9.0 #3 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 13:11

How do you restart in debug mode from deep standby?



Re: HdmiCEC crash - RC 9.0 #4 WanWizard

  • PLi® Core member
  • 68,911 posts

+1,750
Excellent

Posted 23 August 2023 - 13:14

Eh... Not without a hack.

 

Edit /usr/bin/enigma2.sh, and change the 3 into a 4 in

# any debuglevel passed?
if [ -z $ENIGMA_DEBUG_LVL ]; then
	DEBUG_LVL=3
else
	DEBUG_LVL=$ENIGMA_DEBUG_LVL
fi

don't forget to change it back, logfiles are written in flash and can get very big quickly.
 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: HdmiCEC crash - RC 9.0 #5 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 13:22

[eHdmiCEC] send message 04
Plugin  SystemPlugins/HdmiCEC failed to load: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/Components/PluginComponent.py", line 57, in readPluginList
  File "/usr/lib/enigma2/python/Plugins/SystemPlugins/HdmiCEC/plugin.py", line 137, in Plugins
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 544, in <module>
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 142, in __init__
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 298, in onLeaveStandby
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 260, in wakeupMessages
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 239, in sendMessages
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 221, in sendMessage
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

 



Re: HdmiCEC crash - RC 9.0 #6 WanWizard

  • PLi® Core member
  • 68,911 posts

+1,750
Excellent

Posted 23 August 2023 - 13:38

Thanks.

 

The decode was explicitly added here: https://github.com/O...69bbc3b829f43ad which I don't understand because the command data is defined explicity as a bytes.

 

Someone need to have a look at this.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: HdmiCEC crash - RC 9.0 #7 ims

  • PLi® Core member
  • 13,632 posts

+212
Excellent

Posted 23 August 2023 - 15:29

Never had problem and each day I am waking from deep standby 4 boxes. Could you add debug message under this line?

print("*** message ***", message)

And try change / to // in this 2 lines ?

 

 

 

 


Kdo nic nedělá, nic nezkazí!

Re: HdmiCEC crash - RC 9.0 #8 Beeker

  • PLi® Contributor
  • 1,478 posts

+198
Excellent

Posted 23 August 2023 - 19:23

[eHdmiCEC] send message 04
Plugin  SystemPlugins/HdmiCEC failed to load: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/Components/PluginComponent.py", line 57, in readPluginList
  File "/usr/lib/enigma2/python/Plugins/SystemPlugins/HdmiCEC/plugin.py", line 137, in Plugins
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 544, in <module>
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 142, in __init__
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 298, in onLeaveStandby
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 260, in wakeupMessages
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 239, in sendMessages
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 221, in sendMessage
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Can you try this file?

I can't reproduce crash.

diff --git a/lib/python/Components/HdmiCec.py b/lib/python/Components/HdmiCec.py
index 191db846a..dc8a32ecb 100644
--- a/lib/python/Components/HdmiCec.py
+++ b/lib/python/Components/HdmiCec.py
@@ -218,7 +218,7 @@ class HdmiCec:
                        cmd = 0x8f
 
                if cmd:
-                       data = data.decode()
+                       data = data.decode(encoding ='ASCII')
                        if config.hdmicec.minimum_send_interval.value != "0":
                                self.queue.append((address, cmd, data))
                                if not self.wait.isActive():
@@ -456,7 +456,7 @@ class HdmiCec:
                        if keyCode == 115 or keyCode == 114 or keyCode == 113:
                                cmd = 0x45
                if cmd:
-                       data = data.decode()
+                       data = data.decode(encoding ='ASCII')
                        if config.hdmicec.minimum_send_interval.value != "0":
                                self.queueKeyEvent.append((self.volumeForwardingDestination, cmd, data))
                                repeat = int(config.hdmicec.volume_forwarding_repeat.value)

 

Attached Files


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: HdmiCEC crash - RC 9.0 #9 WanWizard

  • PLi® Core member
  • 68,911 posts

+1,750
Excellent

Posted 23 August 2023 - 19:41

Appearently nobody can, given the fact this code has been in develop for almost a year.

 

@Stan, can you see if this fixes your problem?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: HdmiCEC crash - RC 9.0 #10 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 20:47

Sorry for the delay. I have flashed the develop image now.

 

With the changes suggested by @ims I get:

*** message *** wakeup
[eHdmiCEC] send message 04
*** message *** sourceactive
Plugin  SystemPlugins/HdmiCEC failed to load: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/Components/PluginComponent.py", line 57, in readPluginList
  File "/usr/lib/enigma2/python/Plugins/SystemPlugins/HdmiCEC/plugin.py", line 137, in Plugins
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 545, in <module>
    hdmi_cec = HdmiCec()
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 142, in __init__
    self.onLeaveStandby()
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 299, in onLeaveStandby
    self.wakeupMessages()
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 261, in wakeupMessages
    self.sendMessages(0, messages)
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 240, in sendMessages
    self.sendMessage(address, message)
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 222, in sendMessage
    data = data.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

 



Re: HdmiCEC crash - RC 9.0 #11 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 21:01

And with file from @Beeker:

[eHdmiCEC] send message 04
Plugin  SystemPlugins/HdmiCEC failed to load: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/Components/PluginComponent.py", line 57, in readPluginList
  File "/usr/lib/enigma2/python/Plugins/SystemPlugins/HdmiCEC/plugin.py", line 137, in Plugins
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 544, in <module>
    hdmi_cec = HdmiCec()
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 142, in __init__
    self.onLeaveStandby()
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 298, in onLeaveStandby
    self.wakeupMessages()
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 260, in wakeupMessages
    self.sendMessages(0, messages)
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 239, in sendMessages
    self.sendMessage(address, message)
  File "/usr/lib/enigma2/python/Components/HdmiCec.py", line 221, in sendMessage
    data = data.decode(encoding ='ASCII')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

Edited by Stan, 23 August 2023 - 21:02.


Re: HdmiCEC crash - RC 9.0 #12 ims

  • PLi® Core member
  • 13,632 posts

+212
Excellent

Posted 23 August 2023 - 22:57

What do you have as physical HDMI-CEC addresses for your box ?! (Information-About and there last item OR in Setup HDMI-CEC).


Kdo nic nedělá, nic nezkazí!

Re: HdmiCEC crash - RC 9.0 #13 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 23:13

HDMI-CEC address is 1.0.0.0

 

To reproduce the crash, use the settings in the first post and restart the box with the TV powered off. (or HDMI cable disconnected)

 

This is from HDMI-CEC logging when restarting the box:

 

When TV is on:

Rx: 00:05:28  <Set Stream Path>           <  86 10 00 
Tx: 00:05:29  <Active Source>             >  82 10 00                                           [0x0F]

When TV is off:

Tx: 01:00:15  <Image View On>             >  04                                                 [0x00]
Tx: 01:00:15  <Active Source>             >  82 FF FF                                           [0x0F]

I think this message 82 FF FF causes the crash.
 


Edited by Stan, 23 August 2023 - 23:19.


Re: HdmiCEC crash - RC 9.0 #14 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 23 August 2023 - 23:52

What do you have as physical HDMI-CEC addresses for your box ?! (Information-About and there last item OR in Setup HDMI-CEC).

 

In HDMI-CEC setup:  Current CEC adress:   "1.0.0.0"

In Information-About: HDMI-CEC address     "not set"

 

Why does it show different values?



Re: HdmiCEC crash - RC 9.0 #15 ims

  • PLi® Core member
  • 13,632 posts

+212
Excellent

Posted 23 August 2023 - 23:57

this is physical address of devices. Range is 0.0.0.0 - F.F.F.F, but it starts from 0.0.0.0 (TV) ... 1.0.0.0 , 2.0.0.0 (2.1.0.0 ...). Addresses are assigned by the TV, but if the TV is turned off (unpowered), the set-top box still remembers it's last address and not that it has F.F.F.F.
What pushing into your CEC F.F.F.F  or you have not set address yet?  Set in HDMI-CEC set your address, if it helps (yellow).


Max addresses can be 0x7f7f (sufficient in this cases)


Edited by ims, 24 August 2023 - 00:05.

Kdo nic nedělá, nic nezkazí!

Re: HdmiCEC crash - RC 9.0 #16 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 24 August 2023 - 00:05

With fixed address 1.0.0.0 it does not crash.



Re: HdmiCEC crash - RC 9.0 #17 ims

  • PLi® Core member
  • 13,632 posts

+212
Excellent

Posted 24 August 2023 - 00:07

With fixed address 1.0.0.0 it does not crash.

Ok. You should set it once...


Kdo nic nedělá, nic nezkazí!

Re: HdmiCEC crash - RC 9.0 #18 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 26 August 2023 - 14:47

What is the reason behind this option, to allow seting a fixed physical CEC address? (other than maybe for debug/development)

Does anybody from the openPLi team know or was involved?



Re: HdmiCEC crash - RC 9.0 #19 WanWizard

  • PLi® Core member
  • 68,911 posts

+1,750
Excellent

Posted 26 August 2023 - 16:01

In principle setting a fixed address isn't needed, it is hardly ever the CEC hub gives out different addresses.

 

And it is not the cause of your problem, but a workaround.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: HdmiCEC crash - RC 9.0 #20 Stan

  • Senior Member
  • 346 posts

0
Neutral

Posted 26 August 2023 - 16:33

In what particular scenario would you need to set a fixed address? I couldn't find the answer in the Wiki.

 

As for the problem causing the crash, what helps is specifying the decode() parameters.

data = data.decode("utf-8", "backslashreplace")

Edited by Stan, 26 August 2023 - 16:43.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users