T3 and U4 shutdown malfunction

Moderators: Gully, peteru

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by Grumpy_Geoff » Sat Mar 16, 2019 15:39

geoffree wrote:
Sat Mar 16, 2019 15:22
So, in looking to gingerly redo some settings
Which ones would you suggest I avoid touching for the time being?
Which settings are most likely to cause this sort of issue?

A couple of your settings that are different to mine that may impact this (but I'm just guessing) -
You don't have timeshift enabled - whereas I have it as the default 10 seconds
You appear to have HDMI as the startup service
You have USB Tuner D set as priority allocation - whereas I have auto

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 16:04

Grumpy_Geoff wrote:
Sat Mar 16, 2019 15:39
You have USB Tuner D set as priority allocation - whereas I have auto

No, it's a bit odder. Geofree's "Preferred tuner" is set to Tuner A and "Preferred tuner for recordings" is set to USB Tuner D.

The default for "Preferred tuner for recordings" is Disabled. The default for "Preferred tuner" on my U4 is Tuner A, and to not have an entry for config.usage.frontend_priority in the settings list. Geoffree's settings list has:

Code: Select all

  [
   "config.usage.recording_frontend_priority", 
   "0"
  ], 
So, with an internal default that's not "0". The only way I can see for that to happen is in UsageConfig.py:

Code: Select all

	try:
		config.usage.frontend_priority = ConfigSelection(default="0", choices=nims)
	except:
		config.usage.frontend_priority = ConfigSelection(default="-1", choices=nims)
But I don't know why an exception would be thrown there.

I'd suggest not using the USB tuner as the default tuner anyway, and simply set "Preferred tuner for recordings" to Disabled.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 16:22

Grumpy_Geoff wrote:
Sat Mar 16, 2019 15:39
geoffree wrote:
Sat Mar 16, 2019 15:22
So, in looking to gingerly redo some settings
Which ones would you suggest I avoid touching for the time being?
Which settings are most likely to cause this sort of issue?

A couple of your settings that are different to mine that may impact this (but I'm just guessing) -
You don't have timeshift enabled - whereas I have it as the default 10 seconds
You appear to have HDMI as the startup service
You have USB Tuner D set as priority allocation - whereas I have auto
Grumpy_Geoff wrote:
Sat Mar 16, 2019 15:39
geoffree wrote:
Sat Mar 16, 2019 15:22
So, in looking to gingerly redo some settings
Which ones would you suggest I avoid touching for the time being?
Which settings are most likely to cause this sort of issue?

A couple of your settings that are different to mine that may impact this (but I'm just guessing) -
You don't have timeshift enabled - whereas I have it as the default 10 seconds
You appear to have HDMI as the startup service
You have USB Tuner D set as priority allocation - whereas I have auto
Thanks Grumpy Geoff
I'll test those
Not sure how tuner D got to be default! don't remember setting that!
Can you tell where to find 'startup service' setting. I cant find it
Thanks
Geoffrey
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 16:34

geoffree wrote:
Sat Mar 16, 2019 16:22
Can you tell where to find 'startup service' setting. I cant find it

When you shut down, it saves whatever channel/digital service that was showing at the time so when you restart it goes back to that service. It's in the settings file, but there isn't a specific user setting entry.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by MrQuade » Sat Mar 16, 2019 16:47

prl wrote:
Sat Mar 16, 2019 16:34
When you shut down, it saves whatever channel/digital service that was showing at the time so when you restart it goes back to that service. It's in the settings file, but there isn't a specific user setting entry.
No, it is possible to set a fixed startup service regardless of the one that was active when you shut down.

If you highlight the service in the channel list and press MENU you can select or deselect it as a startup service.

Though this may be a different configurations entry to the one in your file. In not that familiar with the guts of that file.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 16:50

prl wrote:
Sat Mar 16, 2019 16:34
geoffree wrote:
Sat Mar 16, 2019 16:22
Can you tell where to find 'startup service' setting. I cant find it

When you shut down, it saves whatever channel/digital service that was showing at the time so when you restart it goes back to that service. It's in the settings file, but there isn't a specific user setting entry.
I see. thank you. I had read posts elsewhere about problems with timers related to the default service being HDMI
but I've had it that way for all the tests so far today with no problems (I prefer a blank screen at startup-never watch stuff live)
so it's not the trigger
thanks
gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by MrQuade » Sat Mar 16, 2019 17:04

geoffree wrote:
Sat Mar 16, 2019 16:50
I see. thank you. I had read posts elsewhere about problems with timers related to the default service being HDMI
Even if this isn't the trigger, these are the sorts of things we need to know when we ask you what is unique about the way you use the T4. Anything that you do that might deviate from the norm might be a trigger.

You may have mentored it in a thread at one point in the past, but most of us find it hard to track every users particular settings ;) (unless you are Grumpy_Geoff who seems to maintain a profile on everyone *g*)
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 17:31

geoffree wrote:
Fri Mar 15, 2019 19:55
MrQuade wrote:
Fri Mar 15, 2019 19:25
Most likely not related, but why do you stop timeshift during recording?
Thanks MrQuade.
I was aware of time shifting being a possible reason for all of this so I had gone into the settings and stopped anything that looked like it might be 'encouraging' the machine to do time shifting in the background as the error message that pops on attempted shutdown suggests.
I know very little about time shifting, never use it, so don't understand the settings much.
The stop timeshifting during recordings looked like the right thing to do, I guess... Should I turn it on again?
The issue appeared straight after the update attempts. First time: restoring settings from backup as advised by postings on this forum - the issue appeared then. I then did a 2nd attempt - a clean install, hoping that might clear the problem - I did not restore settings backup, I made no adjustments to default settings but the issue persisted. I have tinkered with the settings since then,, as you can see, but to no avail.

I remember trying all of this during T3 testing a long time ago - once again to no avail;.
Time shifting settings don't appear to affect the behaviour of this issue
gb
Definitely getting somewhere.
Started carefully tinkering with Time shifting settings one at a time and testing as I went.
I had 'Autostart after so many seconds' set to disable in my original settings
thats does not seem to trigger the problem.

But 'stop timeshifting while recording' was ON in my original settings (default is off)
Just tested this back and forward on / off / on / off etc a number of times rebooting as I went
Result: when it is set to ON, it triggers the error message I mentioned . OFF and all is well , U4 shuts down as it should
Interested to know whether it would that for your machines,

gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 17:33

MrQuade wrote:
Sat Mar 16, 2019 16:47
prl wrote:
Sat Mar 16, 2019 16:34
When you shut down, it saves whatever channel/digital service that was showing at the time so when you restart it goes back to that service. It's in the settings file, but there isn't a specific user setting entry.
No, it is possible to set a fixed startup service regardless of the one that was active when you shut down.

I'd forgotten that. But it's not used in the settings file that geoffree posted. His settings had config.tv.lastservice (the last service used) set to HDMI IN, but config.servicelist.startupservice (always start up showing this service) was not set. So though it's possible to set a fixed startup service, that settings list wasn't using it.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 17:35

geoffree wrote:
Sat Mar 16, 2019 17:31
But 'stop timeshifting while recording' was ON in my original settings (default is off)
Just tested this back and forward on / off / on / off etc a number of times rebooting as I went
Result: when it is set to ON, it triggers the error message I mentioned . OFF and all is well , U4 shuts down as it should
Interested to know whether it would that for your machines,

That's just the sort of thing I was looking for. I'll have a look at it tomorrow.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 17:39

MrQuade wrote:
Sat Mar 16, 2019 17:04
geoffree wrote:
Sat Mar 16, 2019 16:50
I see. thank you. I had read posts elsewhere about problems with timers related to the default service being HDMI
Even if this isn't the trigger, these are the sorts of things we need to know when we ask you what is unique about the way you use the T4. Anything that you do that might deviate from the norm might be a trigger.

You may have mentored it in a thread at one point in the past, but most of us find it hard to track every users particular settings ;) (unless you are Grumpy_Geoff who seems to maintain a profile on everyone *g*)
I think he may know where I live ;-)
But seriously, he's really good at following through on stuff in a detailed way!
gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 17:41

geoffree wrote:
Sat Mar 16, 2019 17:39
But seriously, he's really good at following through on stuff in a detailed way!

Indeed he is. My memory of things as been corrected by Grumpy_Geoff on quite a number of occasions.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by MrQuade » Sat Mar 16, 2019 17:44

geoffree wrote:
Sat Mar 16, 2019 17:31
But 'stop timeshifting while recording' was ON in my original settings (default is off)
Just tested this back and forward on / off / on / off etc a number of times rebooting as I went
Result: when it is set to ON, it triggers the error message I mentioned . OFF and all is well , U4 shuts down as it should
Interested to know whether it would that for your machines,
Glad I spotted that one then :). I didn't think it was related, more of a curiosity, but it shows that you never know within the labyrinth of code constitutes power states and timeshift.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 17:56

MrQuade wrote:
Sat Mar 16, 2019 17:44
geoffree wrote:
Sat Mar 16, 2019 17:31
But 'stop timeshifting while recording' was ON in my original settings (default is off)
Just tested this back and forward on / off / on / off etc a number of times rebooting as I went
Result: when it is set to ON, it triggers the error message I mentioned . OFF and all is well , U4 shuts down as it should
Interested to know whether it would that for your machines,
Glad I spotted that one then :). I didn't think it was related, more of a curiosity, but it shows that you never know within the labyrinth of code constitutes power states and timeshift.

Yes, I'd noticed it, too, and (as it turns out, wrongly) dismissed it as unimportant.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sat Mar 16, 2019 18:32

I've been able to replicate geoffree's bug! :)

On my test T4, after a factory reset:
Enabled MENU>Setup>TV>Timeshift>Stop timeshift while recording
Rebooted
Set a 1-minute timer a minute ahead (After action: auto)
Waited until recording started, used the remote on the T4.
Waited until recording finished, Used the remote (not sure whether using the remote is necessary to replicate the bug)
long-POWER>Shutdown
Popup with: "Recording(s) are in progress or coming up soon, or you are saving timeshift! / Really shutdown now?".
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 21:10

prl wrote:
Sat Mar 16, 2019 18:32
I've been able to replicate geoffree's bug! :)

On my test T4, after a factory reset:
Enabled MENU>Setup>TV>Timeshift>Stop timeshift while recording
Rebooted
Set a 1-minute timer a minute ahead (After action: auto)
Waited until recording started, used the remote on the T4.
Waited until recording finished, Used the remote (not sure whether using the remote is necessary to replicate the bug)
long-POWER>Shutdown
Popup with: "Recording(s) are in progress or coming up soon, or you are saving timeshift! / Really shutdown now?".
Thanks Peter!
So glad "it's not just me"
I have often thought "these guys must think I'm crazy" as I tried to detail what was going on
Great relief to be vindicated.
I think this is the first time anybody has been able to recreate the issue.
Thanks to everybody who assisted
Of course, I'm going to continue to very carefully personalize my settings, testing as I go,
because there may be something else that triggers it too!

gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by MrQuade » Sat Mar 16, 2019 21:15

Oh we had no doubt it was happening! We were just frustrated by which of your unique settings was causing it!

The problem of such a flexible device with so many separate developers and independent plugins, is that it is next to impossible to catch every single combination of settings that may cause problems.

What it takes is patience from the end users to help us trace the source of their particular issues :)

So well done to you for hanging in there :). Several do not!
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 21:42

MrQuade wrote:
Sat Mar 16, 2019 21:15
Oh we had no doubt it was happening! We were just frustrated by which of your unique settings was causing it!

The problem of such a flexible device with so many separate developers and independent plugins, is that it is next to impossible to catch every single combination of settings that may cause problems.

What it takes is patience from the end users to help us trace the source of their particular issues :)

So well done to you for hanging in there :). Several do not!
Thank you MrQuade! It did take many hours this afternoon.
Very time consuming, testing at every stage.
Glad we got there.
Best part is the U4 now shuts down properly!
Huzzah!
gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by Grumpy_Geoff » Sat Mar 16, 2019 21:46

MrQuade wrote:
Sat Mar 16, 2019 21:15
Oh we had no doubt it was happening! We were just frustrated by which of your unique settings was causing it!

