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

Hash Collision Issue When Serializing a DataSet #15

Open
agatlin opened this issue Mar 10, 2019 · 1 comment
Open

Hash Collision Issue When Serializing a DataSet #15

agatlin opened this issue Mar 10, 2019 · 1 comment

Comments

@agatlin
Copy link

agatlin commented Mar 10, 2019

I am receiving the following error when I either try to directory serialize a DataSet or attempt to serialize an object which contains a DataSet.

Hash code collision: members 'MarshalByValueComponent.Site' and 'DataSet.Site' have the same hash code = 11520371743981427527

Here are relevant portions of the StackTrace.

   at GroBuf.GroBufHelpers.CalcHashesAndCheck(IEnumerable`1 dataMembers)
   at GroBuf.Writers.ClassWriterBuilder.WriteNotEmpty(WriterMethodBuilderContext context)
   at GroBuf.Writers.WriterBuilderBase.BuildWriter(WriterTypeBuilderContext writerTypeBuilderContext)
   at GroBuf.Writers.WriterTypeBuilderContext.GetWriter(Type type, Boolean isRoot, Boolean ignoreCustomSerialization)
   at GroBuf.Writers.WriterMethodBuilderContext.CallWriter(GroboIL il, Type type)
   at GroBuf.Writers.WriterMethodBuilderContext.CallWriter(Type type)
   at GroBuf.Writers.ClassWriterBuilder.WriteNotEmpty(WriterMethodBuilderContext context)
   at GroBuf.Writers.WriterBuilderBase.BuildWriter(WriterTypeBuilderContext writerTypeBuilderContext)
   at GroBuf.Writers.WriterTypeBuilderContext.GetWriter(Type type, Boolean isRoot, Boolean ignoreCustomSerialization)
   at GroBuf.Writers.WriterTypeBuilder.BuildWriter(Type type, Boolean ignoreCustomSerialization)
   at GroBuf.GroBufWriter.GetWriter(Type type, Boolean ignoreCustomSerialization)
   at GroBuf.GroBufWriter.BuildWriter[T](Boolean ignoreCustomSerialization)
   at GroBuf.GroBufWriter.GetWriterAndSizeCounter[T](Boolean ignoreCustomSerialization)
   at GroBuf.GroBufWriter.Write[T](Boolean ignoreCustomSerialization, T obj)
   at GroBuf.GroBufWriter.Write[T](T obj)
   at GroBuf.Serializer.Serialize[T](T obj)
   at xxxx.yyyy.zzz(List`1 aaaa) in <<some file>>.cs:line 74

_exceptionMethod = {UInt64[] CalcHashesAndCheck(System.Collections.Generic.IEnumerable1[GroBuf.DataMembersExtracters.IDataMember])}
`
I am not sure why a dataset would be causing problems. It probably makes no difference but these datasets were populated from .csv, .xls and .xlsx files. All of them are failing. The hash collision occurs on every attempt to serialize a DataSet.

@agatlin
Copy link
Author

agatlin commented Mar 10, 2019

When I loaded the source locally and ran the unit tests, I got a similar error on the "TestReproForIssue5 / Virtual Property".

I did not have the NET SDK version 2.2.100 installed which was referenced in the global.json so I tried 2.2.200 and 2.1.400 just to see if perhaps a bug had been introduced in .NET. I still got the same error.

image

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

No branches or pull requests

1 participant