Reputation: 93
I have an custom object I'm trying to serialize using Protobuf-net and the following exception is thrown:
InvalidOperationException was unhandled: Cannot write a Variant header until the String data has been written
The thing I'm finding interesting is that at no point in my object graph is there a string that is being serialized. Has anyone ever seen an error like this before and is there a known cause/fix? Thank you
Upvotes: 3
Views: 731
Reputation: 3299
This looks a lot like the bug here:
https://code.google.com/p/protobuf-net/issues/detail?id=218.
Are you serializing a zero length byte[] at some point in your object?
Upvotes: 1