Overflow when serializing a large dictionary · Issue #118 · MessagePack-CSharp/MessagePack-CSharp · GitHub
Skip to content

Overflow when serializing a large dictionary #118

Description

@theolivenbaum

I'm getting an overflow exception when trying to serialize a Dictionary<ulong,byte[]> with about 2M entries of byte[100] :

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.OverflowException: Arithmetic operation resulted in an overflow.
at MessagePack.Formatters.ByteArrayFormatter.Serialize(Byte[]& bytes, Int32 offset, Byte[] value, IFormatterResolver formatterResolver)
at MessagePack.Formatters.DictionaryFormatterBase`5.Serialize(Byte[]& bytes, Int32 offset, TDictionary value, IFormatterResolver formatterResolver)

Is there any hard limits on total size for the serialization?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions