App crash - “DiskImageCache: Could not resolve the

2020-02-26 04:53发布

I am working on an app, where I display the data entered by user in a PDF file. PDF File is also created dynamically.

All this is fine.

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.

I am calling QL with below code:

[[self navigationController] presentModalViewController:qlPreviewer animated:YES];

logs created are

DiskImageCache: Could not resolve the absolute path of the old directory.
[Switching to process 3070 thread 0x17603]
[Switching to process 3070 thread 0x15503]

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.

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.

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.

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?

8条回答
狗以群分
2楼-- · 2020-02-26 05:32

This could happen when you delete the object reference in code but having its reference in xib. Delete the outlet that you no longer need.

查看更多
Juvenile、少年°
3楼-- · 2020-02-26 05:39

Deleting application from device helped me to solve this problem. Maybe also at first you should try "Product > Clean" to ensure that all resources will be copied to your device.

查看更多
▲ chillily
4楼-- · 2020-02-26 05:39

@JimP, It isn't an iOS 5.1 bug. It has just started happening to my app as well, on iOS5.0. It seems to only affect pdfs of more than one page length, and seems to trigger most commonly on scrolling past the end of the document (although sometimes earlier also). It also seems to happen more often on a second load.

查看更多
放荡不羁爱自由
5楼-- · 2020-02-26 05:39

I don't know if it's the same problem but I had an issue where switching from a PDF view to another more than three times via the tab bar controller caused a crash.

Turned out that embedding the views I was switching to within Navigation controllers put a stop to the crashing.

查看更多
走好不送
6楼-- · 2020-02-26 05:43

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.

The breakpoint causing the issue

This is the breakpoint causing the issue. I had set it so long ago that I'd forgotten it was there

查看更多
你好瞎i
7楼-- · 2020-02-26 05:49

I was able to fix mine with this code:

FirstViewController.h

NSURLRequest* reqObj;
@property(nonatomic, retain) NSURLRequest* reqObj;

FirstViewController.m

reqObj = [NSURLRequest requestWithUrl:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0];

NSURLConnection* conn = [[NSURLConnection alloc] initWithRequest:reqObj delegate:self];

then instead of loading it on my view after this line i waited for the connectionDidFinishLoading then load it to my view

查看更多
登录 后发表回答