Well, that setting didn't change itself. It was fine for 11 months.
When you questioned the changed setting, we were told it was done as an attempt to avert the issue - https://www.beyonwiz.com.au/forum/viewt ... 78#p175954
We were also informed a clean install still had the issue.
:?: :?

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sat Mar 16, 2019 22:18

geoffree wrote:
Sat Mar 16, 2019 21:10
prl wrote:
Sat Mar 16, 2019 18:32
I've been able to replicate geoffree's bug! :)

On my test T4, after a factory reset:
Enabled MENU>Setup>TV>Timeshift>Stop timeshift while recording
Rebooted
Set a 1-minute timer a minute ahead (After action: auto)
Waited until recording started, used the remote on the T4.
Waited until recording finished, Used the remote (not sure whether using the remote is necessary to replicate the bug)
long-POWER>Shutdown
Popup with: "Recording(s) are in progress or coming up soon, or you are saving timeshift! / Really shutdown now?".
Thanks Peter!
So glad "it's not just me"
I have often thought "these guys must think I'm crazy" as I tried to detail what was going on
Great relief to be vindicated.
I think this is the first time anybody has been able to recreate the issue.
Thanks to everybody who assisted
Of course, I'm going to continue to very carefully personalize my settings, testing as I go,
because there may be something else that triggers it too!

gb
Peter, I would be interested to know if, with 'Stop timeshift" etc set to ON.
you attempt an unattended recording as I described, it will shut down ok.
As it does for me ie. set a timer, shut down the U4, let it boot itself up at recording time and record
- don't touch the remote or in any way interact with the U4,, and see if it shuts down ok.
gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 07:00

geoffree wrote:
Sat Mar 16, 2019 22:18
Peter, I would be interested to know if, with 'Stop timeshift" etc set to ON.
you attempt an unattended recording as I described, it will shut down ok.
As it does for me ie. set a timer, shut down the U4, let it boot itself up at recording time and record
- don't touch the remote or in any way interact with the U4,, and see if it shuts down ok.
It shuts down (for a timer with After event: auto).
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 07:01

prl wrote:
Sat Mar 16, 2019 18:32
I've been able to replicate geoffree's bug! :)

On my test T4, after a factory reset:
Enabled MENU>Setup>TV>Timeshift>Stop timeshift while recording
Rebooted
Set a 1-minute timer a minute ahead (After action: auto)
Waited until recording started, used the remote on the T4.
Waited until recording finished, Used the remote (not sure whether using the remote is necessary to replicate the bug)
long-POWER>Shutdown
Popup with: "Recording(s) are in progress or coming up soon, or you are saving timeshift! / Really shutdown now?".

As I suspected, the problem happens whether the remote is used or not (apart from using it to actually shut down) at the end.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 08:03

For anyone else wanting to replicate the problem, it also happens if "Stop timeshift while recording" is enabled and you make an instant recording, then try to shut down.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sun Mar 17, 2019 08:17

prl wrote:
Sun Mar 17, 2019 07:00
geoffree wrote:
Sat Mar 16, 2019 22:18
Peter, I would be interested to know if, with 'Stop timeshift" etc set to ON.
you attempt an unattended recording as I described, it will shut down ok.
As it does for me ie. set a timer, shut down the U4, let it boot itself up at recording time and record
- don't touch the remote or in any way interact with the U4,, and see if it shuts down ok.
It shuts down (for a timer with After event: auto).
ah hah! Just like my experience then?
How does that happen? Why would interacting with the U4 have any impact on the 'stop timeshift' setting producing this bug?
I have found this to be absolutely consistent - Shut down is fine if you don't touch the thing and the U4 boots itself up for recording.!
As soon as you use the remote to do anything, during that process, it eventually triggers the error if you attempt shutdown after the current recording yourself OR the machine tries to shut down afterwards . I tested this over and over again.
Unattended recording and shut down never produced the error

gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sun Mar 17, 2019 08:22

prl wrote:
Sun Mar 17, 2019 07:01
prl wrote:
Sat Mar 16, 2019 18:32
I've been able to replicate geoffree's bug! :)

