You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to produce logs for dotnet/runtime#106970, I found that a lot of errors regarding a missing type map were logged.
It seems to completely slow down the debugging.
This might be similar to #4727 and I saw in #4720 the errors were marked as info level logs (which is why enabling all logs starts showing them).
The reason I'm logging this issue is because I'm wondering whether the root cause of the errors should be solved?
(Also, because the crash in dotnet/runtime#106970 is Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) - I'm wondering whether that mapping issue could be related?
05-20 12:02:30.275 27754 27754 W monodroid-assembly: typemap: called from
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNIEnv.TypemapManagedToJava(Type type) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:line 527
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNIEnv.GetJniName(Type type) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:line 541
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNIEnv.FindClass(Type type) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:line 308
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNIEnv.AssertCompatibleArrayTypes(IntPtr sourceArray, Type destType) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:line 617
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNIEnv._GetArray(IntPtr array_ptr, Type element_type) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:line 1089
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNIEnv.GetArray(IntPtr array_ptr, JniHandleOwnership transfer, Type element_type) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:line 982
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Java.IO.OutputStream.n_Write_arrayBII(IntPtr jnienv, IntPtr native__this, IntPtr native_b, Int32 off, Int32 len) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Java.IO.OutputStream.cs:line 145
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLII_V(_JniMarshal_PPLII_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0, Int32 p1, Int32 p2) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 297
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Java.Interop.JniNativeMethods.wrapper_native_indirect_byte_intptr_intptr_intptr_intptr(IntPtr& , IntPtr , IntPtr , IntPtr , IntPtr )
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Java.Interop.JniEnvironment.InstanceMethods.CallBooleanMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/obj/Release/net7.0/JniEnvironment.g.cs:line 20030
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeAbstractBooleanMethod(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:line 136
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Android.Graphics.Bitmap.Compress(CompressFormat format, Int32 quality, Stream stream) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Graphics.Bitmap.cs:line 669
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Microsoft.Maui.Media.ScreenshotResult.PlatformCopyToAsync(Stream destination, ScreenshotFormat format, Int32 quality) in D:\a\_work\1\s\src\Essentials\src\Screenshot\Screenshot.android.cs:line 137
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Microsoft.Maui.Media.ScreenshotResult.CopyToAsync(Stream destination, ScreenshotFormat format, Int32 quality) in D:\a\_work\1\s\src\Essentials\src\Screenshot\Screenshot.shared.cs:line 294
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at Microsoft.Maui.VisualDiagnostics.ScreenshotResultToArray(IScreenshotResult result, ScreenshotFormat format, Int32 quality) in D:\a\_work\1\s\src\Core\src\VisualDiagnostics\VisualDiagnostics.cs:line 108
05-20 12:02:30.283 27754 27754 W monodroid-assembly: at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<ScreenshotResultToArray>d__14](<ScreenshotResultToArray>d__14& stateMachine)
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.Maui.VisualDiagnostics.ScreenshotResultToArray(IScreenshotResult result, ScreenshotFormat format, Int32 quality)
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.Maui.VisualDiagnostics.CaptureAsJpegAsync(IWindow window, Int32 quality) in D:\a\_work\1\s\src\Core\src\VisualDiagnostics\VisualDiagnostics.cs:line 99
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<CaptureAsJpegAsync>d__13](<CaptureAsJpegAsync>d__13& stateMachine)
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.Maui.VisualDiagnostics.CaptureAsJpegAsync(IWindow window, Int32 quality)
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext.CaptureFrameAsync()
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<CaptureFrameAsync>d__25](<CaptureFrameAsync>d__25& stateMachine)
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext.CaptureFrameAsync()
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext.CaptureAndSendFrame()
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[<CaptureAndSendFrame>d__24](<CaptureAndSendFrame>d__24& stateMachine)
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.VisualStudio.DesignTools.MauiTap.WindowContext.CaptureAndSendFrame()
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.VisualStudio.DesignTools.MobileTap.DispatcherExtensions.<>c__DisplayClass3_0.<InvokeAsync>b__0()
05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.VisualStudio.DesignTools.MobileTap.DispatcherExtensions.<>c__DisplayClass4_0`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<InvokeAsync>b__1()05-20 12:02:30.284 27754 27754 W monodroid-assembly: at Microsoft.Maui.Dispatching.Dispatcher.<>c__DisplayClass4_0.<DispatchImplementation>b__0() in D:\a\_work\1\s\src\Core\src\Dispatching\Dispatcher.Android.cs:line 2405-20 12:02:30.284 27754 27754 W monodroid-assembly: at Java.Lang.Thread.RunnableImplementor.Run() in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 3605-20 12:02:30.284 27754 27754 W monodroid-assembly: at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Java.Lang.IRunnable.cs:line 8405-20 12:02:30.284 27754 27754 W monodroid-assembly: at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 2205-20 12:02:30.286 27754 27754 I monodroid-assembly: typemap: unable to find mapping to a Java type from managed type'System.Byte, System.Private.CoreLib'05-20 12:02:30.286 27754 27754 I monodroid-timing: [1/6] Typemap.managed_to_java: end, total time; elapsed: 0:0::19277005-20 12:02:30.287 27754 27754 W monodroid: typemap: failed to map managed type to Java type: System.Byte, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e (Module ID: 835733d7-9ad6-458d-935c-3274e66adcb8; Type token: 33554594)
The text was updated successfully, but these errors were encountered:
hansmbakker
changed the title
Lots of typemap errors, e.g. triggered by XAML Live Preview
Lots of typemap errors triggered by XAML Live Preview
May 20, 2024
@hansmbakker this is not an error, as not all types are type-mapped. In this case it's System.Byte, which is not derived from Java.Lang.Object, so it won't be type-mapped. Yes, the "noise" is unfortunate but it's show only when the debug.mono.log system property has the assembly category, which is normally not the case. We need this logging to help use see what's going on in cases when we have Java<->Managed interop issues.
Android application type
.NET Android (net7.0-android, net8.0-android, etc.)
Affected platform version
VS 2022 17.10 Preview 7
Description
While trying to produce logs for dotnet/runtime#106970, I found that a lot of errors regarding a missing type map were logged.
It seems to completely slow down the debugging.
This might be similar to #4727 and I saw in #4720 the errors were marked as
info
level logs (which is why enabling all logs starts showing them).The reason I'm logging this issue is because I'm wondering whether the root cause of the errors should be solved?
(Also, because the crash in dotnet/runtime#106970 is
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
- I'm wondering whether that mapping issue could be related?Steps to Reproduce
Did you find any workaround?
Close the
XAML Live Preview
paneRelevant log output
The text was updated successfully, but these errors were encountered: