Closed kjnilsson closed 11 years ago
Hey,
I've never really tested this, so the issue has either been inadvertently fixed or it may have something to do with the nuget build. In a more general note, you should keep in mind that the library does not support interconnectivity between heterogeneous runtimes, so mono/.net or even differing clr versions cannot communicate. That said, I'll see if I can obtain a 32 bit machine to test this out.
here is a test solution that repros the issue: https://dl.dropboxusercontent.com/u/5434569/FsCoreBug.zip The FsCoreBug console app will write a file as a 32bit process (prefer 32 bit set in project preferences). FsCoreBug64 will try to read it.
you can run this on a 64 bit machine. I have also included the actual data files created by a 32 (fscorebug32.dat) and 64 bit (fscorebug.dat) process respectively.
And thank you, btw. :)
The bug still exists in the current version of the serializer, but it only occurs with release builds of the library.
Right ok - yes I only tested in Debug - how odd. It's quite easy to see which bytes are different but I am not sure what writes them (and why it doesn't write them in Debug mode)
Fixed. Problem had to do with the fact that certain type hashes are written at every object header. These hashes were being generated using the .GetHashCode() method on assembly qualified names. As it turns out, different versions of the clr generate different hashcodes for strings.
I will update the nuget package asap.
Awsome work. Tested it with my application and it works fine. Many thanks.
I repeatedly warned one of our programmers not to use GetHashCode() for persisted hashes (even the MS documentation indicated against this). Of course he did not listen, and I believe the breaking change was from .NET 2.0 to 3.0 (or possibly 3.5).
Hi - I have tested this fairly thoroughly (v 0.5.1) and it appears to be consistently failing in the above scenario. I tested it against a build of the current master and the issue appears to be gone. Would you mind releasing a new nuget package?