#1 Re: PDF Engine » Access violation in TSynAnsiFixedWidth.WideCharToAnsiChar() » 2015-05-20 17:27:23

I resolved the issue in my code - memory was getting stomped and it wasn't showing up until the PDF was trying to be created. 8+ hours of debugging, and at least I have a working product now. ;>

Alan

#2 Re: PDF Engine » Access violation in TSynAnsiFixedWidth.WideCharToAnsiChar() » 2015-05-20 13:53:38

I've tried both the latest stable and latest nightly builds (I am using SynPdf.zip, not the entire framework) - same problem occurs with both. I'm compiling under Delphi XE3, targeting the 32-bit platform.

Alan

#3 PDF Engine » Access violation in TSynAnsiFixedWidth.WideCharToAnsiChar() » 2015-05-19 23:00:02

alank
Replies: 4

I've got a bedevilling error that is simply driving me nuts. We have a two (2) products that generate a single page PDF form as output, one a desktop Windows application, and the other is it's web based equivalent (an ISAPI DLL). This page contains text and some rounded rectangles, but is not graphics nor memory intensive.

In the web based product, I am experiencing an access violation in TSynAnsiFixedWidth.WideCharToAnsiChar(). It appears as if the fAnsiToWide dynamic array is not available or hasn't been defined yet. The relevant stack trace is:

SynCommons.TSynAnsiFixedWidth.WideCharToAnsiChar(32)
SynPdf.TPdfFontTrueType.GetWideCharWidth(' ')
SynPdf.TPdfCanvas.UnicodeTextWidth(' ')
SynPdf.TPdfEnum.TextOut($530B5B4)
SynPdf.EnumEMFFunc(587271252,((71703579)),$530B5B4,4,$5DB71F0)
:750559b4 ; C:\Windows\syswow64\GDI32.dll
SynPdf.TPdfCanvas.RenderMetaFile(???,1,0,0,???,99,99)

The desktop Windows application functions fine, and the web based application also functions well under certain configurations. Are there any memory considerations I should heed when using SynPDF in an ISAP DLL? Would using TPdfDocument instead of TPdfDocumentGDI be less of a memory burden?

Thanks much for any light you might be able to shed on this,
  Alan

Board footer

Powered by FluxBB