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.2k stars 1.75k forks source link

[libc] Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR) on Latest MAUI #8195

Closed devonuto closed 2 years ago

devonuto commented 2 years ago

Description

After updating VS 2022 to Version 17.3.0 Preview 2.0, my MAUI app will no longer load.

Something is happening, but can't pinpoint where. I'm using an Android Emulator, and was getting similar errors to https://github.com/dotnet/maui/issues/7002 but after adding <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> to my .csproj those errors went away, but the final Fatal Signal error remains.

I have no idea what this means, if anyone can point me in the right direction, that would be super-helpful, thanks.

Steps to Reproduce

Unsure.

Version with bug

6.0.400 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

net6.0-android 32

Did you find any workaround?

No response

Relevant log output

> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.devonuto.myapp/crc6444e428aac7225743.MainActivity"
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.devonuto.myapp/crc6444e428aac7225743.MainActivity }
Loaded assembly: myapp.dll
Loaded assembly: Mono.Android.dll [External]
Loaded assembly: System.Runtime.dll [External]
Loaded assembly: Java.Interop.dll [External]
Loaded assembly: System.Collections.dll [External]
Loaded assembly: System.Threading.dll [External]
Loaded assembly: System.Runtime.InteropServices.dll [External]
Loaded assembly: System.Threading.Thread.dll [External]
Loaded assembly: System.Diagnostics.StackTrace.dll [External]
Loaded assembly: Microsoft.Maui.dll [External]
Loaded assembly: System.Memory.dll [External]
Loaded assembly: System.ComponentModel.dll [External]
Loaded assembly: System.Reflection.Emit.Lightweight.dll [External]
Loaded assembly: System.Reflection.Emit.ILGeneration.dll [External]
Loaded assembly: System.Reflection.Primitives.dll [External]
Loaded assembly: System.Runtime.CompilerServices.Unsafe.dll [External]
Loaded assembly: Microsoft.Maui.Essentials.dll [External]
Loaded assembly: Xamarin.AndroidX.Core.dll [External]
Loaded assembly: Microsoft.Extensions.DependencyInjection.Abstractions.dll [External]
Loaded assembly: Microsoft.Maui.Controls.dll [External]
Loaded assembly: System.ObjectModel.dll [External]
Loaded assembly: Microsoft.Maui.Controls.Xaml.dll [External]
Loaded assembly: Microsoft.Extensions.Configuration.dll [External]
Loaded assembly: netstandard.dll [External]
Loaded assembly: Microsoft.Extensions.Configuration.Abstractions.dll [External]
Loaded assembly: Microsoft.Extensions.Logging.dll [External]
Loaded assembly: CommunityToolkit.Mvvm.dll [External]
Loaded assembly: Microsoft.Maui.Graphics.dll [External]
Loaded assembly: Microsoft.Extensions.Logging.Abstractions.dll [External]
Loaded assembly: Xamarin.AndroidX.AppCompat.dll [External]
Loaded assembly: Xamarin.Google.Android.Material.dll [External]
Loaded assembly: Xamarin.AndroidX.SwipeRefreshLayout.dll [External]
Loaded assembly: System.ComponentModel.TypeConverter.dll [External]
Loaded assembly: System.Private.Uri.dll [External]
Loaded assembly: System.Collections.Concurrent.dll [External]
Loaded assembly: System.Linq.dll [External]
Loaded assembly: Xamarin.AndroidX.Fragment.dll [External]
Loaded assembly: Xamarin.AndroidX.Activity.dll [External]
Loaded assembly: Xamarin.AndroidX.Lifecycle.ViewModel.dll [External]
Loaded assembly: Xamarin.AndroidX.Lifecycle.Common.dll [External]
Loaded assembly: Xamarin.AndroidX.SavedState.dll [External]
Loaded assembly: Xamarin.AndroidX.DrawerLayout.dll [External]
Loaded assembly: Xamarin.AndroidX.CustomView.dll [External]
Loaded assembly: Xamarin.AndroidX.Navigation.Runtime.dll [External]
Loaded assembly: System.Net.Primitives.dll [External]
Loaded assembly: System.Net.Http.dll [External]
Loaded assembly: Microsoft.Extensions.DependencyInjection.dll [External]
Loaded assembly: System.Diagnostics.Tracing.dll [External]
Loaded assembly: CommunityToolkit.Maui.Markup.dll [External]
Loaded assembly: System.Security.Cryptography.X509Certificates.dll [External]
Loaded assembly: System.Diagnostics.DiagnosticSource.dll [External]
Loaded assembly: System.Collections.NonGeneric.dll [External]
Loaded assembly: System.Net.Requests.dll [External]
Loaded assembly: System.Net.Security.dll [External]
[uto.myapp] Late-enabling -Xcheck:jni
[uto.myapp] Unexpected CPU variant for X86 using defaults: x86_64
[CompatibilityChangeReporter] Compat change id reported: 171979766; UID 10154; state: ENABLED
[GraphicsEnvironment] ANGLE Developer option for 'com.devonuto.myapp' set to: 'default'
[GraphicsEnvironment] ANGLE GameManagerService for com.devonuto.myapp: false
[GraphicsEnvironment] Neither updatable production driver nor prerelease driver is supported.
[NetworkSecurityConfig] No Network Security Config specified, using platform default
[NetworkSecurityConfig] No Network Security Config specified, using platform default
[DOTNET] JNI_OnLoad: JNI_OnLoad in pal_jni.c
[monodroid] Creating public update directory: `/data/user/0/com.devonuto.myapp/files/.__override__`
[uto.myapp] 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=10.0.2.2:52981,embedding=1
[monodroid-gc] GREF GC Threshold: 46080
[uto.myapp] Symbol file data-0x7b3a402a3040 doesn't match image Mono.Android.dll
[uto.myapp] Attempt to remove non-JNI local reference, dumping thread
[uto.myapp] Symbol file data-0x7b3ae02374b0 doesn't match image Microsoft.Maui.Controls.dll
Loaded assembly: Xamarin.AndroidX.RecyclerView.dll [External]
Loaded assembly: Xamarin.AndroidX.CardView.dll [External]
[libEGL] loaded /vendor/lib64/egl/libEGL_emulation.so
[libEGL] loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
[libEGL] loaded /vendor/lib64/egl/libGLESv2_emulation.so
Loaded assembly: Xamarin.AndroidX.Loader.dll [External]
Loaded assembly: CommunityToolkit.Maui.Core.dll [External]
Loaded assembly: CommunityToolkit.Maui.dll [External]
Loaded assembly: Microsoft.Maui.Controls.Compatibility.dll [External]
[uto.myapp] Invalid ID 0x00000000.
Loaded assembly: Xamarin.AndroidX.CoordinatorLayout.dll [External]
Loaded assembly: System.Xml.ReaderWriter.dll [External]
Loaded assembly: System.Private.Xml.dll [External]
Loaded assembly: Xamarin.AndroidX.Lifecycle.LiveData.Core.dll [External]
[uto.myapp] Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
[uto.myapp] Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
Loaded assembly: Xamarin.AndroidX.ViewPager2.dll [External]
[CompatibilityChangeReporter] Compat change id reported: 171228096; UID 10154; state: ENABLED
[TabLayout] MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
Loaded assembly: Xamarin.AndroidX.Lifecycle.Runtime.dll [External]
Loaded assembly: Xamarin.AndroidX.ViewPager.dll [External]
Loaded assembly: Newtonsoft.Json.dll [External]
Loaded assembly: System.Text.RegularExpressions.dll [External]
[uto.myapp] Explicit concurrent copying GC freed 10656(784KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 3092KB/4123KB, paused 292us,48us total 4.631ms
[libc] Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7b37cd791008 in tid 18650 (uto.myapp), pid 18650 (uto.myapp)
devonuto commented 2 years ago

Reading more, is this a memory allocation issue? Am I potentially storing too much in memory?

devonuto commented 2 years ago

If anyone has this issue, this was caused by a Generic method causing an infinite loop.