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
_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)
ANR triggered by slow operations in main thread
Description
An Application Not Responding (ANR) error on Android signifies that the application's main thread has been unresponsive for too long . The fact that the stack trace points to mono_gc_collect within libmonosgen-2.0.so strongly suggests the ANR is caused by a long-running garbage collection (GC) cycle within a Mono runtime environment.
Steps to Reproduce
Run a Xamarin Android application .
Run AppStartActivity(Sqlite is initialized in the actitvity)
protected override void OnResume()
{
base.OnResume();
var mvxApplication = Mvx.IoCProvider.Resolve<IMvxApplication>() as core.App;
Task.Factory.StartNew(async () =>
{
await dbContext.Database.MigrateAsync().ConfigureAwait(false);
RunOnUiThread(async () =>
{
await RunAppStartAsync(_bundle);//go to mainview
});
}, TaskCreationOptions.LongRunning);
}
qifu1177
changed the title
App ANR when collecting GC (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...) ANR triggered by slow operations in main thread)
App ANR when collecting GC
Feb 14, 2025
qifu1177
changed the title
App ANR when collecting GC
Application Not Responding (ANR) when collecting GC
Feb 14, 2025
Android framework version
net8.0-android
Affected platform version
Expected Behavior:
_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)
ANR triggered by slow operations in main thread
Description
An Application Not Responding (ANR) error on Android signifies that the application's main thread has been unresponsive for too long . The fact that the stack trace points to mono_gc_collect within libmonosgen-2.0.so strongly suggests the ANR is caused by a long-running garbage collection (GC) cycle within a Mono runtime environment.
Steps to Reproduce
Relevant log output
The text was updated successfully, but these errors were encountered: