FileNotFoundException异常在Windows 10通用应用程序(UAP) [英] FileNotFoundException in Windows 10 Universal App (UAP)

查看:227
本文介绍了FileNotFoundException异常在Windows 10通用应用程序(UAP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制定并公布一个Windows通用应用程序。要跟踪异常和应用程序使用我启用应用见解,我可以用下面的调用堆栈找到FileNotFoundException异常的有:

 在Mindapp! < BaseAddress> + 0x6e58d1 
在Mindapp<!BaseAddress> + 0x6ee2a4
在Mindapp<!BaseAddress> + 0x86bd63
---从以前的位置堆栈跟踪,其中引发异常结束---
在Mindapp<!BaseAddress> + 0x6e58d1
在Mindapp<!BaseAddress> + 0x6ee2a4
在Mindapp<!BaseAddress> + 0x86d250
---结束!从以前的位置LT堆栈跟踪,其中引发异常---
在Mindapp及的; BaseAddress> + 0x6e58d1
在Mindapp<!BaseAddress> + 0x6ee2a4
在Mindapp<!BaseAddress> + 0x880c5e
---从以前的位置LT堆栈跟踪,其中引发异常---
在Mindapp&结束;!BaseAddress> + 0x6e58d1
在Mindapp<!BaseAddress> + 0x6ee2a4
。在Mindapp<!BaseAddress> + 0x8b3663
---从以前的位置LT堆栈跟踪,其中引发异常---
在Mindapp&结束;!BaseAddress> + 0x6e58d1
在Mindapp<!BaseAddress> + 0x6ee2a4
在Mindapp<!BaseAddress> + 0x883601
---从以前的位置,引发异常---在Mindapp
堆栈跟踪结束! < BaseAddress> + 0x6e58d1
在Mindapp<!BaseAddress> + 0x6ee17e
在Mindapp<!BaseAddress> + 0x7d6276

不幸的是,我没有更多的信息。有没有窍门,以获取有关此异常的更多详细信息?


解决方案

部署时,UWP应用程序被编译为本地.NET。为了把上面的回有用的东西,你需要像此处的 https://social.msdn.microsoft.com/Forums/en-US/529e6655-bbf2-4ffa-8dcb- b2691327c389 /如何到翻译-堆栈踪迹 - 从净本地




有不幸的是不是一个伟大的自动解如果你已经是在它的地址的堆栈跟踪。




 <:您可以通过打开您的应用程序的DLL作为一个场使用本地Windows调试器手动解码信息code>的WinDbg -z Your.App.dll 




您然后可以发出LM命令来查找在调试器DLL的基址,并ln命令翻译+每偏移位置回符号(假设你已经在PDB方便)。




  0:000> LM米My.App 
开始结束模块名称
00000000`00400000 00000000`00a08000 My.App C(私人PDB符号)My.App.pdb

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




这是一个有点乏味,但它应该完成这项工作。



I developed and published a Windows Universal App. To track exceptions and the app usage I enabled Application Insights and I can find FileNotFoundException's there with the following Call Stack:

   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

Unfortunately I do not have more information. Is there a trick to get more details about this exception?

解决方案

when deployed, the UWP app is compiled as .net native. in order to turn the above back into something useful, you'll need something like here: https://social.msdn.microsoft.com/Forums/en-US/529e6655-bbf2-4ffa-8dcb-b2691327c389/how-to-translate-stack-traces-from-net-native

There's unfortunately not a great automatic solution if all you have is the stack trace with the addresses in it. You can manually decode the information using the native Windows debuggers by opening up your application dll as a "dump":

windbg -z Your.App.dll

You can then issue the lm command to find the base address of the DLL in the debugger, and the ln command to translate each of +offset locations back to a symbol (assuming you have the PDB handy).

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

It's a bit tedious but it should get the job done.

这篇关于FileNotFoundException异常在Windows 10通用应用程序(UAP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