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
"CallStaticIntMethodV received NULL jclass" in _monodroid_get_identity_hash_code() when using DX and multidex #4570
Comments
@grendello, does this look familiar by any luck? |
@bolk, to check on a few details:
|
@brendanzagaeski nope, not familiar at all :( However, your analysis in Initial Notes seems to be correct. There are two possible reasons for java_System = utils.get_class_from_runtime_field(env, runtimeClass, "java_lang_System", true); There are several reasons why it would fail that come to mind. The code above tries to access this static field in our Java
I can't offer much more than that, perhaps except for a diff to instrument the native code to track what happens around the code you indicated in Initial notes (I'll follow up with the diff in a separate comment) |
This PR adds some log messages which may help in tracing the cause of issue xamarin#4570.
@brendanzagaeski #4573 instead of the diff, perhaps we can fish out binaries from the PR build and use them to help track the issue. |
@bolk, are you still seeing this behavior? If so, let us know, and I can send over the adjusted versions of Xamarin.Android that grendello prepared that will hopefully provide some extra logging information around the error. Otherwise, I'll plan to close this item in 14 days. Thanks! |
Hi @brendanzagaeski sorry for my high latency, but I've been on other projects lately... |
No worries. Whenever you get a chance will be perfect. Thanks for the reply! |
Hello @brendanzagaeski, with the new release things seemes to have been fixed. Thank you |
Perfect. Glad it's behaving as expected now. Thanks for checking! |
This is a new report to discuss the behavior from #4486 (comment).
Steps to reproduce
Not yet known precisely. The original scenario from #4486 involved building with:
$(AndroidLinkMode)
=SdkOnly
$(AndroidSupportedAbis)
=armeabi-v7a;arm64-v8a;x86_64;x86
$(AotAssemblies)
=False
$(AndroidAotMode)
=None
$(AndroidEnableProguard)
not setThe specific emulator image might also be relevant. I haven't yet seen the issue myself locally on an x86 emulator, but there might be some specifics of the emulator image or app configuration I'm missing.
Actual behavior
Extracted error from the logcat output in #4486 (comment):
Initial notes
It seems
get_class_from_runtime_field()
might be returningnullptr
when it tries to look up thejava.lang.System
type to pass tomonodroidRuntime.get_java_class_System ()
?xamarin-android/src/monodroid/jni/external-api.cc
Lines 121 to 123 in 988c811
xamarin-android/src/monodroid/jni/monodroid-glue-internal.hh
Lines 84 to 87 in 988c811
xamarin-android/src/monodroid/jni/monodroid-glue.cc
Line 846 in 988c811
xamarin-android/src/monodroid/jni/util.cc
Lines 300 to 313 in 988c811
The text was updated successfully, but these errors were encountered: