Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure using getRealArray1D from an element with many sub elements #26

Closed
jamesegolding opened this issue Apr 12, 2018 · 7 comments
Closed
Labels

Comments

@jamesegolding
Copy link

Hi tbeu,

I have an issue whereby, if an element contains more than a certain number of sub elements, any call to retrieve an array will fail.

Attached are two xmls, which are simple extensions of the example released with ExternData.
The script contains one call to getRealArray1D and works when using the "test.xml" but fails when pointing to the "testFAIL.xml", which simply contains one additional element.

Calling other values from both xmls work fine, so it seems to be the method itself rather than the parsing.

Could you check to see if you see the same problem? Is what I've done fair?
Please let me know if anything is unclear.

Many thanks!

James

I'm using:
Dymola
Visual Studio 2015 Express Edition
ExternData v2.3.3

TestXMLs.zip

@tbeu
Copy link
Contributor

tbeu commented Apr 13, 2018

I debugged and reported the upstream issue bsapundzhiev/bsxml-json#25.

tbeu added a commit that referenced this issue Apr 13, 2018
Workaround for upstream issue bsapundzhiev/bsxml-json#25: Do not call XmlNode_getParent, which may return invalid pointer
@tbeu
Copy link
Contributor

tbeu commented Apr 13, 2018

Resolved by v2.3.4.

@tbeu tbeu closed this as completed Apr 13, 2018
@jamesegolding
Copy link
Author

That was quick, thank you! Works fine now
Thanks again
James

@jamesegolding
Copy link
Author

Sorry tbeu, it appears to me that in version 2.3.4, if the elements of an xml are not in alphabetical order, the get functions cannot find the values in the file.

You can see this in "test.xml" by moving the entire "set2" element in front of the "set1" element and running the example.
Do you see the same issue?

Thanks,
James

@tbeu
Copy link
Contributor

tbeu commented Apr 16, 2018

Hm, cannot reproduce. Still gives a={0.1, 0.3} even if dummyRoot/set2 appears first in the XML file.

@jamesegolding
Copy link
Author

Sorry, I meant in the standard "XMLTest" example released with ExternData, which retrieves "set1.gain.k" and "set2.gain.k" from "test.xml".

Let me know if you still don't see it, perhaps it's an issue on my end.

Many thanks,

James

I attach the test.xml and simulation error.
TestXMLs.zip

tbeu added a commit that referenced this issue Apr 16, 2018
Workaround for upstream issue bsapundzhiev/bsxml-json#25: Do not call XmlNode_getParent, which may return invalid pointer
@tbeu
Copy link
Contributor

tbeu commented Apr 16, 2018

Oops, I commited a debug change by mistake. It is all fixed (forced push) by 3e63f65 and re-released v2.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants