Windows 10 Universal App(UAP)中的FileNotFoundException

时间:2015-11-06 17:31:01

标签: c# win-universal-app azure-application-insights

我开发并发布了Windows通用应用程序。为了跟踪异常和应用程序使用情况,我启用了Application Insights,我可以使用以下调用堆栈找到FileNotFoundException:

   at Mindapp!<BaseAddress>+0x6e58d1
   at Mindapp!<BaseAddress>+0x6ee2a4
   at Mindapp!<BaseAddress>+0x86bd63
--- End of stack trace from previous location where exception was thrown ---
   at Mindapp!<BaseAddress>+0x6e58d1
   at Mindapp!<BaseAddress>+0x6ee2a4
   at Mindapp!<BaseAddress>+0x86d250
--- End of stack trace from previous location where exception was thrown ---
   at Mindapp!<BaseAddress>+0x6e58d1
   at Mindapp!<BaseAddress>+0x6ee2a4
   at Mindapp!<BaseAddress>+0x880c5e
--- End of stack trace from previous location where exception was thrown ---
   at Mindapp!<BaseAddress>+0x6e58d1
   at Mindapp!<BaseAddress>+0x6ee2a4
   at Mindapp!<BaseAddress>+0x8b3663
--- End of stack trace from previous location where exception was thrown ---
   at Mindapp!<BaseAddress>+0x6e58d1
   at Mindapp!<BaseAddress>+0x6ee2a4
   at Mindapp!<BaseAddress>+0x883601
--- End of stack trace from previous location where exception was thrown ---
   at Mindapp!<BaseAddress>+0x6e58d1
   at Mindapp!<BaseAddress>+0x6ee17e
   at Mindapp!<BaseAddress>+0x7d6276

不幸的是我没有更多信息。是否有一个技巧可以获得有关此异常的更多详细信息?

1 个答案:

答案 0 :(得分:1)

部署后,UWP应用程序将编译为.net native。为了将上面的内容变回有用的东西,你需要这样的东西:https://social.msdn.microsoft.com/Forums/en-US/529e6655-bbf2-4ffa-8dcb-b2691327c389/how-to-translate-stack-traces-from-net-native

  

遗憾的是,如果只有堆栈跟踪及其中的地址,则不是一个很好的自动解决方案。您可以使用本机Windows调试程序手动解码信息,方法是将应用程序dll打开为“转储”:

windbg -z Your.App.dll
  

然后,您可以发出lm命令以在调试器中查找DLL的基址,并使用ln命令将每个+偏移位置转换回符号(假设您有方便的PDB)。

0:000> lm m My.App
start             end                 module name
00000000`00400000 00000000`00a08000   My.App   C (private pdb symbols)  My.App.pdb

0:000> ln 0x00400000+0x00021cc4
(00000000`00421cc4)   My.App!RHBinder__DllMain
  

这有点乏味,但它应该完成工作。