dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

Nested Entry View In A Frame Causes Crash #15196

Closed DeepWorksStudios closed 2 months ago

DeepWorksStudios commented 1 year ago

Description

I am currently developing a messaging app and have discovered a strange bug. As soon as I started implementing a background service and a separate foreground service, I observed that my app would crash as soon as the service was running and the app was closed and then reopened. I thought it was the fault of my service and yes it is partially the fault but not the root. I thought because my service starts twice it causes the crash, after fixing the problem I found out that my service somehow keeps the main app activity alive which would be fine but it causes a crash when opened twice.

The reason was hard to diagnose, my loginPage had used an entry nested in a frame and it seems that on the second launch the code tries to disconnect some old handlers but the object has already been disposed.

I found this out by diagnosing the callstack and trying to reproduce it with a clean project with only the services and code of my loginPage. how to fix it i honestly don't know but i really despairt of such errors.

Steps to Reproduce

  1. Create Maui Project
  2. Create A Service wich is sticky and wont get terminated on app close and keeps the root activity alive
  3. Create on the main page the frame and the nested entry
  4. Start the app
  5. Wait untill Foreground service starts
  6. Close App (Really Closing via dismissing the frame)
  7. Open the app again

if the isssue still remains it leads to an crash

i added the log, callstack and a repoduction repo exception.txt callStack.txt debugLog.txt

Link to public reproduction project repository

Repoduction Project

Version with bug

7.0.86

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

API Level >= 26

Did you find any workaround?

Only to avoid nesting an Entry into a Frame. Border seems to work fine so i will use this instead .

Relevant log output

