revxml
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: revxml
@runrevmark - I added a note to the two bug reports. Yes, changing the instances of "length()" to "the number of bytes of" does indeed produce the correct values in 7.0-dp2. That said, I'm now seeing exactly the same results for the test stack and xml file in LC 5.5.4, 6.6, and 7.0.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: revxml
@runrevmark: It really is a PITA to debug. Switching back to the old external is indeed what we did for now however, this is only a solution for that long. I was already thinking to hop on a plane and fly over to you guys to show the problem. :-/
Best,
Malte
Best,
Malte
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: revxml
I'm troubleshooting a revXML related bug now that is tricky to track down. It looks like revAppendXML has a memory issue.
I make a call to revXMLRPC_AddParam. Random characters will end up in the XML tree after making the call. Sometimes the random characters are in the node value that revXMLRPC_AddParam added. Other times the error is in the value of a different node. Regardless, I end up with a tree with 1 invalid node value.
Unfortunately, a bare bones test stack doesn't recreate the issue. I can take the same XML as my app and try to add XML to it but no error occurs. I can recreate it every time in my application, however.
There is no issue in the version of revXML that comes with 6.5.2. There is starting in 6.6.2. I am using the older revXML external in my app but would like to figure out what is going on in case I ever need functionality in a newer version.
@malte - did you ever get to the bottom of the issue you encountered?
I make a call to revXMLRPC_AddParam. Random characters will end up in the XML tree after making the call. Sometimes the random characters are in the node value that revXMLRPC_AddParam added. Other times the error is in the value of a different node. Regardless, I end up with a tree with 1 invalid node value.
Unfortunately, a bare bones test stack doesn't recreate the issue. I can take the same XML as my app and try to add XML to it but no error occurs. I can recreate it every time in my application, however.
There is no issue in the version of revXML that comes with 6.5.2. There is starting in 6.6.2. I am using the older revXML external in my app but would like to figure out what is going on in case I ever need functionality in a newer version.
@malte - did you ever get to the bottom of the issue you encountered?
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Re: revxml
Hey Trevor,
unfortunatly not. As soon as I move the XML manipulation out of the apps context, it behaves itself. This is really frustrating.
Best,
Malte
unfortunatly not. As soon as I move the XML manipulation out of the apps context, it behaves itself. This is really frustrating.
Best,
Malte
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: revxml
@runrevmark - if someone at RunRev wants to test my app within context then they might be able to track it down. My app has to be posting a document to WordPress but it is reproducible 100% of the time on my machine.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
Re: revxml
Hmm - both of these issues definitely sound like a memory issue... However, looking at AddXML it doesn't appear to be doing anything that would cause memory overwriting, so it makes me think that its other operations which are causing the issue which is then (in Trevor's case) causing a crash when AddXML is called.
@trevordevore: Sure Trevor - if you send me an email with a recipe and what we need to reproduce we'll take a look and see if we can figure out what's going on.
@trevordevore: Sure Trevor - if you send me an email with a recipe and what we need to reproduce we'll take a look and see if we can figure out what's going on.
Re: revxml
Okay - so I can reproduce the crash in Clarify thanks to Trevor's recipe and it is definitely something memory related I think - the crash is occurring after the event so the recipe doesn't help much.
Do either of you guys have a stack which replicates the XML manipulations you are doing? I realize you've said it doesn't crash outside of the app, but I can run the manipulations through the engine using valgrind on Linux so if one of the XML functions is clobbering memory and causing the problem it will show up.
On a related note, I took a look at Bug 11748 whilst investigating this - I don't think its caused by a bug in libxml2 itself. Indeed, I think its that libxml2 in its newer version is a little more efficient - it isn't creating empty text nodes which revXML assumes are always there in certain places. Certainly the PutIntoXMLNode call is currently assuming there is always an empty text node there, and that you can create an empty text node - neither of these things are true with the newest libxml2. I've pushed a fix for it anyway, so it will get merged in in due course.
Do either of you guys have a stack which replicates the XML manipulations you are doing? I realize you've said it doesn't crash outside of the app, but I can run the manipulations through the engine using valgrind on Linux so if one of the XML functions is clobbering memory and causing the problem it will show up.
On a related note, I took a look at Bug 11748 whilst investigating this - I don't think its caused by a bug in libxml2 itself. Indeed, I think its that libxml2 in its newer version is a little more efficient - it isn't creating empty text nodes which revXML assumes are always there in certain places. Certainly the PutIntoXMLNode call is currently assuming there is always an empty text node there, and that you can create an empty text node - neither of these things are true with the newest libxml2. I've pushed a fix for it anyway, so it will get merged in in due course.
Re: revxml
Hi Mark,
I guess I am able to extract the manipulation part from the app. Will take a day or 2 though. Will be on this tonight.
Best,
Malte
I guess I am able to extract the manipulation part from the app. Will take a day or 2 though. Will be on this tonight.
Best,
Malte
Re: revxml
@malte: Any stacks that you have that do mainpulations using revXML might help - as long as its script that's doing several different things to an XML document it might still register the issue with valgrind.
EDIT: I've tried a couple from some of your bug reports - but I think they are a bit too simple to reproduce the problem as they are fine.
EDIT: I've tried a couple from some of your bug reports - but I think they are a bit too simple to reproduce the problem as they are fine.
Re: revxml
Will have it in a testcase with a large XML test file.
Re: revxml
@Mark: I send you the testbed, along with XML Testdata. Of course it just works nicely, when moved out of context...
Re: revxml
Looking at my testbed again I think I found the issue...
revPutIntoXMLNode pID, pNode, pValue
Does not seem to like empty as a value. Will check to have this on atomic level. But having this in the testbed renders my whole tree useless.
revPutIntoXMLNode pID, pNode, pValue
Does not seem to like empty as a value. Will check to have this on atomic level. But having this in the testbed renders my whole tree useless.
Re: revxml
revPutIntoXMLNode indeed appears to be the troublemaker. Still it requires fairly large XML to happen.
Send a stack and testdata to MArk for investigation.
Best,
Malte
Send a stack and testdata to MArk for investigation.
Best,
Malte
Re: revxml
I just tested RC3 and I am afraid to tell that there is still something fishy going on.
While the tree now no longer appears to get useless, I end up with wrong values in the nodes. I try to get to the bottom of this, but must say I am really close to being at my wits end. Will keep you posted.
Malte
While the tree now no longer appears to get useless, I end up with wrong values in the nodes. I try to get to the bottom of this, but must say I am really close to being at my wits end. Will keep you posted.
Malte
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: revxml
@malte - Mark fixed the revPutIntoXMLNode empty node issue earlier in the week. So that bug shouldn't be affecting you any longer.
The issue you are seeing now sounds like the same one I am seeing. What happens is that revAppendXML can sometimes mess up the value of the node you are inserting or of another node in the tree. Are you using revAppendXML in your application?
The issue you are seeing now sounds like the same one I am seeing. What happens is that revAppendXML can sometimes mess up the value of the node you are inserting or of another node in the tree. Are you using revAppendXML in your application?
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder