Bug 73072 - Logger fails to load logs containing weird strings
Summary: Logger fails to load logs containing weird strings
Status: RESOLVED DUPLICATE of bug 40675
Alias: None
Product: Telepathy
Classification: Unclassified
Component: logger (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-27 15:08 UTC by Guillaume Desmottes
Modified: 2015-04-20 11:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2013-12-27 15:08:59 UTC
Original bug report: https://bugzilla.gnome.org/show_bug.cgi?id=721124

Try loading this log file:

<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="log-store-xml.xsl"?>
<log>
<message time='20131226T21:00:26' id='XXX' name='XXX' token='' isuser='false'
type='normal'>&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~&#x1b;[6~valid
message follows here</message>
</log>

We get a lot of "parser error : xmlParseCharRef: invalid xmlChar value 27" and then "tp-logger-WARNING **: Failed to parse file"
Comment 1 Simon McVittie 2014-01-03 14:21:41 UTC
(In reply to comment #0)
> <message time='20131226T21:00:26' id='XXX' name='XXX' token='' isuser='false'
> type='normal'>&#x1b;[6~&#x1b;

This is indeed malformed. XML cannot represent U+001B or other control characters, even when escaped via numeric character references. (Yes, I was astonished to discover that, too.)

If we've been willing to write out files like this in the past, we need some way to put the parser in a permissive not-quite-XML mode so we can recover them.
Comment 2 Maciej Piechotka 2014-05-03 21:54:38 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > <message time='20131226T21:00:26' id='XXX' name='XXX' token='' isuser='false'
> > type='normal'>&#x1b;[6~&#x1b;
> 
> This is indeed malformed. XML cannot represent U+001B or other control
> characters, even when escaped via numeric character references. (Yes, I was
> astonished to discover that, too.)
> 
> If we've been willing to write out files like this in the past, we need some
> way to put the parser in a permissive not-quite-XML mode so we can recover
> them.

Actually the current versions (0.8.0) still writes the corrupted files it itself cannot parse. I have log from 29 April:

<message time='20140429T16:27:50' id='fizruk' name='fizruk' token='' isuser='false' type='normal'>&#x8;semigroupoids has Foldable1 iirc :p</message>

For reference I've installed the current version on March 29 and I tend to not have a very long uptimes ATM.
Comment 3 Debarshi Ray 2015-04-20 11:56:06 UTC

*** This bug has been marked as a duplicate of bug 40675 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.