[Lazarus] Win 7 issue / Re: -dWINDOWS_LIGATURE [[Re: Font ligatures support]]

Maxim Ganetsky ganmax at narod.ru
Fri Oct 9 00:55:42 CEST 2020


07.10.2020 14:23, Martin Frb via lazarus пишет:
> On 07/10/2020 01:42, Maxim Ganetsky via lazarus wrote:
>> 06.10.2020 16:23, Martin Frb via lazarus пишет:
>>> On 06/10/2020 15:09, Maxim Ganetsky via lazarus wrote:
>>>>
>>>> ----
>>>> Can you try to catch it in the debugger, and see what params are given
>>>> to NewTextOut
>>>> in
>>>> #2  0x00ab95f6 in DRAWHILIGHTMARKUPTOKEN (ATOKENINFO=...,
>>>> parentfp=0x13abf6e8)
>>>>      at lazsyntextarea.pp:1741
>>>>
>>>>   fTextDrawer.NewTextOut(TxtLeft, rcToken.Top, TxtFlags, tok,
>>>> ATokenInfo.Tk.TokenStart, ATokenInfo.Tk.TokenLength, FEtoBuf);
>>>> Can you add some debugln in a format convenient to you? This will
>>>> simplify things, I think.
>>>>
>>> This is in the paint handler, and it is called for each token. So 
>>> potentially very slow with debugln.
>>>
>>> But since it is in startup, hopefully you wont have to many.
>>>
>>> Apply this patch please
>>
>>
>> With this patch applied Lazarus seems to crash on debugln in 
>> lazsyntextarea.pp. Just in case, I tried to remove this particular 
>> debugln, then it printed 'BEFORE' and nothing more.
> 
> Sorry my fault, I thought I had all the nil checks....
> Please replace that debugln with
> 
> debugln('Calling NewTextOut L: %s rcT: %s tok: %s tkt: %s // %s // eto: 
> %s', [dbgs(TxtLeft), dbgs(rcToken), dbgs(tok), 
> dbgMemRange(PByte(ATokenInfo.Tk.TokenStart), ATokenInfo.Tk.TokenLength), 
> dbgs(ATokenInfo.Tk.TokenLength), dbgs(FEtoBuf<>nil) ]);

I got the following output:

i:\FPC\lazarus>lazarus
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] 
PrimaryConfigPath="C:\Users\Maxim
\AppData\Local\lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] 
SecondaryConfigPath="i:\FPC\lazar
us"
Hint: (lazarus) [TMainIDE.LoadGlobalOptions]
Hint: (lazarus) LastCalled="I:\FPC\lazarus\lazarus.old.working.exe"
Hint: (lazarus) CurPrgName="i:\FPC\lazarus\lazarus.exe"
Hint: (lazarus) 
AltPrgName="C:\Users\Maxim\AppData\Local\lazarus\bin\lazarus.exe
"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=i386-win32-win32 
New=i386-win
32-win32 Changed: OS/CPU=True LCL=False
Calling NewTextOut L: 71 rcT: l=71,t=36,r=85,b=54 tok: 
l=71,t=36,r=85,b=54 tkt:
2020 // 2 // eto: False
BEFORE

-- 
Best regards,
  Maxim Ganetsky                  mailto:ganmax at narod.ru


More information about the lazarus mailing list