On my test T4, after a factory reset:
Enabled MENU>Setup>TV>Timeshift>Stop timeshift while recording
Rebooted
Set a 1-minute timer a minute ahead (After action: auto)
Waited until recording started, used the remote on the T4.
Waited until recording finished, Used the remote (not sure whether using the remote is necessary to replicate the bug)
long-POWER>Shutdown
Popup with: "Recording(s) are in progress or coming up soon, or you are saving timeshift! / Really shutdown now?".

As I suspected, the problem happens whether the remote is used or not (apart from using it to actually shut down) at the end.
Try a completely unattended recording, meaning set a timer , turn the U4 off. let it boot itself up, do the recording and it should shut itself down as long as you don't interact with it at any time. This has been my absolutely consistent experience.
gb
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 08:41

I've already tested that and posted my results. The case where it doesn't matter whether the remote is used is for timers that start when the PVR is already running.

I'm already making progress on the cause of that issue.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sun Mar 17, 2019 09:20

prl wrote:
Sun Mar 17, 2019 08:41
I've already tested that and posted my results. The case where it doesn't matter whether the remote is used is for timers that start when the PVR is already running.

I'm already making progress on the cause of that issue.
if the PVR is already running and you have interacted with it, before the programmed recording starts,
then yes I would expect the error to occur.
But if the machine boots itself up to do it - and you don't touch it, the the error did not occur.
Completely 'unattended' recordings were always fine.
I tested both situations many times on both the T3 and the U4
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 10:04

The bug appears to be triggered by a setting that controls when timeshift recordings are made. If the PVR starts up from standby to make a recording, the recording is done in standby mode, where timsehift is disabled.

So it's not all that surprising to me that the recordings done while in standby aren't affected by the bug.

However, until I've actually found the source of the problem, it's hard to say exactly what circumstances trigger the bug.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 10:41

OK, I think I've found the cause. There seem to be two issues that combine to cause the problem:
  • In Components.Timeshift.InfoBarTimeshift.ptsTimerEntryStateChange() the test on config.timeshift.stopwhilerecording.value is inverted from what it should be.
  • In the same method, the test len(JobManager.getPendingJobs()) >= 1 is not specific enough to only test whether timeshift saving jobs are running. Specifically, in this case there is a job running just after the recording finishes, the one that cleans out the trash folders, and that means that the job count is greater than 0 when this code runs.
  • The combination of the above two result in config.timeshift.isRecording being set to True when it should be False.
  • config.timeshift.isRecording being incorrectly set to True causes the shutdown code to incorrectly think that there are current timeshift save jobs being run, so it displays the "Recording(s) are in progress or coming up soon, or you are saving timeshift!" popup. It doesn't display the "N jobs are running in the background!" message for two reasons: by the time POWER is pressed on the remote, the trash cleanup job has finished, and even if it hasn't, the "Recording(s)" message takes priority over the "jobs" message.
  • The bug doesn't affect recordings made in standby from shutdown, because the relevant part of ptsTimerEntryStateChange() is not executed if the box is in standby.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: T3 and U4 shutdown malfunction

Post by Grumpy_Geoff » Sun Mar 17, 2019 11:06

prl wrote:
Sun Mar 17, 2019 10:41
OK, I think I've found the cause.

I knew you would, good work.
prl wrote:
Sun Mar 17, 2019 10:41
The bug doesn't affect recordings made in standby from shutdown, because the relevant part of ptsTimerEntryStateChange() is not executed if the box is in standby.

...not forgetting that for a T2 it normally won't boot to standby for a timer recording so this bug should be evident with an enabled Stop timeshift while recording setting.

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 11:10

Grumpy_Geoff wrote:
Sun Mar 17, 2019 11:06
prl wrote:
Sun Mar 17, 2019 10:41
OK, I think I've found the cause.

I knew you would, good work.

:) Thanks.
Grumpy_Geoff wrote:
Sun Mar 17, 2019 11:06
prl wrote:
Sun Mar 17, 2019 10:41
The bug doesn't affect recordings made in standby from shutdown, because the relevant part of ptsTimerEntryStateChange() is not executed if the box is in standby.

...not forgetting that for a T2 it normally won't boot to standby for a timer recording so this bug should be evident with an enabled Stop timeshift while recording setting.

I'd expect so.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sun Mar 17, 2019 11:25

prl wrote:
Sun Mar 17, 2019 10:41
OK, I think I've found the cause. There seem to be two issues that combine to cause the problem:
  • In Components.Timeshift.InfoBarTimeshift.ptsTimerEntryStateChange() the test on config.timeshift.stopwhilerecording.value is inverted from what it should be.
  • In the same method, the test len(JobManager.getPendingJobs()) >= 1 is not specific enough to only test whether timeshift saving jobs are running. Specifically, in this case there is a job running just after the recording finishes, the one that cleans out the trash folders, and that means that the job count is greater than 0 when this code runs.
  • The combination of the above two result in config.timeshift.isRecording being set to True when it should be False.
  • config.timeshift.isRecording being incorrectly set to True causes the shutdown code to incorrectly think that there are current timeshift save jobs being run, so it displays the "Recording(s) are in progress or coming up soon, or you are saving timeshift!" popup. It doesn't display the "N jobs are running in the background!" message for two reasons: by the time POWER is pressed on the remote, the trash cleanup job has finished, and even if it hasn't, the "Recording(s)" message takes priority over the "jobs" message.
  • The bug doesn't affect recordings made in standby from shutdown, because the relevant part of ptsTimerEntryStateChange() is not executed if the box is in standby.
Brilliant! well done!!!
...and on a Sunday!
I hope Beyonwiz are paying you a LOT OF MONEY! ;-)
Gb .
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 12:07

geoffree wrote:
Sun Mar 17, 2019 11:25
Brilliant! well done!!!
...and on a Sunday!

Thanks you.
geoffree wrote:
Sun Mar 17, 2019 11:25
I hope Beyonwiz are paying you a LOT OF MONEY! ;-)

I'm afraid not.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 12:14

I think the fix for the job counting will be to replace:
(len(JobManager.getPendingJobs()) >= 1
with something like
len([j for j in JobManager.getPendingJobs() if j.__module__ == "Tools.TimeShift"]) >= 1
All of the Jobs/Tasks used to do timeshift saves are defined in Tools.TimeShift. Using the job names would be a bit cumbersome.

There are a few places in the timeshift code where the change needs to be made (and so it should probably be encapsulated in a method).
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 12:32

Bug #713: [Shutdown] Can falsely report that recordings or timeshift save is running

The issue log entry doesn't have any information that's not in this topic, but it puts all the relevent bits in one place :)
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: T3 and U4 shutdown malfunction

Post by peteru » Sun Mar 17, 2019 13:01

prl wrote:
Sun Mar 17, 2019 12:14
I think the fix for the job counting will be to replace:
(len(JobManager.getPendingJobs()) >= 1
with something like
len((j for j in JobManager.getPendingJobs() if j.__module__ == "Tools.TimeShift")) >= 1
All of the Jobs/Tasks used to do timeshift saves are defined in Tools.TimeShift. Using the job names would be a bit cumbersome.

There are a few places in the timeshift code where the change needs to be made (and so it should probably be encapsulated in a method).
While this code may be the simplest to implement and provide a minimal diff, it's not exactly heading in the right direction as far as a clean and legible API is concerned. In light of the comments I made in other places about timeshift implementations, I wonder if it would be a good idea to enhance the timeshift code with a simple and clean API that tracks the state of timeshifting on a global (possibly C++) basis. I guess prior to going down that path the existing code should be audited to see if perhaps there is already a way and the higher level APIs are simply not using it properly, instead resorting to strange indirect idioms, like the above.

Oh and while I am here... Thanks to everyone for persisting with troubleshooting this and getting to the bottom of it. 8)

"Beauty lies in the hands of the beer holder."
Blog.

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 13:16

