0

I tried today to change the appicon of my maui app and had a little trouble with it. Before, my app worked fine and I had no start problems. I debug on a physical Android device. After thousands of rebuilds I decided to delete the app and reinstall it with a new debug run.

After this reinstall notging worked like before. When I debug the app, the process stops at InitializeComponents from a ContentPage. I have a Shell and the InitializeComponent works there and at my App.xaml. The ContentPage where it gets stuck is the first Flyoutpage.

What I allready tired:

  • copied the hole project to a new one but the same error
  • I deleted the datastorage and the cache of the app
  • I restarted my phone

Then I used four other devices and startet the debug. The InitializeComponent methode only works on one out of four.

Does anyone have a solution for me to get the app again working on my other device?

Tobination
  • 178
  • 11
  • 1
    Please show some relevant code, like your View where the problem occurs (XAML and code behind). – Julian Dec 16 '22 at 20:27
  • FYI for future readers: Note that there is nothing in this question that makes it possible for anyone to suggest a solution. Anyone who has this happen: *"the process stops at InitializeComponents"*, please isolate the problem further, before seeking help. – ToolmakerSteve Dec 17 '22 at 00:31

1 Answers1

0

After a couple of debug sessions I managed to identify the problem. It was because of sqlite-net-pcl. On the one device which managed to initialize the components, the debugger showed the errormessage:

system.typeinitializationexception: 'the type initializer for 'sqlite.sqliteconnection' threw an exception.'

I faced it allready 4 weeks before but somehow it disapeared. I tried to create a solution for this problem and reinstalled the nuget but with the version v1.6.292 (Uwe Keim, The type initializer for 'SQLite.SQLiteConnection' threw an exception). This fixed it. After this the components where initialized, also on my other devices.

Seems like the programm gets stuck because of the database and the await methode and coudn't not go on.

Tobination
  • 178
  • 11