2015-11-06 43 views
2

我開發併發布了Windows通用應用程序。爲了跟蹤異常和應用使用我啓用應用見解,我可以找到FileNotFoundException異常的存在與以下調用堆棧:Windows 10通用應用程序(UAP)中的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 

不幸的是,我沒有更多的信息。有沒有一種方法可以獲得關於這個異常的更多細節?

+0

我一直都在使用AI,所以最關鍵的是要確保從一開始就編寫好的代碼,例如,你的代碼應該被封裝在try/catch塊中。然後你可以自己創建一個異常併發送給AI,這樣你就可以控制發生了什麼,在哪裏,用戶信息等,但是你也在處理這個錯誤。這看起來對我來說像一個未處理的異常,編譯代碼 – davethecoder

+0

我的應用程序就像一個圖編輯器,我不明白每一個操作。這就是爲什麼有全局異常處理程序的原因,不是嗎? – SebastianStehle

+0

我會假設,filenotfound異常將來自於一段代碼,它說明與打開一個文件有關,我的猜測是,這是一個函數/方法。該代碼應該被包裝,你基本上冒出了你的錯誤,遠離創建它的方法,並最終廢話,因爲它沒有處理。我的應用程序是爲XXX不是沒有處理錯誤的藉口,特別是當你想對錯誤進行分析時 – davethecoder

回答

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

有遺憾的是不是一個偉大的自動化解決方案,如果你已經是在它的地址的堆棧跟蹤。

windbg -z Your.App.dll 

然後,您可以發出LM命令來查找DLL的基地址:您可以通過打開您的應用程序的DLL作爲一個「場」使用本地Windows調試器手動解碼信息調試器和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 

這是一個有點乏味,但它應該完成這項工作。

相關問題