skbkontur / GroBuf

Fast binary serializer
MIT License
64 stars 10 forks source link

Seems like the object being serialized has been changed during serialization #12

Closed EmilWine closed 5 years ago

EmilWine commented 5 years ago

Hi, I'm using GroBuf Version=1.4.4.0 installed via nuget. Running the my app on Linux with Mono 5.16.0.179. I run Ubuntu 18.04 on a 128GB machine.

When I run serialization on an object of size ~1GB everything goes smoothly. However when serializing larger objects of the same type (e.g. 8GB) I get the following error: "System.InvalidOperationException: Seems like the object being serialized has been changed during serialization". Please advise how to proceed.

AndrewKostousov commented 5 years ago

I think, this is somehow related to 2GB maximum object size limit in .NET runtime. Internally Grobuf uses byte arrays to store serialized data.

However, I'm not sure whether Mono has such a restriction. Please provide more details on your case. Ideally, a code snippet including your data contracts that demonstrates the error and the corresponding exception stack trace.

As a workaround I would suggest to split your huge data structure into several manageable chunks of say 1GB size.

AndrewKostousov commented 5 years ago

Closing this issue. Feel free to reopen it if needed.