When I call .Freeze() on an instance of this object and then try and access the properties I get a System.InvalidCastException. Here is a screenshot of the object instance in debugger
It looks like freezing the object seems to mess up the mapping so the properties on the realm file map to the incorrect corresponding object property in the Realm.
Is this a known bug? If so, is there a workaround so this doesn’t happen?
If you can create a self-sufficient console application that demonstrates the issue, that would be best. If that is impossible and you would be open to sharing your complete project, we could give you an upload link to securely share it. Finally, if neither of those are options, if you could share your complete schema as well as the code you use to open a Realm, we could try and repro from that.
You can attach the .zip to the github issue I created or just upload it to some 3rd party hosting service, such as google drive and share the link here. This is assuming the project doesn’t contain any credentials or secrets. If it does, then I’ll need your email address to email you a secure upload link.