question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[regression/8.0.0-preview.7.8842] iOS: Shell navigation crashes the app with SIGSEGV

See original GitHub issue

Description

The recent update to 8.0.0-preview.7.8842 produces a fatal error in the Shell, where navigation between Flyout items will cause the application to crash. Sometimes the navigation can be triggered 5-6 times before the crash, sometimes it happens right on the second navigation. I could reliably reproduce it in DEBUG & RELEASE Mode on an iPad with iOS 16.6.0

Setting the Tag <MauiVersion> in the csproj back to 8.0.0-preview.6.8686 fixes the crash.

This is a video of the app being deployed/started through Visual Studio for Mac with Preview 6. No matter how much I navigate, the app won’t crash:

https://github.com/dotnet/maui/assets/67259411/c4b85175-5124-4232-9403-49886728360f

As soon as I switch to Preview 7, the app crashes after a few clicks:

https://github.com/dotnet/maui/assets/67259411/4c6d9465-78e8-4f53-a627-10eefd76af70

It baffles me how this one could slip through. Literally just clicking through the most advertised navigation control for the framework crashes the app… simply astonishing, but not in a good way 😕

Steps to Reproduce

  1. Open the linked project in Visual Studio for Mac. Make sure you followed the instructions to set it up for .Net 8 development
  2. Deploy the linked project onto an iOS Device (Current stable version 16.6.0 recommended)
  3. Click through the 3 flyout items at the side several times
  4. Enjoy the SIGSEGV crash
  5. Modify the <MauiVersion> tag in the csproj file and let it point to Maui 8 Preview 6 now
  6. Redeploy onto the iOS device
  7. Click through the 3 Flyout items relentlessly
  8. No crash

Link to public reproduction project repository

https://github.com/DDHSchmidt/ShellCrap

Version with bug

8.0.0-preview.7.8842

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.0-preview.6.8686

Affected platforms

iOS

Affected platform versions

iOS 16.6.0

Did you find any workaround?

Revert to Maui 8 Preview 6

Relevant log output

=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	0x10452f53c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x10451a528 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044fca34 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x2291c32f4 - /usr/lib/system/libsystem_platform.dylib : <redacted>
	0x1d8e1eb2c - /usr/lib/libobjc.A.dylib : class_getMethodImplementation
	0x1d8e1eb2c - /usr/lib/libobjc.A.dylib : class_getMethodImplementation
	0x1d9f6a79c - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
	0x1d9edae24 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
	0x1d9f0caa8 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
	0x1e0f751e0 - /System/Library/Frameworks/QuartzCore.framework/QuartzCore : <redacted>
	0x1e0fcc814 - /System/Library/Frameworks/QuartzCore.framework/QuartzCore : <redacted>
	0x1e1aeec14 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
	0x10420f874 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : xamarin_get_runtime_arch
	0x10420fa24 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : xamarin_get_runtime_arch
	0x104574d8c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x10420b888 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : xamarin_release_managed_ref
	0x1041d995c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : 
	0x10453e528 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x104532f7c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x104530b54 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044ffb68 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044a7a70 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044ab6d0 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x104613780 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x10461359c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1d9f08ff8 - /System/Library/Frameworks/Foundation.framework/Foundation : <redacted>
	0x1dfb99154 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
	0x1dfba4dc8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
	0x1dfb3009c - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
	0x1dfb451b8 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
	0x1dfb49da0 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
	0x2166c8998 - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices : GSEventRunModal
	0x1e1ddb80c - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
	0x1e1ddb484 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
	0x1041f05f4 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : xamarin_UIApplicationMain
	0x10453f610 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x10453e19c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x104532ea4 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x104530b54 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044ffb68 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044a7a70 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1044adc48 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x104505020 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x10421d00c - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : xamarin_get_original_working_directory_path
	0x10456d638 - /private/var/containers/Bundle/Application/6DE8FB6D-40C5-40C3-BB02-EFEFFD8137E3/ShellCrap.app/ShellCrap : AppleCryptoNative_X509ImportCollection
	0x1fd2e8344 - /usr/lib/dyld : <redacted>

=================================================================
	Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1d8e25040):0x1d8e25030  f3 03 02 aa f5 03 01 aa f6 03 00 aa 74 00 1e 32  ............t..2
0x1d8e25040  48 10 40 f9 08 8d 7d 92 08 01 40 b9 c8 00 00 37  H.@...}...@....7
0x1d8e25050  68 02 40 f9 08 81 7d 92 08 11 40 f9 08 8d 7d 92  h.@...}...@...}.
0x1d8e25060  08 01 40 b9 48 03 e8 36 e0 03 13 aa e1 03 15 aa  ..@.H..6........

=================================================================
	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at Foundation.NSObject:xamarin_release_managed_ref <0x000c2>
	  at Foundation.NSObject:ReleaseManagedRef <0x000e2>
	  at NSObject_Disposer:Drain <0x00170>
	  at <Module>:runtime_invoke_direct_void_NSObject <0x0008e>
	  at <unknown> <0x00000>
	  at <unknown> <0xffffffff>
	  at UIKit.UIApplication:xamarin_UIApplicationMain <0x000c6>
	  at UIKit.UIApplication:UIApplicationMain <0x0006a>
	  at UIKit.UIApplication:Main <0x00158>
	  at ShellCrap.Program:Main <0x0002c>
	  at <Module>:runtime_invoke_direct_void_string[] <0x0007e>
	  at <unknown> <0x00000>
=================================================================

Issue Analytics

  • State:open
  • Created a month ago
  • Reactions:5
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
DDHSchmidtcommented, Aug 18, 2023

Sorry, running late for a birthday. If you need feedback before tomorrow it’s faster to checkout/test the reproduction yourself.

0reactions
DDHSchmidtcommented, Aug 21, 2023

No, sorry. Even after cleaning bin-/obj-folders, reinstalling the app on my iPad, the application output doesn’t reveal anything new beyond what I’ve posted here already.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Investigating memory access crashes
A crash due to a memory access issue occurs when an app uses memory in an ... These crashes are most often identified...
Read more >
Xamarin Forms Shell Crashed when navigating too fast ...
I am seeing my app crash when navigating between the left menu page of when i click to the back arrow to fast....
Read more >
Crashes | App quality
An app that is written using machine code or C++ crashes if there's an unhandled signal, such as SIGSEGV , during its execution....
Read more >
Shell Routing crashing when MenuItem is selected
Hi I am using a Shell page layout with Flyoutitems and a Menu command as ... /xamarin-forms/app-fundamentals/shell/navigation#invalid-routes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found