問題描述
我正在開發一個應用程序,我在其中顯示用戶在 PDF 文件中輸入的數據.PDF 文件也是動態創建的.
I am working on an app, where I display the data entered by user in a PDF file. PDF File is also created dynamically.
這一切都很好.
我已經實現了 QuickLook 框架來顯示 pdf 文件.當我調用 QL 框架時,PDF 文件 id 顯示得很好,但是當返回調用屏幕時,我的應用程序崩潰了,沒有任何崩潰日志或內存警告.
I have implemented QuickLook framework to display the pdf file. When I call the QL framework, PDF file id displayed quite fine but when come back to the calling screen, my app crashes without any crash log or memory warnings.
我正在使用以下代碼調用 QL:
I am calling QL with below code:
[[self navigationController] presentModalViewController:qlPreviewer animated:YES];
創建的日志是
DiskImageCache: Could not resolve the absolute path of the old directory.
[Switching to process 3070 thread 0x17603]
[Switching to process 3070 thread 0x15503]
這很有趣.....當我在 Instruments 中運行相同的程序來檢查泄漏和內存管理時,我只能在滾動 PDF 文檔并查看所有頁面時發現泄漏.但是,有趣的是,我沒有看到任何應用程序崩潰.另外,我確實嘗試了 ZombieEnabled = YES
并且沒有它但沒有使用 Instruments 的應用程序崩潰.
This is quite interesting.....
When I run the same program in Instruments to check for leaks and Memory Management, i can only find leaks when PDF document is scrolled and all the pages are viewed.
However, interestingly there is no app crash that I can see.
Also, I did try with ZombieEnabled = YES
and without it but no app crash with Instruments.
我對如何解釋這個問題一無所知,并且一直在嘗試不同的方法來解決這個問題.另外,我也試過 UIWebView 但結果是一樣的.
I am quite clueless on how to interpret this and have been trying different things to solve this. Also, I have tried UIWebView but the result is the same.
我再次嘗試檢查問題并發現了一些有趣的東西.當我直接從 X-Code 執行代碼時 - 如上所述,我遇到了崩潰.
I was again trying something to check out the issue and found something interesting. When i execute the code directly from X-Code - i get the crash in as explained above.
在其他情況下,如果我通過單擊 sim 中的應用程序來執行應用程序...不會崩潰
In other instance, if I execute the app by clicking on the app in the sim... no crash
我還沒有在設備上檢查這個.有人可以確認設備上的崩潰嗎?
I am yet to check this on device. Can someone confirm the crash on the device?
此外,谷歌沒有這個問題的答案.
Also, Google does not have answer to this question.
提前感謝您的回答.任何人都可以對此有所了解嗎?
Thanks in advance for your answers. Can anyone shed some light on this?
推薦答案
我也遇到了同樣的問題.
I'm having the exact same issue.
作為一種解決方法,您可以禁用或刪除所有異常"斷點.這可能會使調試變得更加困難,但它并不像必須一直重新啟動應用程序那樣糟糕.
As a workaround, you can disable or remove your 'All Exceptions' breakpoint. This might make debugging a little more difficult, but it's not as bad as having to relaunch the application all the time.
這是導致問題的斷點.我很久以前就設置了它,以至于我忘記了它在那里
This is the breakpoint causing the issue. I had set it so long ago that I'd forgotten it was there
這篇關于應用程序崩潰 - “DiskImageCache:無法解析舊目錄的絕對路徑."的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!