-
Notifications
You must be signed in to change notification settings - Fork 167
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
Realm .NET 10.0.0-beta.3 crashes on UWP/iOS release build #2169
Comments
When building for iOS, do you get the crash on device or simulator? Also, can you paste the MCG warning message? |
@nirinchev here is one of the warning messages from Release x64 UWP build. I get 46 of them in that simple sample project! Here is the file with all of them
As for iOS, I can't repro the issue right now, will get back after Christmas and put more details! Thank you @nirinchev for the support. |
Thanks for the update! I think I know what's causing the UWP issue - it's a .net native issue that I'll need to find a workaround for. It was present in 5.x too, but with 10.x is now affecting a much broader API surface. I hope to have an update after Christmas. As for the iOS issue - I don't have a good theory what could be causing it as it's a fundamentally different compiler and we do have much more extensive tests for it. If you do get a repro (or an error message), that would be super helpful! Happy holidays and I hope we'll be able to quickly resolve this so your team can start 2021 with new app versions 🤞 |
I believe I have a workaround for this - it's still not entirely clear to me if it's a bug in the .NET native compiler or something that is accidentally working when JIT-ed. In any case, I was able to create a minimal project that reproduced the UWP issue (without Realm) and the workaround appears to fix it. I plan to file an issue with the repro to see what the MS folks will say, but even if they fix the compiler issue, I don't expect that to be released and available for a few months at least. In the meantime though, I'd be happy to share a pre-release package with the workaround for you to test in your environment (can do it as soon as CI runs and no regressions are reported). To clarify though, as far as I can tell, this is only a problem with the UWP .NET Native compiler and should not affect the Xamarin AOT compiler for iOS. If you do have issues building for release on iOS, it must be a separate issue and I'd be happy to take a look at a repro project. |
So the change appears to work and I merged the PR. CI is currently building a package and you'll be able to find it here: https://github.com/realm/realm-dotnet/packages/399835 (should be 509 or newer). You can either go through the elaborate setup of Github packages or just download the .nupkg and reference it from a local folder. We'll push a -beta.4 to NuGet as soon as we resolve an SSL regression from -beta.3 (ETA a few days). |
@nirinchev thanks for really quick iteration! I tried the 509 release on UWP release. And indeed, the issue was resolved. I will wait a bit though until we use it in production :) |
Goals
We’ve decided to update to 10.* version in order to be able to use decimal support and the rest of the new features. We were ready to make the first release with the new SDK, and soon after we made our release build we discovered that the application crashes with the following exception when built in release mode:
Incompatible MarshalAs detected in parameter named 'value'. Please refer to MCG's warning message for more information.
This only happens in release mode though, both on iOS and UWP. This is a major blocker for as and we would have to revert the effort of 2 weeks of refactoring if we decide to revert the changes. Anything we could do to work around this issue?
Expected Results
Realm should work on UWP and iOS Release mode
Actual Results
Realm crashes with above mentioned exception
Steps to Reproduce
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: