Open robinwilson16 opened 2 years ago
@evelynwu-msft FYI
Is there any feedback or guidance on this issue? I'm running into the same issue with the MSIX produced for sideloading a winUI 3 application.
You probably don't have it set to self-contained.
Still happens whatever options are picked and just doesn't work
I have the same problem and real problem is shadowed with Kernelbase.dll problem, any suggestions how to proceed with this ?
I also have the nearly the same problem but if i publish it into a folder it works. If I copy the files from the folder publish to the ClickOnce files i dont get a error that says that "Microsoft.WindowsAppRuntime.Bootstrap.dll" is missing anymore but I get the same KERNELBASE.dll error. Running WindowsAppSdk 1.1.2, VS 17.2.3 and Windows 19044.1766
I have the same problem, when I drag and drop a file on a dropActionHandler it will crash 1 in 10 times.
The dumbest thing ever is that I get a unhandled exception inside a try catch block.
Of course this is typical MS quality here.
I maybe have a similar issue in my WINUI3 Win32 (win10 x64 19045) Desktop App under .NET6.
The Application Runs fine when launched in Debug Mode. As a release build or when packed to folder (single file) i got these problems:
Published to Folder as single File: KERNELBASE.DLL Error like mentioned above Release Build: The App opens, but the Titlebar is "inactive". That means: no response to Max/Min/Close Buttons. Even Not dragable.
The TitleBar-Issue seems to be related to the AppSDk Version:
WinUI 3 - Windows App SDK 1.2.230118.102 = titlebar working WinUI 3 - Windows App SDK 1.2.230313.1 = titlebar not working
To reproduce the issue i had to clean the project (remove obj and bin folders in windows fileexplorer)
Downgrading to 1.2.230118.102 fixed the titlebar issue. However, i still get the kernelbase error when packed to a single file.
I have this same exception; I have managed to isolate it to when I submit a message within the UI which in the background saves data to a file at the directory returned from:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
Exception thrown at 0x00007FFA1681FE7C (KernelBase.dll) in appnamespace.exe: 0xE0434352 (parameters: 0xFFFFFFFF80070005, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FF8E1C60000).
onecore\com\combase\registrationstore\registrationstoredata.cpp(1055)\combase.dll!00007FFA175588B9: (caller: 00007FFA1754E1E5) ReturnHr(436) tid(2c80c) 80070002 The system cannot find the file specified.
onecore\com\combase\registrationstore\registrationstoredata.cpp(1055)\combase.dll!00007FFA175588B9: (caller: 00007FFA1754E1E5) ReturnHr(437) tid(2c80c) 80070002 The system cannot find the file specified.
Exception thrown at 0x00007FFA1681FE7C (KernelBase.dll) in appnamespace.exe: 0xE0434352 (parameters: 0xFFFFFFFF80070005, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FF8E1C60000).
Exception thrown at 0x00007FFA1681FE7C (KernelBase.dll) in appnamespace.exe: WinRT originate error - 0x80070005 : 'Access to the path 'C:\Program Files\WindowsApps\PUBLISHERINFO.329567E69597C_1.0.11.0_x64__1wwrtwbj9qrjm\bpe' is denied.'.
onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFA174EC07A: (caller: 00007FFA174F15EF) ReturnHr(438) tid(2c80c) 8007007E The specified module could not be found.
onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFA174EC07A: (caller: 00007FFA1768CF82) ReturnHr(439) tid(2c80c) 8007007E The specified module could not be found.
onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFA174EC07A: (caller: 00007FFA1768C95E) ReturnHr(440) tid(2c80c) 8007007E The specified module could not be found.
Unhandled exception at 0x00007FF9C9DED8BC (Microsoft.ui.xaml.dll) in appnamespace.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0000023B74998140, 0x0000000000000003).
Warning: Unable to load Dynamic Function Table Callback DLL 'C:\Program Files\WindowsApps\PUBLISHERINFO.329567E69597C_1.0.11.0_x64__1wwrtwbj9qrjm\mscordaccore.dll'. Call stacks may be truncated. Access is denied.
The Exception Message is:
Unhandled exception at 0x00007FF9C9DED8BC (Microsoft.ui.xaml.dll) in appnamespace.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0000023B74998140, 0x0000000000000003).
I thought maybe it was an elevation issue, but that doesn't seem to be the case. This works in Debug and Release for x32 and x64. Not sure if anyone has any suggestions as to where to look.
+1 to this, even seems to happen on a fresh VM. Very strange
I have this same exception; I have managed to isolate it to when I submit a message within the UI which in the background saves data to a file at the directory returned from:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
Exception thrown at 0x00007FFA1681FE7C (KernelBase.dll) in appnamespace.exe: 0xE0434352 (parameters: 0xFFFFFFFF80070005, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FF8E1C60000). onecore\com\combase\registrationstore\registrationstoredata.cpp(1055)\combase.dll!00007FFA175588B9: (caller: 00007FFA1754E1E5) ReturnHr(436) tid(2c80c) 80070002 The system cannot find the file specified. onecore\com\combase\registrationstore\registrationstoredata.cpp(1055)\combase.dll!00007FFA175588B9: (caller: 00007FFA1754E1E5) ReturnHr(437) tid(2c80c) 80070002 The system cannot find the file specified. Exception thrown at 0x00007FFA1681FE7C (KernelBase.dll) in appnamespace.exe: 0xE0434352 (parameters: 0xFFFFFFFF80070005, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00007FF8E1C60000). Exception thrown at 0x00007FFA1681FE7C (KernelBase.dll) in appnamespace.exe: WinRT originate error - 0x80070005 : 'Access to the path 'C:\Program Files\WindowsApps\PUBLISHERINFO.329567E69597C_1.0.11.0_x64__1wwrtwbj9qrjm\bpe' is denied.'. onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFA174EC07A: (caller: 00007FFA174F15EF) ReturnHr(438) tid(2c80c) 8007007E The specified module could not be found. onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFA174EC07A: (caller: 00007FFA1768CF82) ReturnHr(439) tid(2c80c) 8007007E The specified module could not be found. onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FFA174EC07A: (caller: 00007FFA1768C95E) ReturnHr(440) tid(2c80c) 8007007E The specified module could not be found. Unhandled exception at 0x00007FF9C9DED8BC (Microsoft.ui.xaml.dll) in appnamespace.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0000023B74998140, 0x0000000000000003). Warning: Unable to load Dynamic Function Table Callback DLL 'C:\Program Files\WindowsApps\PUBLISHERINFO.329567E69597C_1.0.11.0_x64__1wwrtwbj9qrjm\mscordaccore.dll'. Call stacks may be truncated. Access is denied.
The Exception Message is:
Unhandled exception at 0x00007FF9C9DED8BC (Microsoft.ui.xaml.dll) in appnamespace.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0000023B74998140, 0x0000000000000003).
I thought maybe it was an elevation issue, but that doesn't seem to be the case. This works in Debug and Release for x32 and x64. Not sure if anyone has any suggestions as to where to look.
I narrowed my issue down to a 3rd party NuGet package with a literal directory path trying to write data to somewhere it wasn't allowed to once it was installed within the WindowsApps
directory once it's installed from the store or sideloaded.
You'd think there would be a more meaningful exception being raised natively for this.
Same for me on two fresh install today. Sample app run in debug with visual, but not outside of visual or with publishing process.
I had to switch to WFP to get my app to work last time and re-do parts of it. Before I start my next app and find it won't publish either, has this issue/bug been fixed and will WINUI apps publish without crashing as I notice a year and a half later it is still open and others reporting the same issue and no fix or workaround as far as I can tell.
Stay away from this stinker.
Maybe a little bit late, but i noticed that this issue is still open. So here it goes.
Check if you're code make use a foreach loop. If the foreach loops through a null valued list, your application will crash. The strange thing is that most of the time the application just crashes as you mentioned. But in very rare case (1 out of the 25 times) it manages to stick to the debugger and show the actual error.
So instead of using:
foreach (var item in list)
{
}
which potential could be null, use an extension method
foreach (var item in list.EnsureNotNull())
{
}
The extension method can be simple as source
/// <summary>
/// Ensures enumerable is not null
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="list">The list.</param>
/// <returns>IEnumerable<T>.</returns>
public static IEnumerable<T> EnsureNotNull<T>(this IEnumerable<T> list)
{
return list ?? Enumerable.Empty<T>();
}
Describe the bug
I cannot get any WINUI desktop apps I create to run outside of Visual Studio however I publish them (single app or lots of files and with or without ClickOnce installation. I am using the 17.1 version of Visual Studio 2022 on the latest Windows 11 insider build.
Steps to reproduce the bug
Create a new Blank App, Packaged (WINUI 3 in Desktop) and then publish this (for example selecting ClickOnce then the single file option or deploying all files to a share). Nothing happens when the .exe is launched and looking in Event Viewer Application log the following errors appears:
First this one:
Then this one:
Expected behavior
The app should launch and display the main window
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.0
Windows app type
Device form factor
No response
Windows version
No response
Additional context
No response