As Juan noted, the first stop is Debugger - what gives a debug window for stack tracing when the application crashes? You should be able to see the line in which it crashed ... you said in a comment on one answer that you saw how an accident occurs around the lines:
CGPDFDocumnetRef docA=CGPDFDocumentCreatWithURL(myurl); CGPDFDocumnetRef docB=CGPDFDocumentCreatWithURL(myurl);
Are you really using the same URL object for both calls? Which line exactly?
It may be something around how you use CGPDFDocumentRef, you can find a sample code of how Apple uses them in the QuartzDemo project, the QuartzImageDrawing.m file (you can find a demo project from the developer's portal or built-in iPhone documentation with Xcode).
Xcode is actually quite powerful, but it is different from other IDEs.
Kendall helmstetter gelner
source share