Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crash - "DiskImageCache: Could not resolve the absolute path of the old directory."

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?

like image 387
Kunjal Avatar asked May 04 '12 11:05

Kunjal


4 Answers

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

like image 126
andypaxo Avatar answered Oct 26 '22 13:10

andypaxo


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.

like image 23
Kibernetik Avatar answered Oct 26 '22 11:10

Kibernetik


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

like image 41
n0minal Avatar answered Oct 26 '22 12:10

n0minal


Interesting: This has just started with my app too. No errors when checking for leaks but running the app in the sim actually is causing a Breakpoint, not a crash. I can hit the continue and the app keeps running, no problem.
My issue also is relating to a PDF, but I'm just using a web view to display a PDF from the app bundle. I've checked everything in the dealloc, it's all good, this may be a iOS 5.1 bug. I will update as I learn more.

like image 2
JimP Avatar answered Oct 26 '22 13:10

JimP