How to resolve Xamarin.Forms crash when navigating between pages on Android?

Muhammad Amiruddin Latief 0 Reputation points
2025-05-09T13:17:11.1833333+00:00

I'm experiencing an issue in a Xamarin.Forms app where the app crashes when navigating between two pages, but only on Android devices. The crash log mentions an ObjectDisposedException related to a renderer. I suspect it has something to do with the way the navigation stack is being managed or a custom renderer that is being disposed prematurely. I've tried wrapping the navigation code in Device.BeginInvokeOnMainThread, but it didn't help.

Does anyone have a reliable pattern for safe navigation between pages in Xamarin.Forms, especially on Android?

This question is related to the following Learning Module

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,380 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.