Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pdf 随机崩溃_Pdf_Xamarin.ios_Dispose_Cgpdfdocument_Cfstring - Fatal编程技术网

Pdf 随机崩溃

Pdf 随机崩溃,pdf,xamarin.ios,dispose,cgpdfdocument,cfstring,Pdf,Xamarin.ios,Dispose,Cgpdfdocument,Cfstring,我试图在Monotouch中创建pdf的缩略图,但应用程序有时会崩溃并抛出以下错误 Stacktrace: at MonoTouch.CoreFoundation.CFString.Dispose () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/CoreFoundation/CFString.cs:131 at MonoTouch.CoreFoundation.CFUrl.FromFile (string) [0x

我试图在Monotouch中创建pdf的缩略图,但应用程序有时会崩溃并抛出以下错误

Stacktrace:

at MonoTouch.CoreFoundation.CFString.Dispose () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/CoreFoundation/CFString.cs:131
at MonoTouch.CoreFoundation.CFUrl.FromFile (string) [0x00048] in /Developer/MonoTouch/Source/monotouch/src/shared/CoreFoundation/CFUrl.cs:79 at MonoTouch.CoreGraphics.CGPDFDocument.FromFile (string) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/shared/CoreGraphics/CGPDFDocument.cs:98
下面是我生成缩略图的代码,它们位于BackgroundWorker线程的内部。奇怪的是,这种情况并不总是发生。 有人知道为什么会这样吗? 提前谢谢

试试看
{

CGPDFDocument pdfDoc=CGPDFDocument.FromFile(url); 如果(pdfDoc!=null) { CGPDFPage pdfPage=pdfDoc.GetPage(1); 如果(pdfPage!=null) { UIImage image=PDFConverter.TransformToImage(pdfPage,this.Frame.Width); } } } 捕获(例外情况除外) { WriteLine(“BookmarkView-BookmarkView:{0}”,例如ToString()); }
您能否提交一份bug报告()并附上符号化的崩溃报告。它将有更多的细节(例如关于其他线程正在做什么)。堆栈跟踪与上面的代码位不对应。它引用了CFUrl,但您的代码段没有CGPDFDocument pdfDoc=CGPDFDocument.FromFile(url);是它引用CFUrl和CFUrl引用CFString的行。