CoreGraphics.CGContext.DrawPDFPage causes a crash when opening a raster PDF in iOS 10

CaseyHancockCaseyHancock USMember ✭✭
edited December 2016 in Xamarin.iOS

Whenever I call CoreGraphics.CGContext.DrawPDFPage() with a raster (scanned) pdf I immediately get a crash in iOS 10. The same pdf does not cause a crash on an iOS 9 device. The error is a SIGSEV:

Got a SIGSEGV while executing native code. This usually indicates fatal error in the mono runtime or one of the native libraries used by your application.

However, if I set my linker to "Don't link" the pdf opens fine. When it is set to "link all" or "link framework sdks only" I get the crash. I can't switch to "don't link" due to app size constaints, so I tried adding "--linkskip=Xamarin.iOS" to the additional mtouch arguments, but then I got an error when building:

Error: System.IO.FileNotFoundException <filepath>.nib does not exist.

Is there a bug in DrawPDFPage? Is it possible to linkskip Xamarin.iOS? If so, what can I do to fix the FileNotFoundException?

Best Answer

Answers

Sign In or Register to comment.