-
Notifications
You must be signed in to change notification settings - Fork 325
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
Data corruption in ArraySegment using unsafe deserializer #114
Comments
The bug is on line 45 of BTW, there is a cleaner, simpler and more performant way to use |
Another comment, which is unrelated to your question, but something I've noticed in your schema definitions. You have declared many |
Hi sapek, thanks for the quick reply. I have checked the code but I'm using the ToArray() extension on the ArraySegment struct which takes in offset and count. It would also not quite explain why the unsafe deserializer code works in 99% of the cases and the safe deserializer is 100% correct on the same data piece. In the attached demo project, only one of the 318 items in the TrackingReport_Container.TrackingReports is corrupt using the unsafe deserializer, while with the safe deserializer they are all correct. That's strange right? I've tested the ToArray() function and it works as expected as far as I can see...
|
You are right. I only glanced at your code and misread it as This is bug in |
Can confirm this is fixed. Thanks! |
I have a strange issue with the unsafe deserializer. I'm using Bond in a project to serialize about 2000 million objects to disc.
While running an integrity check on the data files, I have noticed that very occasionally Guid properties become corrupt (using ArraySegment). When I deserialize that peculiar byte array with a safe deserializer, the data is correct. So luckely it is not a problem in the serializer.
I have created a small test project to demo this, included a piece of problematic data as a resource byte array. Would be great if you could take a look at it.
https://drive.google.com/file/d/0B9HTQM8Ned3eMGVpYnlsVm12WDA/view?usp=sharing
The text was updated successfully, but these errors were encountered: