FileNotFoundException in Windows 10 Universal App (UAP)

寵の児 提交于 2019-12-08 00:51:17

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/33572396/filenotfoundexception-in-windows-10-universal-app-uap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!