PDFiumCore icon indicating copy to clipboard operation
PDFiumCore copied to clipboard

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Open juhani-honkala opened this issue 9 months ago • 0 comments

Version 126.0.6462

Some PDFs render well, but with some others, I get error like:

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at PdfLibCore.Pdfium+PlatformInvoke.FPDF_RenderPageBitmap(PdfLibCore.Types.FPDF_BITMAP, PdfLibCore.Types.FPDF_PAGE, Int32, Int32, Int32, Int32, PdfLibCore.Enums.PageOrientations, PdfLibCore.Enums.RenderingFlags)

at PdfLibCore.Pdfium.FPDF_RenderPageBitmap(PdfLibCore.Types.FPDF_BITMAP, PdfLibCore.Types.FPDF_PAGE, Int32, Int32, Int32, Int32, PdfLibCore.Enums.PageOrientations, PdfLibCore.Enums.RenderingFlags) at PdfLibCore.PdfPage.Render(PdfLibCore.PdfiumBitmap, System.ValueTuple`4<Int32,Int32,Int32,Int32>, PdfLibCore.Enums.PageOrientations, PdfLibCore.Enums.RenderingFlags) at PdfLibCore.PdfPage.Render(PdfLibCore.PdfiumBitmap, PdfLibCore.Enums.PageOrientations, PdfLibCore.Enums.RenderingFlags)

If I reduce the resolution of the rendered image the problem is usually fixed. The pages which has this issue, seem to have nothing special in them, even almost empty ones with few lines of text. It seems that resolutions like 512x512 is processed ok, but 1024x1024 shows this issue.

juhani-honkala avatar May 15 '24 18:05 juhani-honkala