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

java.lang.UnsatisfiedLinkError: No implementation found for void crc64953c68cad4e91ae3.GlmApp.n_OnAppForegrounded() - is the library loaded, e.g. System.loadLibrary? #9209

Open
gmck opened this issue Aug 16, 2024 · 3 comments
Assignees
Labels
Area: App Runtime Issues in `libmonodroid.so`.

Comments

@gmck
Copy link

gmck commented Aug 16, 2024

Android framework version

net9.0-android

Affected platform version

VS 2022 17.12.0 Prev 1.0

Description

My first try at building and deploying to Android 15. It runs ok in Debug but immediately crashes with the release build.

Apk comparisons net8 32,767kb, net9 36,412kb.

Build_Crash.zip

Steps to Reproduce

N/A

Did you find any workaround?

No

Relevant log output

No response

@gmck gmck added Area: App Runtime Issues in `libmonodroid.so`. needs-triage Issues that need to be assigned. labels Aug 16, 2024
@jonpryor
Copy link
Member

Please provide a repro project. I don't know what method OnAppForegrounded() is.

Also odd is the stack trace of the runtime crash:

      at crc64953c68cad4e91ae3.GlmApp.OnAppForegrounded(GlmApp.java:43)
      at java.lang.reflect.Method.invoke(Method.java:-2)
      at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:222)

Why is GLmApp.OnAppForegrounded(), with a Capital O, being invoked from Java? Typically, I would expect Java to be calling an onAppForegrounded() method (lowercase 'o').

My "spider-sense" is that this may be related to marshal methods. Please also try setting $(AndroidEnableMarshalMethods)=False and see if that changes anything.

@jonpryor jonpryor added the need-info Issues that need more information from the author. label Aug 27, 2024
@gmck
Copy link
Author

gmck commented Aug 29, 2024

@jonpryor
Your "spider-sense" is working well. Adding <AndroidEnableMarshalMethods>false</AndroidEnableMarshalMethods> fixed it.

It was when it crashed at start-up.

<AndroidEnableMarshalMethods>true</AndroidEnableMarshalMethods>  
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>

I've now hit another crash when I try to open either of my dashboard fragments. The only difference from all the other fragments is that they are immersive fragments.

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x234 in tid 26164 (ware.obdnowpros), pid 26164 (ware.obdnowpros)

That crash never makes its way to App Center, so I've got no idea why it crashes there. I got the above from Android Studio's logcat.

Rather than play around with the code in this project, swapping from net8 to net9 and back again. I think I'll create a new net9.0-android35 test app with similar code. Deprecating SetStatusBarColor() in Android 15 seems like a very poor decision. They obviously want every app to look like their boring apps.

@dotnet-policy-service dotnet-policy-service bot added need-attention A xamarin-android contributor needs to review and removed need-info Issues that need more information from the author. labels Aug 29, 2024
@jonpryor
Copy link
Member

Mentioning this issue on #8253.

@jpobst jpobst removed needs-triage Issues that need to be assigned. need-attention A xamarin-android contributor needs to review labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App Runtime Issues in `libmonodroid.so`.
Projects
None yet
Development

No branches or pull requests

4 participants