AV Embedding Fonts into PDF
I am getting an Access Violation when choosing embedding fonts into a PDF. I am using XE 7 and Fast Reports 5.1.7
I did not realize it had that bug until I pushed an app out to production. Unfortunately I have upgraded to XE7 and have no way of going back (without many hours of work)
I did not realize it had that bug until I pushed an app out to production. Unfortunately I have upgraded to XE7 and have no way of going back (without many hours of work)
Comments
Try to build for release without optimizations.
There is a issues with GetGlobalFont() function in frxExportPDF.pas.
I have reported this but someone there said this is not an issue.
From docwiki: http://docwiki.embarcadero.com/RADStudio/X...#For_Statements
There you can read:
"After the for statement terminates (provided this was not forced by a Break or an Exit procedure), the value of counter is undefined."
The AV is nil, not an address, so it might be either an unintialized variable or an already freed object from FreeAndNil() or low level stuff accessing invalid data. I do not have source code so I do not know. Just trying to help.
CPU:
<unknown file>.203:
01364A75 8B45FC mov eax,[ebp-$04]
I have same problem too.
I get problem only with property PDFExport1.EmbebdedFont set to True
Debug Window screenshot after break program is attached.
Debug Window at line before Exception is attached.
I will want to try to reproduce with your font. You can put a breakpoint in frxTrueTypeCollection at line 170 Name := font.Name; and see all font names. I need the font name that will raise exception after you see the name.
My priority is embedded FontName 'Arial Narrow' like used condensed font.
OS: Windows 7 x64 CZ. Problem have all users of My Application.
With Fast Report 4 works OK !
Base simple sample project attached.
FastReport 5.1.8. Ent. I use compiled from source.
I do not have now "Arial Narrow" to test with because it comes with MS Office or other paid way.
If you comment following line in TfrxPDFFont.Create() you will avoid this error but the file will be ten times bigger:
PackFont := true;
Have you tried to open a support ticket at FastReport?
I tested with version 5.1.12 and it worked perfectly.