dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
582 stars 37 forks source link

WinUIEx Splash screen throws System.AccessViolationException at startup #94

Closed cptalpdeniz closed 1 year ago

cptalpdeniz commented 1 year ago

Hello, after building and running the program, a tiny window appears for a split second and then I get System.AccessViolationException thrown from App.g.i.cs after splash.Completed += (s, e) => m_window = e; line is ran. I've put breakpoints to SplashScreen.xaml.cs and no code is run in this file. The full error is:

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

I'm running this program in Debug, x86 mode. I've followed the steps outlined here. In addition I've overridden OnLoading() as well. Any suggestions to fix this issue? @dotMorten

image

cptalpdeniz commented 1 year ago

The name of my splash screen was SplashScreenView, not SplashScreen. This caused the exception. After renaming everything back to SplashScreen, things were fixed. Closing this issue as issue is fixed.