How to diagnose fault in crashing UWP app - c#

I have a UWP application which runs fine from Visual Studio with the debugger attached. If I run the app standalone, from the start menu - which is the app that Visual Studio has deployed - it will start, but crash when I invoke one of the functions in the app.
UWP provides absolutely no information - the window disappears and I get the following in the Event Viewer:
Faulting application name: MyApp.Uwp.exe, version: 1.0.0.0, time stamp: 0x5c889173
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.207, time stamp: 0x36bacadb
Exception code: 0xc000027b
Fault offset: 0x0086b264
Faulting process id: 0x27f4
Faulting application start time: 0x01d53db7eaba0778
Faulting application path: C:\src\MyApp\bin\x86\Debug\AppX\MyApp.Uwp.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: 009e5859-3f05-4790-8072-37af666acb7e
Faulting package full name: 59640b3f-2209-4686-8f9a-9f8748b9753c_1.0.0.0_x86__9617mk99wz2v0
Faulting package-relative application ID: App
If I start the app via the Start menu, then attach the VS debugger, it doesn't crash.
How can I get a stack trace and work out what is going wrong here?

I want to know if it's possible to get a stack trace or any information out of a crashed UWP app.
You could use HockeyApp to capture the exception call stack, exception message, exception type name, file name and line number which caused a crash in the app. For more detail please refer this document.
Please note: In order to symbolicate crashes for .NET UWP applications you need to upload symbol (*.pdb) files

Related

Is it possible to trap a ucrtbase.dll fault in Visual Studio debugger

I need to be able to trap a ucrtbase.dll fault in our application, can't seem to find any good way to do it. Is it possible to capture this in the VS debugger to see where we are on the stack when the fault occurs?
We see issues more often these days where our application goes unresponsive and shuts down with nothing in our logs. We do see the following in the Eventlog:
Faulting application name: ******************************
Faulting module name: ucrtbase.dll, version: 10.0.19041.789, time stamp: 0x2bd748bf
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process id: 0x3754
Faulting application start time: 0x01d8faaaf85feff3
Faulting application path: ********************************
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: b56fdb9c-6b0a-4186-9d0e-73570b51c0d2
Faulting package full name:
Faulting package-relative application ID:
Event log shows there is a WER report, with no usable data...
If this is not the proper place to address this query, please advise on the proper forum to post as a ucrtbase Windows issue for tracking.
Additional:
I found the following report on ucrtbase.dll with version: 10.0.19041.789: but we are not running WSL -> more likely the problem is in ucrtbase.dll or possibly hardware than an application/platform issue.
=-=-= Original: https://github.com/microsoft/WSL/issues/8256
Please advise.
Thanks much,
-Timothy
tried capturing in debugger for triage, no luck.

UWP App closing as soon as it opens (Windows.UI.Xaml.dll) - error

We have a sideload AppXBundle where we are experiencing the app crashing right after it shows the splash screen.
We install the certificate from our store association, double click on the appxbundle - App Installer prompt appears, and we click install. As mentioned, the splash screen shows, and then within a few seconds the app closes.
Here is the error message from the Event Viewer:
Faulting application name: TestApp.exe, version: 1.1.11.0, time stamp: 0x5f0453e7
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.815, time stamp: 0x9fa806f2
Exception code: 0xc000027b
Fault offset: 0x0000000000713530
Faulting process id: 0x1b84
Faulting application start time: 0x01d6544d6b4a7c36
Faulting application path: C:\Program
Files\WindowsApps\TestApp_1.0.31.0_x64__e3skdg3cf6xk8\TestApp.UWP.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: 2eda3b62-5ac6-46cd-89b2-b251d05dea05
Faulting package full name: TestApp_1.0.31.0_x64__e3skdg3cf6xk8
Faulting package-relative application ID: App
We have done quite a bit of research on the Windows.UI.XAML dll issue - I have uninstalled it with powershell, and reinstalled it. I tried updating it. Nothing seems to do the trick.
We have tried it with every compile version I can for the device (x64,x86,ARM,ARM64)
The target device is a Surface GO, but we have expereinced the app crashing on x64 desktops with Windows version 17143+.
We have this issue only on specific computers. 1909(build 18363.836) <- windows version where the app works.
If you need more information, please let us know.

