Page 1 of 1

XML Node Bug

Posted: 23 Jul 2013, 16:22
by Joe Styles
Afraid we are having real issues with the XML text node crashing the properties editor! One I haven't seen in a long time.

It is valid XML that has come from someone else based on our spec. Our test files work fine but this one obviously has something invalid for the Ventuz parser causing the properties window to crash. We are frantically trying to take out bits of the XML to work out what is going on but it is a lot of data.

Can you guys take a look?? We need a fix on this as soon as you can as we were supposed to be delivering something to the client today :shock:

Re: XML Node Bug

Posted: 23 Jul 2013, 16:45
by Karol
Hi Joe!

This is a crash in Windows GDI+ API. In this case the DrawString method crashes with a "Generic GDI+ Error".
Not very helpful! I have no idea whats going on.
Currently I have no workaround for you. The Property Editor crashes only in Input view - in Output view it does not!

Cheers
Karol

Re: XML Node Bug

Posted: 23 Jul 2013, 17:34
by craig
Hi Karol,

I'm working on this project with Joe, and we're finding that this error is preventing us from testing or debugging our scene effectively.

Once it has occurred, we can no longer access the input properties of any node - so for us, this has become a critical issue.

Is it possible for your guys to do some investigation?

Regards,
Craig.

Re: XML Node Bug

Posted: 24 Jul 2013, 09:20
by craig
I think we have identified the problem. I've tested with a simple scene that has just a string node exposed as an external. I tried looping through the XML file and setting the external to a substring of the entire file - I had a hunch it might be to do with the maximum buffer size of the GDI DrawString() function http://msdn.microsoft.com/en-us/library ... s.85).aspx

So, I started working around the 32k limit (32768 bytes), and that was too long. With some trial and error, and lots of Ventuz restarts, it seems that there is an absolute limit of 32000 characters.

My next test was to work out why. So, I did the same tests with a formatted text file - and all was fine. I could send my entire 70k test file! Bear in mind I've now eliminated the XMLText node, as I'm testing with String node. So, it's definitely a issue with the property window, nothing to do with the XMLText node or the XML Parser.

My last test was to format the offending XML using an XMLTextWriter before setting the external. It worked! Still the same data, but with a line break after each element.

The conclusion then, I think, is that there is a hard *line length* limit of 32000 characters on the string parameter of the DrawString method.

Your thoughts on this greatly appreciated!

Cheers,
Craig.

Re: XML Node Bug

Posted: 24 Jul 2013, 09:58
by Karol
Hi guys!

The problems is line length of the XML string - it's all in one single line!
If the XML would be indented the problem would not occur; that's why the Output view of the PE does not crash.
We will fix this with a Ventuz 3 update.

Cheers
Karol

Re: XML Node Bug

Posted: 29 Jul 2013, 11:24
by craig
Hi Karol,

How is the fix for this issue progressing?

Regards,
Craig.

Re: XML Node Bug

Posted: 02 Aug 2013, 12:48
by craig
Thanks very much for the hotfix, guys. I think we can call this issue closed. :)

Cheers,
Craig.