realbasic-nug
[Top] [All Lists]

Re: Crashing the XML Engine

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Crashing the XML Engine
From: Jason Essington <jasone at GreenRiverComputing dot com>
Date: Tue, 31 Aug 2004 16:45:28 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <6DCB206F-FB89-11D8-8B14-000D932CC652 at GreenRiverComputing dot com> <AB060C36-FB95-11D8-86E4-00039376B4AC at tallent dot com>
On Aug 31, 2004, at 3:35 PM, Stephen Tallent wrote:


Crash the application? the problem is definitely the MD5sum, but why is it crashing the xml engine. and why is it waiting until toString to crash it? Shouldn't it just whine about some xml spec violation rather than crater the whole application? Is this even an xml spec violation?

Hmmm... it doesn't crash for me. But you are correct that it is an xml spec violation, though. While you can put stuff like html and such in a CDATA section, you can't put free form binary data in there without surely having some bytes that conflict with the spec. And yes, as you mentioned, base64 is the appropriate solution for putting binary data in xml.

But regardless of whether or not it crashed for me, I agree that it would be nice if it failed politely if I do something illegal as I am creating the XML. I would expect that to be at least somewhat of a perf hit, though, having to check every aspect of the entire xml spec on every character every time I append a string. But I actually have no idea. It may not be a big deal at all. I am fairly certain there are already requests in the feedback sys to improve several aspects of XML creation.


Yes, there are, I've entered a couple.

huh, so a hash of "any string will do" actually doesn't crash the application. but the toString method doesn't generate any xml at all. Changing the hash string to "hash this" will crash the app though.

I suppose I just have to be a little more careful about the binary data that gets put into the xml and base64 encoding seems to be the solution.

I guess the XML Engine is just not completely mature yet since simple things like this shouldn't cause such dire results in a compiled application.

Let's hope that future versions are more stable.

It would also be nice to know when you do something illegal (spec wise) immediately rather than when you are trying to output the xml. (saveXml() caused the same crash)

I don't know that this discovery merits it's own bug report as other xml engine crash reports likely encompass the underlying problem.

-jason

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>