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

[Bug]: App crashes on UWP ARM64 #2704

Closed
tipa opened this issue Nov 2, 2021 · 4 comments · Fixed by #2819
Closed

[Bug]: App crashes on UWP ARM64 #2704

tipa opened this issue Nov 2, 2021 · 4 comments · Fixed by #2819
Assignees

Comments

@tipa
Copy link

tipa commented Nov 2, 2021

What happened?

I received mails & crash reports indicating that my UWP app crashes on ARM64 devices (such as the Microsoft Surface X Pro or the Samsung Galaxy Book Go/S).

My app used to run on ARM64 devices but I made 2 changes with the last app version, one of them is likely related to the crash:

  • I updated from Realm 10.5.0 to 10.6.0
  • I added the ARM64 compile target to my UWP app

It surely would be great to have the latest Realm version to be able to run in a ARM64-compiled UWP app

I've seen here that you don't have any tests for ARM64: https://github.com/realm/realm-dotnet/actions/runs/1356450422
Is ARM64 on UWP simply not supported?

Repro steps

  1. Open app
  2. Crash

Version

10.6.0

What SDK flavour are you using?

Local Database only

What type of application is this?

UWP

Client OS and version

Windows 10 + 11 (various OS builds)

Stacktrace of the exception/crash you're getting

Unfortunately, the Stack Trace reported from the MS Partner Center doesn't contain many information:

0 SharedLibrary.dll System::Runtime::CompilerServices::ClassConstructorRunner.EnsureClassConstructorRun$catch$0 0x0000000000000078
1 SharedLibrary.dll System::Runtime::CompilerServices::ClassConstructorRunner.CheckStaticClassConstruction 0x0000000000000014
2 Realm.dll Realms::SharedRealmHandle.Open 0x0000000000000038
3 Realm.dll Realms::RealmConfiguration.CreateRealm 0x0000000000000174
4 MyApp.exe MyApp::App.Initialize 0x0000000000000058
@nirinchev
Copy link
Member

UWP on ARM should be supported, but you're right - we don't have tests for it because it's difficult to get a Windows CI node that runs ARM. We'll need to investigate, but we'll need to procure an ARM machine, so it might take a while. For now your best approach would probably be to roll back to only compiling for x86/x64 and rely on Windows' x64 emulation for those ARM devices.

@tipa
Copy link
Author

tipa commented Nov 2, 2021

Just to be clear, "ARM" is 32-bit-ARM (and Realm works for that architecture). However now I started compiling my app for 64-bit-ARM ("ARM64").

I'll see if I can gather more details.
Unfortunately I don't have an ARM64 device either to test this myself.

@nirinchev
Copy link
Member

Ah, I see. We're not currently building our native library for ARM64 as Windows would automatically emulate 32-bit ARM, but I can see why that wouldn't work if your app is explicitly compiled for ARM64. I'll need to ping some of our CPU architecture gurus to see if we can just add ARM64 as a target.

@fealebenpae
Copy link
Member

Folks, we have a preview build of Realm that adds support for ARM64 on Windows and UWP. It'll take a bit longer to merge all the upstream changes necessary to support ARM64 before we can make a release, and we're also looking into adding ARM64 Windows machines to our CI, but in the mean time we have a prerelease build you can use to test. To get it, look for version 10.9.0-pr-2819.1947 on our nightly NuGet feed. Unity users might need to manually extract the correct realm-wrappers.dll from the nupkg and explicitly add it to their projects.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants