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

Bug in CVArray - IXmlSerializable ReadXml #34

Open
subspacefield opened this issue Jun 24, 2017 · 0 comments
Open

Bug in CVArray - IXmlSerializable ReadXml #34

subspacefield opened this issue Jun 24, 2017 · 0 comments

Comments

@subspacefield
Copy link

I have a class similar to the following:

public class CalibrationInfo { public Matrix<double> intrinsicMatrix; public Matrix<double> _istortionCoeffs; }

When I tried to serialize the class using XmlSerializer no problems but when I deserialized the object, the data in the matrices after the first property were all zeros It seems that when you implement ReadXml() you have to move pass the current node/element.

I added code like the following to fix the issue:
do { reader.Read(); } while (reader.NodeType != XmlNodeType.Element && reader.NodeType != XmlNodeType.None);
I did not try other scenarios so not sure if this handles all cases.

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

No branches or pull requests

1 participant