peteru wrote:
Sun Mar 17, 2019 13:01
prl wrote:
Sun Mar 17, 2019 12:14
I think the fix for the job counting will be to replace:
(len(JobManager.getPendingJobs()) >= 1
with something like
len((j for j in JobManager.getPendingJobs() if j.__module__ == "Tools.TimeShift")) >= 1
All of the Jobs/Tasks used to do timeshift saves are defined in Tools.TimeShift. Using the job names would be a bit cumbersome.

There are a few places in the timeshift code where the change needs to be made (and so it should probably be encapsulated in a method).
While this code may be the simplest to implement and provide a minimal diff, it's not exactly heading in the right direction as far as a clean and legible API is concerned. In light of the comments I made in other places about timeshift implementations, I wonder if it would be a good idea to enhance the timeshift code with a simple and clean API that tracks the state of timeshifting on a global (possibly C++) basis. I guess prior to going down that path the existing code should be audited to see if perhaps there is already a way and the higher level APIs are simply not using it properly, instead resorting to strange indirect idioms, like the above.

Oh and while I am here... Thanks to everyone for persisting with troubleshooting this and getting to the bottom of it. 8)

Current actual implementation:

Code: Select all

	@staticmethod
	def getPendingSaveTimeshiftJobs():
		# Assumes that all timeshift save-related jobs
		# are in Tools.TimeShift
		return [j for j in JobManager.getPendingJobs() if j.__module__ == "Tools.TimeShift"]

	@staticmethod
	def hasPendingSaveTimeshiftJobs():
		return len(InfoBarTimeshift.getPendingSaveTimeshiftJobs()) > 0
	...
	def someOtherMethod(self):
		...
		if ... hasPendingSaveTimeshiftJobs() ...:
No matter what the API is, if it needs to check whether there are any timeshift save-related jobs running at any time, it needs some sort of test like this. I'm not entirely happy with it, either, because it's fragile. A better alternative would be welcome.

It does fix the bug, though. I'm yet to test whether timeshift save still works as it should.

Some time ago (nearly 2 years) I did a transition diagram/call graph of the timeshift save/merge process with the intention of improving it. It's such a mess I never really got anywhere. The graph may still be of use in working out what I need to test to be reasonably confident that timeshift save still works.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Sun Mar 17, 2019 15:06

prl wrote:
Sun Mar 17, 2019 12:07
geoffree wrote:
Sun Mar 17, 2019 11:25
Brilliant! well done!!!
...and on a Sunday!

Thanks you.
geoffree wrote:
Sun Mar 17, 2019 11:25
I hope Beyonwiz are paying you a LOT OF MONEY! ;-)

I'm afraid not.
bugger it. they should :(
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Sun Mar 17, 2019 16:37

prl wrote:
Sun Mar 17, 2019 10:41
OK, I think I've found the cause. There seem to be two issues that combine to cause the problem:
  • In Components.Timeshift.InfoBarTimeshift.ptsTimerEntryStateChange() the test on config.timeshift.stopwhilerecording.value is inverted from what it should be.
    ...

After looking at the code more closely, that test is not inverted. The bug is simply only seen when "Stop timeshift while recording" is enabled.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Mon Mar 18, 2019 16:21

I've submitted a fix for this bug.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Mon Mar 18, 2019 17:22

prl wrote:
Mon Mar 18, 2019 16:21
I've submitted a fix for this bug.
Well done
Thank you for your diligent work
I have been carefully personalising a few other settings. No problems as yet.
I’ll have to hold off on any hands on testing for about 3 weeks (hospital visit) but nice to know my little U4 will be pumping away as it should and shutting down when it should while I’m away! Thanks again
Geoffrey
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

prl
Wizard God
Posts: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: T3 and U4 shutdown malfunction

Post by prl » Mon Mar 18, 2019 17:31

Best wishes for your hospital visit!
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

geoffree
Master
Posts: 106
Joined: Sun Jul 30, 2017 23:50

Re: T3 and U4 shutdown malfunction

Post by geoffree » Mon Mar 18, 2019 19:28

prl wrote:
Mon Mar 18, 2019 17:31
Best wishes for your hospital visit!
Thank you Peter!
U4, T3 (as backup) Retired: Wintal PVR-10 HD, Strong SRT 5492, DSE DS6200PVR, Wintal PVR-X10a, Coffee: Delonghi MAGNIFICA

Post Reply

Return to “General Topics”