Hello,
When we try to use the WPF PDF viewer to view certain PDFs, the viewer crashes with the stack trace below. We've attached an example to the post. Any help would be appreciated. This happens with the 4.19 version of the SDK.
Thank you!
Patagames.Pdf.Net.Exceptions.FatalErrorException
HResult=0x80131500
Message=Fatal runtime error.
Source=Patagames.Pdf
StackTrace:
at Patagames.Pdf.Pdfium.FPDF_RenderPageBitmap_Start(IntPtr bitmap, IntPtr page, Int32 start_x, Int32 start_y, Int32 size_x, Int32 size_y, PageRotate rotate, RenderFlags flag, IFSDK_PAUSE pause)
at Patagames.Pdf.Net.PdfPage.StartProgressiveRender(PdfBitmap bitmap, Int32 x, Int32 y, Int32 width, Int32 height, PageRotate rotate, RenderFlags flags, Byte[] userData)
at Patagames.Pdf.Net.Controls.Wpf.PRCollection.ProcessExisting(PdfBitmap bitmap, PdfPage page, Int32Rect pageRect, PageRotate pageRotate, RenderFlags renderFlags)
at Patagames.Pdf.Net.Controls.Wpf.PRCollection.RenderPage(PdfPage page, Int32Rect pageRect, PageRotate pageRotate, RenderFlags renderFlags, Boolean useProgressiveRender)
at Patagames.Pdf.Net.Controls.Wpf.PdfViewer.DrawPage(PdfBitmap bitmap, PdfPage page, Rect actualRect)
at Patagames.Pdf.Net.Controls.Wpf.PdfViewer.OnRender(DrawingContext drawingContext)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at JW.Document.Previewer.Example.App.Main()
Inner Exception 1:
AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Form.PDF
(30kb) downloaded 2 time(s).Edited by user Wednesday, October 30, 2019 7:24:53 AM(UTC)
| Reason: Not specified