Start debugging Android application ...
Forwarding debugger port 8837
Detecting existing process
> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.reproductionprojectbug_servicecrash/crc6420ead308d2b4b1bb.MainActivity"
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.reproductionprojectbug_servicecrash/crc6420ead308d2b4b1bb.MainActivity }
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/ReproductionProjectBug_ServiceCrash.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Mono.Android.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Java.Interop.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.InteropServices.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Collections.dll [External]
Resolved pending breakpoint for 'Android.Runtime.JNIEnv.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:127 [0x00000].
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Threading.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Threading.Thread.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Diagnostics.StackTrace.dll [External]
Loaded assembly: data-0x7f124d64c0 [External]
Loaded assembly: data-0x7f124e9400 [External]
Loaded assembly: data-0x7f124fcc80 [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/netstandard.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Linq.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Collections.Concurrent.dll [External]
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:423 [0x00000].
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Text.Json.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Text.Encodings.Web.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.ComponentModel.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Maui.Controls.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.ObjectModel.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Maui.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Maui.Graphics.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Maui.Essentials.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.Logging.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.ComponentModel.TypeConverter.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Private.Uri.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.Loader.dll [External]
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:418 [0x00000].
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Memory.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Reflection.Emit.Lightweight.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Reflection.Emit.ILGeneration.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Reflection.Primitives.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Core.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.DependencyInjection.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Console.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Maui.Controls.Xaml.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.Configuration.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.Configuration.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.Logging.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.Logging.Debug.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.AppCompat.dll [External]
[Zygote] isWhitelistProcess - Process is Whitelisted
[Zygote] accessInfo : 1
[ug_servicecras] Late-enabling -Xcheck:jni
[ug_servicecras] Unknown bits set in runtime_flags: 0x8000
[debug-app-helper] Checking if libmonodroid was unpacked to /data/app/com.companyname.reproductionprojectbug_servicecrash-ooE8SiUOtbSygbhJosYy5Q==/lib/arm64/libmonodroid.so
[debug-app-helper] Native libs extracted to /data/app/com.companyname.reproductionprojectbug_servicecrash-ooE8SiUOtbSygbhJosYy5Q==/lib/arm64, assuming application/android:extractNativeLibs == true
[debug-app-helper] Setting up for DSO lookup in app data directories
[debug-app-helper] Added filesystem DSO lookup location: /data/app/com.companyname.reproductionprojectbug_servicecrash-ooE8SiUOtbSygbhJosYy5Q==/lib/arm64
[debug-app-helper] Using runtime path: /data/app/com.companyname.reproductionprojectbug_servicecrash-ooE8SiUOtbSygbhJosYy5Q==/lib/arm64
[debug-app-helper] checking directory: `/data/user/0/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/lib`
[debug-app-helper] directory does not exist: `/data/user/0/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/lib`
[debug-app-helper] Checking whether Mono runtime exists at: /data/user/0/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/libmonosgen-2.0.so
[debug-app-helper] Checking whether Mono runtime exists at: /data/app/com.companyname.reproductionprojectbug_servicecrash-ooE8SiUOtbSygbhJosYy5Q==/lib/arm64/libmonosgen-2.0.so
[debug-app-helper] Mono runtime found at: /data/app/com.companyname.reproductionprojectbug_servicecrash-ooE8SiUOtbSygbhJosYy5Q==/lib/arm64/libmonosgen-2.0.so
[ug_servicecras] Attempt to remove non-JNI local reference, dumping thread
[DOTNET] JNI_OnLoad: JNI_OnLoad in pal_jni.c
[DOTNET] GetOptionalClassGRef: optional class com/android/org/conscrypt/OpenSSLEngineImpl was not found
[monodroid] Creating public update directory: `/data/user/0/com.companyname.reproductionprojectbug_servicecrash/files/.__override__`
[ug_servicecras] Attempt to remove non-JNI local reference, dumping thread
[monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8837,server=y,embedding=1
[TcpOptimizer] TcpOptimizer-ON
[monodroid-assembly] open_from_bundles: failed to load assembly ReproductionProjectBug_ServiceCrash.dll
[monodroid-gc] GREF GC Threshold: 46080
[monodroid-assembly] open_from_bundles: failed to load assembly Mono.Android.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Java.Interop.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.InteropServices.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.Google.Android.Material.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly System.Threading.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Threading.Thread.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Diagnostics.StackTrace.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.SwipeRefreshLayout.dll [External]
[ug_servicecras] Attempt to remove non-JNI local reference, dumping thread
[monodroid-assembly] open_from_bundles: failed to load assembly netstandard.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Linq.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.Concurrent.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Json.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Encodings.Web.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ComponentModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ObjectModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Graphics.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Essentials.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Logging.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ComponentModel.TypeConverter.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.Uri.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Loader.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Memory.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Emit.Lightweight.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Emit.ILGeneration.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Primitives.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Core.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.DependencyInjection.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Console.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.Xaml.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Configuration.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Configuration.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Logging.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Logging.Debug.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.AppCompat.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Google.Android.Material.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.SwipeRefreshLayout.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Fragment.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Activity.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.ViewModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.Common.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.SavedState.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Fragment.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Activity.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Lifecycle.ViewModel.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Lifecycle.Common.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.SavedState.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.DrawerLayout.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CustomView.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Navigation.Runtime.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.DrawerLayout.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.CustomView.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Navigation.Runtime.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly System.Net.Primitives.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Net.Primitives.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Options.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.Options.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.DependencyInjection.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Extensions.DependencyInjection.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly System.Diagnostics.Tracing.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Diagnostics.Tracing.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly System.Xml.ReaderWriter.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.Xml.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Xml.ReaderWriter.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Private.Xml.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Encoding.Extensions.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Text.Encoding.Extensions.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly en-DE/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en-DE/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en/System.Private.CoreLib.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Numerics.Vectors.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Numerics.Vectors.dll [External]
[ug_servicecras] Explicit concurrent copying GC freed 4906(446KB) AllocSpace objects, 0(0B) LOS objects, 62% free, 1230KB/3278KB, paused 35us total 4.481ms
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.RegularExpressions.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Text.RegularExpressions.dll [External]
Thread started:  #2
Thread started:  #3
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Json.dll
Thread started:  #4
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.DataContractSerialization.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Xml.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Primitives.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.Serialization.Json.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Private.DataContractSerialization.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.Serialization.Xml.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.Serialization.Primitives.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly en-DE/System.Private.DataContractSerialization.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en-DE/System.Private.DataContractSerialization.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en/System.Private.DataContractSerialization.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly en/System.Private.DataContractSerialization.resources.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.RecyclerView.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CardView.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.RecyclerView.dll [External]
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.CardView.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Loader.dll
[libEGL] loaded /vendor/lib64/egl/libGLES_mali.so
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Loader.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.Compatibility.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Microsoft.Maui.Controls.Compatibility.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Window.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Window.dll [External]
[ug_servicecras] Accessing hidden field Landroid/content/res/Configuration;->windowConfiguration:Landroid/app/WindowConfiguration; (greylist, reflection, allowed)
[ug_servicecras] Accessing hidden method Landroid/app/WindowConfiguration;->getBounds()Landroid/graphics/Rect; (greylist, reflection, allowed)
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CoordinatorLayout.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.CoordinatorLayout.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.LiveData.Core.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll [External]
[PhoneWindow] forceLight changed to true [] from com.android.internal.policy.PhoneWindow.updateForceLightNavigationBar:4274 com.android.internal.policy.DecorView.updateColorViews:1547 com.android.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3252 android.view.Window.setFlags:1153 com.android.internal.policy.PhoneWindow.generateLayout:2474 
[MultiWindowDecorSupport] [INFO] isPopOver = false
[MultiWindowDecorSupport] updateCaptionType >> DecorView@9ac4151[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
[MultiWindowDecorSupport] setCaptionType = 0, DecorView = DecorView@9ac4151[]
[ug_servicecras] Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
[ug_servicecras] Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.ViewPager2.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.ViewPager2.dll [External]
[TabLayout] MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.Runtime.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Lifecycle.Runtime.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.ViewPager.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.ViewPager.dll [External]
[ug_servicecras] Explicit concurrent copying GC freed 1633(374KB) AllocSpace objects, 0(0B) LOS objects, 47% free, 2278KB/4326KB, paused 46us total 10.375ms
[ViewRootImpl@41ba728[MainActivity]] setView = com.android.internal.policy.DecorView@9ac4151 TM=true MM=false
[ViewRootImpl@41ba728[MainActivity]] stopped(true) old=false
[ViewRootImpl@41ba728[MainActivity]] stopped(false) old=true
[ViewRootImpl@41ba728[MainActivity]] stopped(false) old=false
Thread started: .NET Timer #5
[ViewRootImpl@41ba728[MainActivity]] Relayout returned: old=(0,0,1080,2220) new=(0,0,1080,2220) req=(1080,2220)0 dur=6 res=0x7 s={true 543896899584} ch=true
[mali_winsys] new_window_surface() [1080x2220] return: 0x3000
[monodroid-assembly] open_from_bundles: failed to load assembly System.Linq.Expressions.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Linq.Expressions.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Emoji2.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/Xamarin.AndroidX.Emoji2.dll [External]
[Gralloc3] mapper 3.x is not supported
[gralloc] Arm Module v1.0
[ViewRootImpl@41ba728[MainActivity]] MSG_RESIZED_REPORT: frame=(0,0,1080,2220) ci=(0,63,0,126) vi=(0,63,0,126) or=1
[ViewRootImpl@41ba728[MainActivity]] MSG_WINDOW_FOCUS_CHANGED 1 1
[InputMethodManager] prepareNavigationBarInfo() DecorView@9ac4151[MainActivity]
[InputMethodManager] getNavigationBarColor() -855310
[EmergencyMode] [EmergencyManager] android createPackageContext successful: com.companyname.reproductionprojectbug_servicecrash
[InputMethodManager] prepareNavigationBarInfo() DecorView@9ac4151[MainActivity]
[InputMethodManager] getNavigationBarColor() -855310
[InputMethodManager] Starting input: tba=com.companyname.reproductionprojectbug_servicecrash ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
[InputMethodManager] startInputInner - Id : 0
[InputMethodManager] startInputInner - mService.startInputOrWindowGainedFocus
[InputMethodManager] prepareNavigationBarInfo() DecorView@9ac4151[MainActivity]
[InputMethodManager] getNavigationBarColor() -855310
[InputMethodManager] Starting input: tba=com.companyname.reproductionprojectbug_servicecrash ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
[InputMethodManager] startInputInner - Id : 0
[monodroid-assembly] Shared library 'liblog' not loaded, p/invoke '__android_log_print' may fail
[DOTNET] Foreground task is running...
Thread started: <Thread Pool> #6
Thread started: .NET ThreadPool Gate #7
Thread started: <Thread Pool> #8
[DOTNET] Foreground task is running...
[ViewRootImpl@41ba728[MainActivity]] MSG_WINDOW_FOCUS_CHANGED 0 1
[InputMethodManager] prepareNavigationBarInfo() DecorView@9ac4151[MainActivity]
[InputMethodManager] getNavigationBarColor() -855310
[InputTransport] Input channel destroyed: 'ClientS', fd=83
[mali_egl] eglDestroySurface() in
[mali_winsys] delete_surface() [1080x2220] return
[mali_egl] eglDestroySurface() out
[libEGL] EGLNativeWindowType 0x7ea8a2b490 disconnect failed
[ViewRootImpl@41ba728[MainActivity]] Relayout returned: old=(0,0,1080,2220) new=(0,0,1080,2220) req=(1080,2220)8 dur=6 res=0x5 s={false 0} ch=true
[ViewRootImpl@41ba728[MainActivity]] stopped(true) old=false
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Intrinsics.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Runtime.Intrinsics.dll [External]
Thread started: <Thread Pool> #9
[DOTNET] Foreground task is running...
[ViewRootImpl@41ba728[MainActivity]] dispatchDetachedFromWindow
[InputTransport] Input channel destroyed: 'b13b319', fd=67
[monodroid-assembly] open_from_bundles: failed to load assembly System.Xml.XmlSerializer.dll
Loaded assembly: /data/data/com.companyname.reproductionprojectbug_servicecrash/files/.__override__/System.Xml.XmlSerializer.dll [External]
[DOTNET] Foreground task is running...
Thread started: <Thread Pool> #10
Thread started: <Thread Pool> #11
Thread started: <Thread Pool> #12
Thread started: <Thread Pool> #13
[PhoneWindow] forceLight changed to true [] from com.android.internal.policy.PhoneWindow.updateForceLightNavigationBar:4274 com.android.internal.policy.DecorView.updateColorViews:1547 com.android.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3252 android.view.Window.setFlags:1153 com.android.internal.policy.PhoneWindow.generateLayout:2474 
[MultiWindowDecorSupport] [INFO] isPopOver = false
[MultiWindowDecorSupport] updateCaptionType >> DecorView@d0254a5[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
[MultiWindowDecorSupport] setCaptionType = 0, DecorView = DecorView@d0254a5[]
[TabLayout] MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
[ViewRootImpl@b5f1254[MainActivity]] setView = com.android.internal.policy.DecorView@d0254a5 TM=true MM=false
[ViewRootImpl@b5f1254[MainActivity]] Relayout returned: old=(0,0,1080,2220) new=(0,0,1080,2220) req=(1080,2220)0 dur=5 res=0x7 s={true 543329361920} ch=true
[mali_winsys] new_window_surface() [1080x2220] return: 0x3000
**System.ObjectDisposedException:** 'Cannot access a disposed object.
Object name: 'Microsoft.Maui.Platform.MauiAppCompatEditText'.'
ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ashok-kuvaraja commented 1 year ago

Hi @DeepWorksStudios,

Did you find any workaround for this issue?

DeepWorksStudios commented 1 year ago

Hi @DeepWorksStudios,

Did you find any workaround for this issue?

Yes i did via completely trying to avoid the control element 'frame' i used only border since the frame element suffers alot of issues somehow idk why but i had alot of issues with it in the past.

So i repeat just try to avoid it and use border instead.

Hope it will help you to succed your goal. Cheers

ashok-kuvaraja commented 1 year ago

Hi @DeepWorksStudios, Did you find any workaround for this issue?

Yes i did via completely trying to avoid the control element 'frame' i used only border since the frame element suffers alot of issues somehow idk why but i had alot of issues with it in the past.

So i repeat just try to avoid it and use border instead.

Hope it will help you to succed your goal. Cheers

Thanks for your response, @DeepWorksStudios.

I am facing the same issue with the Label control. In my case, I can't avoid using the label control. If you know the root cause of the issue, kindly let me know. It would be very helpful to investigate the issue further.

DeepWorksStudios commented 1 year ago

Hi @DeepWorksStudios, Did you find any workaround for this issue?

Yes i did via completely trying to avoid the control element 'frame' i used only border since the frame element suffers alot of issues somehow idk why but i had alot of issues with it in the past.

So i repeat just try to avoid it and use border instead.

Hope it will help you to succed your goal. Cheers

Thanks for your response, @DeepWorksStudios.

I am facing the same issue with the Label control. In my case, I can't avoid using the label control. If you know the root cause of the issue, kindly let me know. It would be very helpful to investigate the issue further.

Just simply remove the frame and replace it with a border

ghost commented 10 months ago

Hi @DeepWorksStudios. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Zhanglirong-Winnie commented 10 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 3. Not repro on android platforms with sample project. DeepWorksStudios/ReproductionProjectBug15196_ServiceCrash (github.com)

DeepWorksStudios commented 10 months ago

The issue still presist

DeepWorksStudios commented 10 months ago

I updated the repo accordingly

DeepWorksStudios commented 6 months ago

any updates?

DeepWorksStudios commented 2 months ago

any updates? it been a while