Watch window: Improperly formatted XML data?

CorsixCorsix Join Date: 2008-02-26 Member: 63741Members
While using Decoda to debug some code which messes around with dumped functions, I've found an odd behaviour of the watch window.
When adding the output from string.dump as a watch (for example, the minimal string.dump(function() end) or string.dump on a more complex function), the value column displays "Improperly formatted XML data".

1) This string is not XML nor should it be
2) Even if it was improper XML, I would want to see the contents of the string so that I knew why it was improper

[attachment=35801:Image1.png]

Comments

  • CorsixCorsix Join Date: 2008-02-26 Member: 63741Members
    More weirdness happening:
    <a href="http://img507.imageshack.us/my.php?image=image1oi6.png" target="_blank"><img src="http://img507.imageshack.us/img507/5130/image1oi6.th.png" border="0" class="linked-image" /></a>

    Embedded zeros are displayed in the value for "\" but not for "\", and taking a slightly longer substring of a string gives a completely different value (shown again with constructing the strings from character values rather than substrings).
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    edited February 2008
    Thanks for reporting this. The XML error message is the result of some internal mechanisms that use XML to communicate between the front and back-ends of the debugger. You shouldn't see that, and I imagine it's the result of some embedded characters in the data that are throwing off the XML parser.

    The reason that "\" and "\" .. "\" are displayed differently in the watch window has to do with how Decoda handles wide character strings. Because Lua does not have a separate wide character string type, some developers choose to just store wide character strings in the the normal string type. To support this, Decoda attempts to discern whether the string is ASCII or wide character, and in the first case it decided it was ASCII with an embedded zero and in the second case it decided it was a wide character string. We hope to improve the display of this information and the user's control over how it's displayed soon.
Sign In or Register to comment.