具有完全信任流程的 UWP 包的商店版本应用程序在启动时不断崩溃
Store version of UWP Package with a full trust process forms app keeps crashing on launch
我有一个 UWP 应用程序,其中捆绑了完全信任的 win32 表单应用程序。
我的项目结构是这样的
UWP App
Win32 Forms App (.NET Framework 4.7.2)
Sync Library (.NET Framework 4.7.2) - referred by Forms App
Domain Library (.NET Standard 2.0) - referred by both UWP App and Sync Library.
当我通过 visual studio 获得发布版本时,它工作正常。但是当相同的包发布到商店时,应用程序在启动时不断崩溃。我尝试通过订阅 App.UnhandledException 添加崩溃日志。但它没有被解雇。同样在商店健康报告中,它只是显示为“未知”。
在事件查看器中检查错误日志时,每次崩溃都会抛出两个错误,如下所列。
Source: .NET Runtime
Application: MyAppName.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code e06d7363, exception address 00007FFB4D3DA859
Stack:
另一个是
Source: Application Error
Faulting application name: MyAppName.exe, version: 1.0.0.0, time stamp: 0x5e922c6f
Faulting module name: KERNELBASE.dll, version: 10.0.18362.752, time stamp: 0x2023e189
Exception code: 0xe0434352
Fault offset: 0x000000000003a859
Faulting process id: 0x2f4c
Faulting application start time: 0x01d6109e2c207537
Faulting application path: C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 6cdeefcb-e2cb-4b77-ae28-1c0b54fb41ff
Faulting package full name: AppPackageFullName_0.5.22.0_x64__krk5891pf20rj
Faulting package-relative application ID: App
Windows 错误报告:
Version=1
EventType=MoAppCrash
EventTime=132311532032811137
ReportType=2
Consent=1
UploadTime=132311532035982658
ReportStatus=268435456
ReportIdentifier=0f767db9-4d2d-451f-acaa-efddb8b3225d
IntegratorReportIdentifier=67b702fb-992c-4ddf-b31e-eebfa70d328c
Wow64Host=34404
NsAppName=praid:App
OriginalFilename=MyAppName.exe
AppSessionGuid=000036c0-0001-01ab-f765-5d2aa310d601
TargetAppId=U:AppPackageFullName_0.5.22.0_x64__krk5891pf20rj!App
TargetAppVer=0.5.22.0_x64_!2020//04//11:20:45:35!0!MyAppName.exe
BootId=4294967295
ServiceSplit=1332998561
TargetAsId=1483
IsFatal=1
EtwNonCollectReason=4
Response.BucketId=d5c24af9f45a79f600894a99f9fb0fc3
Response.BucketTable=5
Response.LegacyBucketId=1191565601600638915
Response.type=4
Sig[0].Name=Package Full Name
Sig[0].Value=AppPackageFullName_0.5.22.0_x64__krk5891pf20rj
Sig[1].Name=Application Name
Sig[1].Value=praid:App
Sig[2].Name=Application Version
Sig[2].Value=1.0.0.0
Sig[3].Name=Application Timestamp
Sig[3].Value=5e922c6f
Sig[4].Name=Fault Module Name
Sig[4].Value=KERNELBASE.dll
Sig[5].Name=Fault Module Version
Sig[5].Value=10.0.18362.752
Sig[6].Name=Fault Module Timestamp
Sig[6].Value=2023e189
Sig[7].Name=Exception Code
Sig[7].Value=e0434352
Sig[8].Name=Exception Offset
Sig[8].Value=000000000003a859
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.18362.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=16393
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=ab6f
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=ab6f94a45a680442bf911fba1b09d517
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=7e29
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=7e29e5215127ef7af2317cd3c1a7d6cf
UI[2]=C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
LoadedModule[0]=C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNEL32.dll
LoadedModule[4]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[5]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[6]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[7]=C:\WINDOWS\System32\sechost.dll
LoadedModule[8]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[9]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
LoadedModule[10]=C:\WINDOWS\System32\SHLWAPI.dll
LoadedModule[11]=C:\WINDOWS\System32\combase.dll
LoadedModule[12]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[13]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[14]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[15]=C:\WINDOWS\System32\win32u.dll
LoadedModule[16]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[17]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[18]=C:\WINDOWS\System32\USER32.dll
LoadedModule[19]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[20]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[21]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[22]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
LoadedModule[23]=C:\WINDOWS\SYSTEM32\ucrtbase_clr0400.dll
LoadedModule[24]=C:\WINDOWS\SYSTEM32\VCRUNTIME140_CLR0400.dll
LoadedModule[25]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[26]=C:\WINDOWS\System32\ole32.dll
LoadedModule[27]=C:\WINDOWS\System32\psapi.dll
LoadedModule[28]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\mscorlib\cea8b8fbc469dcbc6224d523a578e4b3\mscorlib.ni.dll
LoadedModule[29]=C:\WINDOWS\SYSTEM32\WinTypes.dll
LoadedModule[30]=C:\WINDOWS\System32\CRYPTSP.dll
LoadedModule[31]=C:\WINDOWS\system32\rsaenh.dll
LoadedModule[32]=C:\WINDOWS\System32\bcrypt.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
LoadedModule[34]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
LoadedModule[35]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Runtime\ecf16dcbbc95961331f8ec542cb7c3d9\System.Runtime.ni.dll
LoadedModule[36]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Runtbff93e24#fd43d0605b1366bc071e2bbdde312cf\System.Runtime.InteropServices.WindowsRuntime.ni.dll
LoadedModule[37]=C:\Windows\System32\MrmCoreR.dll
LoadedModule[38]=C:\WINDOWS\System32\shcore.dll
LoadedModule[39]=C:\WINDOWS\SYSTEM32\windows.staterepositorycore.dll
LoadedModule[40]=C:\WINDOWS\System32\profapi.dll
LoadedModule[41]=C:\Windows\System32\Windows.UI.dll
LoadedModule[42]=C:\WINDOWS\SYSTEM32\TextInputFramework.dll
LoadedModule[43]=C:\WINDOWS\SYSTEM32\InputHost.dll
LoadedModule[44]=C:\WINDOWS\SYSTEM32\CoreUIComponents.dll
LoadedModule[45]=C:\WINDOWS\SYSTEM32\CoreMessaging.dll
LoadedModule[46]=C:\WINDOWS\SYSTEM32\ntmarta.dll
LoadedModule[47]=C:\WINDOWS\SYSTEM32\PROPSYS.dll
LoadedModule[48]=C:\WINDOWS\SYSTEM32\bcp47mrm.dll
LoadedModule[49]=C:\WINDOWS\system32\uxtheme.dll
LoadedModule[50]=C:\Windows\System32\twinapi.appcore.dll
LoadedModule[51]=C:\WINDOWS\SYSTEM32\RMCLIENT.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
OsInfo[0].Key=vermaj
OsInfo[0].Value=10
OsInfo[1].Key=vermin
OsInfo[1].Value=0
OsInfo[2].Key=verbld
OsInfo[2].Value=18362
OsInfo[3].Key=ubr
OsInfo[3].Value=753
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=1033
OsInfo[7].Key=geoid
OsInfo[7].Value=113
OsInfo[8].Key=sku
OsInfo[8].Value=48
OsInfo[9].Key=domain
OsInfo[9].Value=1
OsInfo[10].Key=prodsuite
OsInfo[10].Value=256
OsInfo[11].Key=ntprodtype
OsInfo[11].Value=1
OsInfo[12].Key=platid
OsInfo[12].Value=10
OsInfo[13].Key=sr
OsInfo[13].Value=0
OsInfo[14].Key=tmsi
OsInfo[14].Value=468257
OsInfo[15].Key=osinsty
OsInfo[15].Value=1
OsInfo[16].Key=iever
OsInfo[16].Value=11.719.18362.0-11.0.180
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=32503
OsInfo[19].Key=svolsz
OsInfo[19].Value=169
OsInfo[20].Key=wimbt
OsInfo[20].Value=0
OsInfo[21].Key=blddt
OsInfo[21].Value=190318
OsInfo[22].Key=bldtm
OsInfo[22].Value=1202
OsInfo[23].Key=bldbrch
OsInfo[23].Value=19h1_release
OsInfo[24].Key=bldchk
OsInfo[24].Value=0
OsInfo[25].Key=wpvermaj
OsInfo[25].Value=0
OsInfo[26].Key=wpvermin
OsInfo[26].Value=0
OsInfo[27].Key=wpbuildmaj
OsInfo[27].Value=0
OsInfo[28].Key=wpbuildmin
OsInfo[28].Value=0
OsInfo[29].Key=osver
OsInfo[29].Value=10.0.18362.753.amd64fre.19h1_release.190318-1202
OsInfo[30].Key=buildflightid
OsInfo[30].Value=36b36b71-1da5-4320-8877-4d60bb3d78e6
OsInfo[31].Key=edition
OsInfo[31].Value=Professional
OsInfo[32].Key=ring
OsInfo[32].Value=Retail
OsInfo[33].Key=expid
OsInfo[34].Key=containerid
OsInfo[35].Key=containertype
OsInfo[36].Key=edu
OsInfo[36].Value=0
FriendlyEventName=Stopped working
ConsentKey=MoAppCrash
AppName=MyAppName
AppPath=C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=C9FF5F66D2724FC9A354189F5DB43763
MetadataHash=-1857492785
如何解决这个错误?
使用 WinDbg 进行故障转储分析
0:000> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
*** WARNING: Unable to verify checksum for Bookmark It.exe
DEBUG_FLR_EXCEPTION_CODE(80070002) and the ".exr -1" ExceptionCode(e0434352) don't match
KEY_VALUES_STRING: 1
Key : Analysis.CPU.Sec
Value: 12
Key : Analysis.DebugAnalysisProvider.CPP
Value: Create: 8007007e on KUMAR-4031
Key : Analysis.DebugData
Value: CreateObject
Key : Analysis.DebugModel
Value: CreateObject
Key : Analysis.Elapsed.Sec
Value: 84
Key : Analysis.Memory.CommitPeak.Mb
Value: 147
Key : Analysis.System
Value: CreateObject
Key : CLR.Engine
Value: CLR
Key : CLR.System.IO.FileNotFoundException._fileName
Value: System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Key : CLR.System.IO.FileNotFoundException._message
Value: Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Key : CLR.Version
Value: 4.0.30319.0
Key : Timeline.OS.Boot.DeltaSec
Value: 855
Key : Timeline.Process.Start.DeltaSec
Value: 2
ADDITIONAL_XML: 1
NTGLOBALFLAG: 0
PROCESS_BAM_CURRENT_THROTTLED: 0
PROCESS_BAM_PREVIOUS_THROTTLED: 0
APPLICATION_VERIFIER_FLAGS: 0
CONTEXT: (.ecxr)
rax=0000000000000003 rbx=00000000e0434352 rcx=00000043cf7fe890
rdx=00007ffc95c570f8 rsi=0000000000000001 rdi=0000000000000005
rip=00007ffca6d0a859 rsp=00000043cf7fee80 rbp=00000043cf7ff8c0
r8=00000043cf7fe8a0 r9=00000043cf7fe8e0 r10=00007ffc95c5869a
r11=0000000000000000 r12=0000000000004000 r13=0000000000000001
r14=00000043cf7ff018 r15=000001bdf2856820
iopl=0 nv up ei pl nz na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206
KERNELBASE!RaiseException+0x69:
00007ffc`a6d0a859 0f1f440000 nop dword ptr [rax+rax]
Resetting default scope
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ffca6d0a859 (KERNELBASE!RaiseException+0x0000000000000069)
ExceptionCode: e0434352 (CLR exception)
ExceptionFlags: 00000001
NumberParameters: 5
Parameter[0]: ffffffff80070002
Parameter[1]: 0000000000000000
Parameter[2]: 0000000000000000
Parameter[3]: 0000000000000000
Parameter[4]: 00007ffc95c50000
PROCESS_NAME: Bookmark It.exe
EXCEPTION_CODE_STR: 80070002
MISSING_CLR_SYMBOL: 0
FAULTING_THREAD: ffffffff
STACK_TEXT:
00000000`00000000 00000000`00000000 Bookmark_It!unknown_function+0x0
SYMBOL_NAME: Bookmark_It!unknown_function
MODULE_NAME: Bookmark_It
IMAGE_NAME: Bookmark_It.exe
STACK_COMMAND: ** Pseudo Context ** ManagedPseudo ** Value: 1c6aeaf8000 ** ; kb
FAILURE_BUCKET_ID: CLR_EXCEPTION_System.IO.FileNotFoundException_80070002_Bookmark_It.exe!unknown_function
OS_VERSION: 10.0.18362.1
BUILDLAB_STR: 19h1_release
OSPLATFORM_TYPE: x64
OSNAME: Windows 10
FAILURE_ID_HASH: {a5664d34-b1e3-4381-2c19-1c19445e489e}
Followup: MachineOwner
---------
我真的无法从分析中得出任何结论。
MagicAndre1981 帮我调试了故障转储,显示了错误,
Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
由于 Microsoft 商店不再接受混合包(UWP + 桌面)二进制文件,我们必须将其包装在 Visual Studio 打包项目中。
将 visual studio 打包项目添加到解决方案后,我添加了我的 UWP 和桌面项目作为对它的引用。然后,我将我的应用服务和完全信任进程清单定义从 UWP 移动到新的 Package 项目的清单中。有关详细信息,请参阅 here。
进行这些更改后它起作用了!!
要调试此类问题,您应该生成故障转储。要做 Windows 的 this, you can use the Windows Error Reporting service。
为此打开 regedit.exe,转到 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
键。在这里您可以创建字符串 DumpFolder
来配置位置和 DWORD DumpType
来配置类型。这里将值设置为 2
以获得完整的内存转储。
这会配置全局设置,要为每个应用程序配置它,请使用此位置 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\MyApplication.exe
。
不,打开 Windbg.exe 中的转储,它是 Windows 10 SDK 的一部分,配置 和 运行 !analyze -v
。
对于显示 0xC000027B 错误的纯 UWP 应用程序,您应该 use PDE.dll extension to debug it.
我有一个 UWP 应用程序,其中捆绑了完全信任的 win32 表单应用程序。
我的项目结构是这样的
UWP App
Win32 Forms App (.NET Framework 4.7.2)
Sync Library (.NET Framework 4.7.2) - referred by Forms App
Domain Library (.NET Standard 2.0) - referred by both UWP App and Sync Library.
当我通过 visual studio 获得发布版本时,它工作正常。但是当相同的包发布到商店时,应用程序在启动时不断崩溃。我尝试通过订阅 App.UnhandledException 添加崩溃日志。但它没有被解雇。同样在商店健康报告中,它只是显示为“未知”。
在事件查看器中检查错误日志时,每次崩溃都会抛出两个错误,如下所列。
Source: .NET Runtime
Application: MyAppName.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code e06d7363, exception address 00007FFB4D3DA859
Stack:
另一个是
Source: Application Error
Faulting application name: MyAppName.exe, version: 1.0.0.0, time stamp: 0x5e922c6f
Faulting module name: KERNELBASE.dll, version: 10.0.18362.752, time stamp: 0x2023e189
Exception code: 0xe0434352
Fault offset: 0x000000000003a859
Faulting process id: 0x2f4c
Faulting application start time: 0x01d6109e2c207537
Faulting application path: C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 6cdeefcb-e2cb-4b77-ae28-1c0b54fb41ff
Faulting package full name: AppPackageFullName_0.5.22.0_x64__krk5891pf20rj
Faulting package-relative application ID: App
Windows 错误报告:
Version=1
EventType=MoAppCrash
EventTime=132311532032811137
ReportType=2
Consent=1
UploadTime=132311532035982658
ReportStatus=268435456
ReportIdentifier=0f767db9-4d2d-451f-acaa-efddb8b3225d
IntegratorReportIdentifier=67b702fb-992c-4ddf-b31e-eebfa70d328c
Wow64Host=34404
NsAppName=praid:App
OriginalFilename=MyAppName.exe
AppSessionGuid=000036c0-0001-01ab-f765-5d2aa310d601
TargetAppId=U:AppPackageFullName_0.5.22.0_x64__krk5891pf20rj!App
TargetAppVer=0.5.22.0_x64_!2020//04//11:20:45:35!0!MyAppName.exe
BootId=4294967295
ServiceSplit=1332998561
TargetAsId=1483
IsFatal=1
EtwNonCollectReason=4
Response.BucketId=d5c24af9f45a79f600894a99f9fb0fc3
Response.BucketTable=5
Response.LegacyBucketId=1191565601600638915
Response.type=4
Sig[0].Name=Package Full Name
Sig[0].Value=AppPackageFullName_0.5.22.0_x64__krk5891pf20rj
Sig[1].Name=Application Name
Sig[1].Value=praid:App
Sig[2].Name=Application Version
Sig[2].Value=1.0.0.0
Sig[3].Name=Application Timestamp
Sig[3].Value=5e922c6f
Sig[4].Name=Fault Module Name
Sig[4].Value=KERNELBASE.dll
Sig[5].Name=Fault Module Version
Sig[5].Value=10.0.18362.752
Sig[6].Name=Fault Module Timestamp
Sig[6].Value=2023e189
Sig[7].Name=Exception Code
Sig[7].Value=e0434352
Sig[8].Name=Exception Offset
Sig[8].Value=000000000003a859
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.18362.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=16393
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=ab6f
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=ab6f94a45a680442bf911fba1b09d517
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=7e29
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=7e29e5215127ef7af2317cd3c1a7d6cf
UI[2]=C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
LoadedModule[0]=C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNEL32.dll
LoadedModule[4]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[5]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[6]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[7]=C:\WINDOWS\System32\sechost.dll
LoadedModule[8]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[9]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
LoadedModule[10]=C:\WINDOWS\System32\SHLWAPI.dll
LoadedModule[11]=C:\WINDOWS\System32\combase.dll
LoadedModule[12]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[13]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[14]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[15]=C:\WINDOWS\System32\win32u.dll
LoadedModule[16]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[17]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[18]=C:\WINDOWS\System32\USER32.dll
LoadedModule[19]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[20]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[21]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[22]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
LoadedModule[23]=C:\WINDOWS\SYSTEM32\ucrtbase_clr0400.dll
LoadedModule[24]=C:\WINDOWS\SYSTEM32\VCRUNTIME140_CLR0400.dll
LoadedModule[25]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[26]=C:\WINDOWS\System32\ole32.dll
LoadedModule[27]=C:\WINDOWS\System32\psapi.dll
LoadedModule[28]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\mscorlib\cea8b8fbc469dcbc6224d523a578e4b3\mscorlib.ni.dll
LoadedModule[29]=C:\WINDOWS\SYSTEM32\WinTypes.dll
LoadedModule[30]=C:\WINDOWS\System32\CRYPTSP.dll
LoadedModule[31]=C:\WINDOWS\system32\rsaenh.dll
LoadedModule[32]=C:\WINDOWS\System32\bcrypt.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
LoadedModule[34]=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
LoadedModule[35]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Runtime\ecf16dcbbc95961331f8ec542cb7c3d9\System.Runtime.ni.dll
LoadedModule[36]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\System.Runtbff93e24#fd43d0605b1366bc071e2bbdde312cf\System.Runtime.InteropServices.WindowsRuntime.ni.dll
LoadedModule[37]=C:\Windows\System32\MrmCoreR.dll
LoadedModule[38]=C:\WINDOWS\System32\shcore.dll
LoadedModule[39]=C:\WINDOWS\SYSTEM32\windows.staterepositorycore.dll
LoadedModule[40]=C:\WINDOWS\System32\profapi.dll
LoadedModule[41]=C:\Windows\System32\Windows.UI.dll
LoadedModule[42]=C:\WINDOWS\SYSTEM32\TextInputFramework.dll
LoadedModule[43]=C:\WINDOWS\SYSTEM32\InputHost.dll
LoadedModule[44]=C:\WINDOWS\SYSTEM32\CoreUIComponents.dll
LoadedModule[45]=C:\WINDOWS\SYSTEM32\CoreMessaging.dll
LoadedModule[46]=C:\WINDOWS\SYSTEM32\ntmarta.dll
LoadedModule[47]=C:\WINDOWS\SYSTEM32\PROPSYS.dll
LoadedModule[48]=C:\WINDOWS\SYSTEM32\bcp47mrm.dll
LoadedModule[49]=C:\WINDOWS\system32\uxtheme.dll
LoadedModule[50]=C:\Windows\System32\twinapi.appcore.dll
LoadedModule[51]=C:\WINDOWS\SYSTEM32\RMCLIENT.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
OsInfo[0].Key=vermaj
OsInfo[0].Value=10
OsInfo[1].Key=vermin
OsInfo[1].Value=0
OsInfo[2].Key=verbld
OsInfo[2].Value=18362
OsInfo[3].Key=ubr
OsInfo[3].Value=753
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=1033
OsInfo[7].Key=geoid
OsInfo[7].Value=113
OsInfo[8].Key=sku
OsInfo[8].Value=48
OsInfo[9].Key=domain
OsInfo[9].Value=1
OsInfo[10].Key=prodsuite
OsInfo[10].Value=256
OsInfo[11].Key=ntprodtype
OsInfo[11].Value=1
OsInfo[12].Key=platid
OsInfo[12].Value=10
OsInfo[13].Key=sr
OsInfo[13].Value=0
OsInfo[14].Key=tmsi
OsInfo[14].Value=468257
OsInfo[15].Key=osinsty
OsInfo[15].Value=1
OsInfo[16].Key=iever
OsInfo[16].Value=11.719.18362.0-11.0.180
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=32503
OsInfo[19].Key=svolsz
OsInfo[19].Value=169
OsInfo[20].Key=wimbt
OsInfo[20].Value=0
OsInfo[21].Key=blddt
OsInfo[21].Value=190318
OsInfo[22].Key=bldtm
OsInfo[22].Value=1202
OsInfo[23].Key=bldbrch
OsInfo[23].Value=19h1_release
OsInfo[24].Key=bldchk
OsInfo[24].Value=0
OsInfo[25].Key=wpvermaj
OsInfo[25].Value=0
OsInfo[26].Key=wpvermin
OsInfo[26].Value=0
OsInfo[27].Key=wpbuildmaj
OsInfo[27].Value=0
OsInfo[28].Key=wpbuildmin
OsInfo[28].Value=0
OsInfo[29].Key=osver
OsInfo[29].Value=10.0.18362.753.amd64fre.19h1_release.190318-1202
OsInfo[30].Key=buildflightid
OsInfo[30].Value=36b36b71-1da5-4320-8877-4d60bb3d78e6
OsInfo[31].Key=edition
OsInfo[31].Value=Professional
OsInfo[32].Key=ring
OsInfo[32].Value=Retail
OsInfo[33].Key=expid
OsInfo[34].Key=containerid
OsInfo[35].Key=containertype
OsInfo[36].Key=edu
OsInfo[36].Value=0
FriendlyEventName=Stopped working
ConsentKey=MoAppCrash
AppName=MyAppName
AppPath=C:\Program Files\WindowsApps\AppPackageFullName_0.5.22.0_x64__krk5891pf20rj\MyAppName.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=C9FF5F66D2724FC9A354189F5DB43763
MetadataHash=-1857492785
如何解决这个错误?
使用 WinDbg 进行故障转储分析
0:000> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
*** WARNING: Unable to verify checksum for Bookmark It.exe
DEBUG_FLR_EXCEPTION_CODE(80070002) and the ".exr -1" ExceptionCode(e0434352) don't match
KEY_VALUES_STRING: 1
Key : Analysis.CPU.Sec
Value: 12
Key : Analysis.DebugAnalysisProvider.CPP
Value: Create: 8007007e on KUMAR-4031
Key : Analysis.DebugData
Value: CreateObject
Key : Analysis.DebugModel
Value: CreateObject
Key : Analysis.Elapsed.Sec
Value: 84
Key : Analysis.Memory.CommitPeak.Mb
Value: 147
Key : Analysis.System
Value: CreateObject
Key : CLR.Engine
Value: CLR
Key : CLR.System.IO.FileNotFoundException._fileName
Value: System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Key : CLR.System.IO.FileNotFoundException._message
Value: Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Key : CLR.Version
Value: 4.0.30319.0
Key : Timeline.OS.Boot.DeltaSec
Value: 855
Key : Timeline.Process.Start.DeltaSec
Value: 2
ADDITIONAL_XML: 1
NTGLOBALFLAG: 0
PROCESS_BAM_CURRENT_THROTTLED: 0
PROCESS_BAM_PREVIOUS_THROTTLED: 0
APPLICATION_VERIFIER_FLAGS: 0
CONTEXT: (.ecxr)
rax=0000000000000003 rbx=00000000e0434352 rcx=00000043cf7fe890
rdx=00007ffc95c570f8 rsi=0000000000000001 rdi=0000000000000005
rip=00007ffca6d0a859 rsp=00000043cf7fee80 rbp=00000043cf7ff8c0
r8=00000043cf7fe8a0 r9=00000043cf7fe8e0 r10=00007ffc95c5869a
r11=0000000000000000 r12=0000000000004000 r13=0000000000000001
r14=00000043cf7ff018 r15=000001bdf2856820
iopl=0 nv up ei pl nz na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000206
KERNELBASE!RaiseException+0x69:
00007ffc`a6d0a859 0f1f440000 nop dword ptr [rax+rax]
Resetting default scope
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ffca6d0a859 (KERNELBASE!RaiseException+0x0000000000000069)
ExceptionCode: e0434352 (CLR exception)
ExceptionFlags: 00000001
NumberParameters: 5
Parameter[0]: ffffffff80070002
Parameter[1]: 0000000000000000
Parameter[2]: 0000000000000000
Parameter[3]: 0000000000000000
Parameter[4]: 00007ffc95c50000
PROCESS_NAME: Bookmark It.exe
EXCEPTION_CODE_STR: 80070002
MISSING_CLR_SYMBOL: 0
FAULTING_THREAD: ffffffff
STACK_TEXT:
00000000`00000000 00000000`00000000 Bookmark_It!unknown_function+0x0
SYMBOL_NAME: Bookmark_It!unknown_function
MODULE_NAME: Bookmark_It
IMAGE_NAME: Bookmark_It.exe
STACK_COMMAND: ** Pseudo Context ** ManagedPseudo ** Value: 1c6aeaf8000 ** ; kb
FAILURE_BUCKET_ID: CLR_EXCEPTION_System.IO.FileNotFoundException_80070002_Bookmark_It.exe!unknown_function
OS_VERSION: 10.0.18362.1
BUILDLAB_STR: 19h1_release
OSPLATFORM_TYPE: x64
OSNAME: Windows 10
FAILURE_ID_HASH: {a5664d34-b1e3-4381-2c19-1c19445e489e}
Followup: MachineOwner
---------
我真的无法从分析中得出任何结论。
MagicAndre1981 帮我调试了故障转储,显示了错误,
Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
由于 Microsoft 商店不再接受混合包(UWP + 桌面)二进制文件,我们必须将其包装在 Visual Studio 打包项目中。
将 visual studio 打包项目添加到解决方案后,我添加了我的 UWP 和桌面项目作为对它的引用。然后,我将我的应用服务和完全信任进程清单定义从 UWP 移动到新的 Package 项目的清单中。有关详细信息,请参阅 here。 进行这些更改后它起作用了!!
要调试此类问题,您应该生成故障转储。要做 Windows 的 this, you can use the Windows Error Reporting service。
为此打开 regedit.exe,转到 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
键。在这里您可以创建字符串 DumpFolder
来配置位置和 DWORD DumpType
来配置类型。这里将值设置为 2
以获得完整的内存转储。
这会配置全局设置,要为每个应用程序配置它,请使用此位置 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\MyApplication.exe
。
不,打开 Windbg.exe 中的转储,它是 Windows 10 SDK 的一部分,配置 !analyze -v
。
对于显示 0xC000027B 错误的纯 UWP 应用程序,您应该 use PDE.dll extension to debug it.