Changing language in UWP making app to crash

I have a weird issue that I cannot solve.
I am using the following code to change my app language:
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = codeOfLanguage;
The codeOfLanguage variable is string and the error occurres when I am trying to change the language to "bg-BG" (same if I try "bg"). What happens is I get a Just-in-time debugger window in my face (despite I am currently debugging from VS2015) and the app crashes. I cannot catch the Exception from Studio.
I only found the following clue in the Application eventlog:
Faulting application name: {myAppName}, version: 1.0.0.0, time stamp: 0x5a3d1876
Faulting module name: KERNELBASE.dll, version: 10.0.14393.1770, time stamp: 0x59bf2bcf
Exception code: 0xc0000002
Fault offset: 0x000daa12
Faulting process id: 0x3ca4
Faulting application start time: 0x01d37b3249d8cc91
Faulting application path: {myAppPath}
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 56827555-577b-4276-8ef0-217065912b46
Faulting package full name: {myPackageName}
Faulting package-relative application ID: App
After restarting the app the language is changed to "bg-BG" and resources are loaded accordingly.
When I am changing the language back to English ("en-GB") the issue does not occur.
Does anybody have any idea how to move forward with this? Where could I find more info on the issue and the solution?
Thanks,
Gabor

application.exe.config file issue when installing on a clean machine

I have created an installer project in WPF. when I run the application on my computer, it works fine. I set a minimum requirement for the .net framework 4.5. But if I run the application on another machine (with newly installed windows 7), the application crashes.
Below is event viewer log:
Installer exception
Faulting application name: MyInstaller.exe, version: 1.0.0.0, time stamp: 0x55572605
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time stamp: 0x4ce7bafa
Exception code: 0xe0434352
Fault offset: 0x0000b727
Faulting process id: 0x398
Faulting application start time: 0x01d08fca117f3e62
Faulting application path: C:\Users\self\Downloads\MyInstaller.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 517dc0dd-fbbd-11e4-a332-b083fe4d72a6
Application: MyInstaller.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
Stack:
at MyInstaller.App.Main(System.String[])
I tried to create "Window event log" inside Main() try-catch method, but the application was not able to reach to that point.
When I send myinstaller.config.exe file with project exe file in the new installed machine, then it shows error. That the application does not meet requirement.
In my machine myinstaller.config.exe is not requirement, even after I uninstall framework 4.5 and 4.0.

Unhandled exception for the component "MultiScaleImage" of "Silverlight 5"

I am developing a web application based on "Silverlight 5".
I found a blocking bug related to the component "MultiScaleImage" that happens after a unpredictable (sometimes it takes hours, sometimes minutes) number of zooms of the image.
When the issue occurs the following messages are shown:
Windows 7 Event Log: Faulting application name: IEXPLORE.EXE, version: 11.0.9600.17126, time stamp: 0x53882e30
Faulting module name: agcore.dll, version: 5.1.30214.0, time stamp: 0x52fdb3c4
Exception code: 0xc0000005
Fault offset: 0x003a8d0d
Faulting process id: 0x18dc
Faulting application start time: 0x01cf9cf438322755
Faulting application path: C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
Faulting module path: C:\Program Files (x86)\Microsoft Silverlight\5.1.30214.0\agcore.dll
Report Id: a9de107e-08fe-11e4-b5ce-c86000a4b136)
Visual Studio Debugger: Unhandled exception at 0x5CCD8D0D (agcore.dll) in iexplore.exe: 0xC0000005: Access violation reading location 0xFFE2E6F2.
Internet Explorer 11: Internet Explorer has stopped working.
The test has been done with Win7+SP1 with IE11 and IE8.
This bug is preventing me from releasing the application and deploying it to the customer servers.
I can't believe there's no way to solve it nor a valid workaround.

Categories

Resources