PDA

View Full Version : [VU+ Ultimo4K] File timers.xml damaged



Toja60
23-03-17, 11:22
Hi,

did a upgrade now to 5.0.007, after the install I got a message that the file timers.xml is damaged,
the file is renamed to timers.xml.old, and I can't find any new timers.xml.

Is it possible to rename the old back to xml without damage anything?

FYI, I did the same upgrade on my DUO2, and it didn't happened there.

Stanman
23-03-17, 11:27
Do you have any auto timers set up?

If not, create a timer and file with be created and you can FTP in and see what was in old ones and re add.

You can rename the old file but I would not as clearly something went awry and as it's a simple thing to redo more time effective.

Sent from my SM-N9005 using Tapatalk

Toja60
23-03-17, 11:32
Yes, I have around 20 auto-timers, However, now after 3-4 minutes the file was back. but much smaller in size, looked at it and the finished timers at the end was removed...
All seems to be OK, but I haven't got this error before ater a reboot.

Toja60
01-04-17, 07:03
Hello!

It happened again :confused:

After I rebooted the box an error message appeared that timers.xml is damaged. Timer list is empty (green button), I looked via ftp and after a minute or so the file appeared again, smaller in size, (cleared of finished timers).
And a new timers.xml_old are also available.

I have only experienced this with the latest version 5.0.008

birdman
01-04-17, 12:02
And a new timers.xml_old are also available.If you could upload that file here it might help.

Toja60
01-04-17, 12:26
Yes...

53350

birdman
01-04-17, 22:09
After I rebooted the box an error message appeared that timers.xml is damaged. Does it in fact say this?


The timer file (timers.xml) is corrupt and could not be loaded.

birdman
01-04-17, 22:13
The file contains several entries such as this:


<log code="501" time="1490532550">[AutoTimer] Warning, AutoTimer Kommissarie Banks messed with a timer which might not belong to it: Kommissarie Banks .</log>
...
<log code="501" time="1490718738">[AutoTimer] Warning, AutoTimer Smartare än en femteklassare messed with a timer which might not belong to it: Smartare än en femteklassare .</log>
...
<log code="501" time="1490718741">[AutoTimer] Warning, AutoTimer Världens natur: Planet Earth 2 messed with a timer which might not belong to it: Världens natur: Planet Earth 2 .</log>, which might be of interest to you when looking at your AutoTimer settings, but I can't see that would make the file appear to be corrupt.

More interesting/relevant is that Kate (the KDE editor) reckons that the file contains invalid characters when read as a utf-8 file. I haven't found out where the issue is yet though.
That may well make the XML parser complain that there is an error.

birdman
02-04-17, 01:56
More interesting/relevant is that Kate (the KDE editor) reckons that the file contains invalid characters when read as a utf-8 file. I haven't found out where the issue is yet though.
That may well make the XML parser complain that there is an error.



/local/users/gml4410/Downloads/timers.xml_old:656: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xC3 0x26 0x61 0x70
ll för ett av sina porträtt_ Men så får Jerry reda på att hon är en imitat0xc3, which is the start of and extended utf8 sequence, must be followed by a continuation byte, which has the top-bit (0x80) set. but 0x26 does not, so this is invalid utf8.

And I can see what the problem is....(a solution may be more problematic...).

The actual full line is:


<log code="0" time="1490963320">Filename calculated as: &apos;/media/hdd/movie/Seinfeld/20170331 1429 - TV6 HD (S) - Seinfeld - (Säsong 3_ Del 21 av 23) (1991)_Amerikansk komediserie från 1991-92_ Jerry dejtar en konstnär som låter Kramer sitta modell för ett av sina porträtt_ Men så får Jerry reda på att hon är en imitat�&apos;</log>So you are setting the filename from the full description. Which is long. And hence needs to be truncated to fit into the filename length. But the truncation is being done at the byte level, not at a (utf8) character level and this particular truncation was done in the middle of a sequence.

It's also possible that the actual filename is OK, but and it's just the log reporting that is truncating.

A workaround until there is a fix is not to use full descriptions for filenames.

birdman
02-04-17, 02:07
It's also possible that the actual filename is OK, but and it's just the log reporting that is truncating.Looks like the filename is "wrong" too.

Tools/Directories.py has:

filename = filename[:247]
which is a simple byte chop. It needs to have a bit more intelligence (fortunately utf8 bytes can be read backwards deterministically, and I was writing C code to do it a few weeks back...).

birdman
02-04-17, 04:19
It needs to have a bit more intelligence (fortunately utf8 bytes can be read backwards deterministically, and I was writing C code to do it a few weeks back...).Or, given that this isn't in any time critical code, just convert it to Unicode ignoring errors, then convert it back (which means any trailing partial character sequence gets ignored).

filename = unicode(filename[:247], 'utf8', 'ignore').encode('utf8', 'ignore')

birdman
02-04-17, 15:16
Or, given that this isn't in any time critical code, just convert it to Unicode ignoring errors, then convert it back (which means any trailing partial character sequence gets ignored).

filename = unicode(filename[:247], 'utf8', 'ignore').encode('utf8', 'ignore')I've submitted that fix for inclusion in the Dev stream.

Toja60
02-04-17, 15:57
Hi Birdman, thanks alot for all your investigation! I'm pretty sure that the error was "Damaged"...
I enabled "long file name" or description just for testing for a while, but is back to standard now.

I upgraded to latest fw 009 yesterday, and this timer error didn't appeared now, so long only 2 times (at reboot) in 008.

birdman
02-04-17, 16:04
I upgraded to latest fw 009 yesterday, and this timer error didn't appeared now, so long only 2 times (at reboot) in 008.It will only happen if you have a long description and the 247 byte limit happens to fall in the middle of as multi-byte character.