View Issue Details

IDProjectCategoryView StatusLast Update
0021456Lazarus-public2020-05-12 20:12
ReporterFelipe Monteiro de Carvalho Assigned Tocircular  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Fixed in Version2.2 
Summary0021456: [LazFreeType] Exception reading the font C:\Windows\Fonts\ahronbd.ttf
DescriptionSteps to reproduce:

1->Open the project lazarus/examples/androidlcl/nonandroidtest.lpi
2->Open the file lazarus/lcl/interfaces/customdrawn/customdrawndefines.inc and make sure that CD_UseNativeText is not set for Windows in the end of the file
3->Build the project and run it

Result:

Exception in LazFreeType while reading the font C:\Windows\Fonts\ahronbd.ttf in Windows Vista

#0 CACHE_NEW({CLAZZ = 0x0, ACTIVE = 0x0, IDLE = 0x0, IDLE_COUNT = 0}, 0x77b4b2fa, 0x1eefa00) at ttcache.pas:325
0000001 TT_OPEN_FACE(0x176058 'C:\Windows\Fonts\ahronbd.ttf', {Z = 0x77b4b2fa}) at lazfreetype.pas:971
0000002 FONTSSCANFORTTF(0x187048 'C:\Windows\Fonts\', 0x17e018) at .\customdrawn\customdrawnproc.pas:778
0000003 TCDWIDGETSET__BACKENDLISTFONTPATHS(0x19ea68, 0x17e018, <error reading variable>) at .\customdrawn\customdrawnwinapi_win.inc:904
0000004 TCDWIDGETSET__GENERICAPPINIT(<error reading variable>) at .\customdrawn\customdrawnobject.inc:88
0000005 TCDWIDGETSET__APPINIT({PIXELSPERINCHX = 0, PIXELSPERINCHY = 0, COLORDEPTH = 0, INITIALIZED = false}, <error reading variable>) at .\customdrawn\customdrawnobject_win.inc:262
0000006 TAPPLICATION__INITIALIZE(<error reading variable>) at .\include\application.inc:450
0000007 main at nonandroidtest.lpr:12
TagsNo tags attached.
Fixed in Revision
LazTarget2.2
Widgetset
Attached Files

Relationships

related to 0021470 resolvedcircular [LazFreeType] TT_Done_FreeType crashes in Windows 
related to 0021519 closedFelipe Monteiro de Carvalho CustomDrawn: TT font enumeration crashes 
related to 0021582 assignedFelipe Monteiro de Carvalho LazFreeType crashes on Suse with FPC 2.7.1 
related to 0029151 closedJuha Manninen AV in TFreeTypeFont.destroy if EasyLazFreeType.finalization section already worked 
related to 0037012 resolvedJuha Manninen LazFreeType garbles some fonts 

Activities

Felipe Monteiro de Carvalho

2012-03-11 15:10

developer   ~0057491

Ops, it seams that TT_Init_FreeType was missing =D sorry for the invalid report

Felipe Monteiro de Carvalho

2012-03-15 12:59

developer   ~0057676

Ops again, the error is back:

#0 SYSTEM_SYSGETMEM_FIXED$LONGWORD$$POINTER at :0
0000001 ?? at :0
0000002 ?? at :0
0000003 ?? at :0
0000004 LOAD_TRUETYPE_CVT(0x85440) at ttload.pas:948
0000005 FACE_CREATE(0x85440, 0x267fa48) at ttobjs.pas:1857
0000006 CACHE_NEW({CLAZZ = 0x614b20, ACTIVE = 0x0, IDLE = 0x0, IDLE_COUNT = 0}, 0x85440, 0x267fa48) at ttcache.pas:332
0000007 TT_OPEN_FACE(0x44f08 'C:\WINDOWS\Fonts\tunga.ttf', {Z = 0x85440}) at lazfreetype.pas:971
0000008 FONTSSCANFORTTF(0x56960 'C:\WINDOWS\Fonts\', 0x6d978) at .\customdrawn\customdrawnproc.pas:840
0000009 TCDWIDGETSET__BACKENDLISTFONTPATHS(0x4ced8, 0x6d978, <error reading variable>) at .\customdrawn\customdrawnwinapi_win.inc:904
0000010 TCDWIDGETSET__GENERICAPPINIT(<error reading variable>) at .\customdrawn\customdrawnobject.inc:88
0000011 TCDWIDGETSET__APPINIT({PIXELSPERINCHX = 0, PIXELSPERINCHY = 0, COLORDEPTH = 0, INITIALIZED = false}, <error reading variable>) at .\customdrawn\customdrawnobject_win.inc:262
0000012 TAPPLICATION__INITIALIZE(<error reading variable>) at .\include\application.inc:450
0000013 main at cd_test_all.lpr:18

No idea why, maybe something installed a new font in my system?

Felipe Monteiro de Carvalho

2012-03-15 13:27

developer   ~0057678

It will no longer crash because I added a hard check against the font tunga.ttf in rev 36028 but the root cause should be solved anyway.

Juha Manninen

2015-12-08 20:57

developer   ~0087844

Is this issue still valid?

Felipe Monteiro de Carvalho

2015-12-11 16:17

developer   ~0087898

why wouldn't it be?

circular

2016-06-01 07:42

developer   ~0092934

Hello! Apologies for the late answer.

I don't get the error when loading the files tunga.ttf or ahronbd.ttf.

I tried to run the example, but it does not seem to go through GenericAppInit at all.

Looking at the call stack, it seems that the error comes from a call to Alloc that calls GetMem. It may be a bug in the memory allocation from FreePascal. It may have been fixed already.

circular

2020-05-12 20:12

developer   ~0122739

I cannot reproduce the bug and there is no feedback from user.

Issue History

Date Modified Username Field Change
2012-03-11 11:19 Felipe Monteiro de Carvalho New Issue
2012-03-11 11:19 Felipe Monteiro de Carvalho LazTarget => -
2012-03-11 15:10 Felipe Monteiro de Carvalho Status new => resolved
2012-03-11 15:10 Felipe Monteiro de Carvalho Resolution open => no change required
2012-03-11 15:10 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2012-03-11 15:10 Felipe Monteiro de Carvalho Note Added: 0057491
2012-03-15 12:59 Felipe Monteiro de Carvalho Note Added: 0057676
2012-03-15 12:59 Felipe Monteiro de Carvalho Status resolved => confirmed
2012-03-15 13:27 Felipe Monteiro de Carvalho Note Added: 0057678
2012-03-23 12:33 Felipe Monteiro de Carvalho Relationship added related to 0021519
2012-03-23 14:17 Felipe Monteiro de Carvalho Relationship added related to 0021470
2012-03-27 22:06 Felipe Monteiro de Carvalho Relationship added related to 0021582
2012-04-10 12:50 Felipe Monteiro de Carvalho Status confirmed => assigned
2012-04-10 12:50 Felipe Monteiro de Carvalho Assigned To Felipe Monteiro de Carvalho => circular
2015-12-08 20:50 Juha Manninen Relationship added related to 0029151
2015-12-08 20:57 Juha Manninen Note Added: 0087844
2015-12-11 16:17 Felipe Monteiro de Carvalho Note Added: 0087898
2016-06-01 07:42 circular Note Added: 0092934
2020-05-03 20:59 Juha Manninen Relationship added related to 0037012
2020-05-12 20:12 circular Status assigned => resolved
2020-05-12 20:12 circular Fixed in Version => 2.2
2020-05-12 20:12 circular LazTarget - => 2.2
2020-05-12 20:12 circular Note Added: 0122739