PrismLibrary / Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..
Other
6.27k stars 1.64k forks source link

[BUG] App crash with the attached sample project #3136

Open espritm opened 3 months ago

espritm commented 3 months ago

Description

Hello,

We are creating a mobile application with MAUI based on Prism Library and using the nuget DevExpress.

The app crash when we set an icon to a TabviewItem while Prism is activated.

The app does not crash and the icon works well when Prism is deactivated.

This problem occurs on iOS only, no issue with Android.

Here is the exception : image

We have tried to add the following line UIKit.UIApplication.CheckForIllegalCrossThreadCalls = false;

Then the exception is : image

Associated links that explain my research :

Steps to Reproduce

  1. Download the sample project https://github.com/Labraptor/PrismXDevExpressSample.

  2. Build and Debug on iOS => The app crash with the exception explained.

  3. In MauiProgram.cs, comment the .UsePrism().

  4. Build and Debug on iOS => The app does not crash and the first tab appears with icon on the TabviewItems.

  5. In MauiProgram.cs, uncomment the UsePrism().

  6. In MainPage.xaml, remove HeaderIcon="cloudsunaltsvgrepocom.png".

  7. Build and Debug => The app does not crash and the first tab appears without icon.

Platform with bug

.NET MAUI

Affected platforms

iOS

Did you find any workaround?

No

Relevant log output

No response

espritm commented 3 months ago

I tried to debug myself by cloning Prism and changing the PrismMauiDemo app to reproduce the issue.

I succeeded but now I would need some help to understand the issue and to try to provide a PR with a fix please..

Here is the uncatched exception :

image

I have no idea how to go further.. please @dansiegel any idea or any help ?