I exchanged emails with Serge on 3/16 about this bug. He suggested a fix, which I used, but the code hasn't been changed, so now the bug is back. The error is:
Cannot create file
"C:\WINDOWS\FONTS\dxPScxSchedulerLnk.ttf". The process cannot access the file because it is being used by another process.
Steps to Reproduce:
I have a customer that keeps getting this error starting my program under Windows 98. I am unable to reproduce it here, but it seems like something (maybe some sort of Font util) has the file locked which causes the error and the application not to load at all. Would it be possible for you to add some code in InitializeSchedulerLink to only try to save the font if it doesn't exist, or maybe try/except if not exists raise end, something along those lines.
exception message : Cannot create file
"C:\WINDOWS\FONTS\dxPScxSchedulerLnk.ttf". The process cannot access the file because it is being used by another process.
Main ($ffe45b8d):
00474d19 INTEGEXC.EXE Classes TFileStream.Create
00474c3c INTEGEXC.EXE Classes TFileStream.Create
00474e99 INTEGEXC.EXE Classes
TCustomMemoryStream.SaveToFile
009b848f INTEGEXC.EXE dxPScxScheduler2Lnk 10322 InitializeSchedulerLink 00a93b1c INTEGEXC.EXE dxPScxScheduler2Lnk 10407 initialization
004058c5 INTEGEXC.EXE System 394 InitUnits
0040592a INTEGEXC.EXE System 394 @StartExe
0040855e INTEGEXC.EXE SysInit @InitExe
Actual Results:
Error
Expected Results:
No Error. Serge's fix was:
// CODE FIX
dxPScxScheduler2Lnk.pas
procedure InitializeSchedulerLink
OLD CODE:
SchedulerFontFileName := GetFontFolder + '\' + 'dxPScxSchedulerLnk.ttf';
Res.SavetoFile(SchedulerFontFileName);
NEW CODE:
SchedulerFontFileName := GetFontFolder + '\' + 'dxPScxSchedulerLnk.ttf';
if not FileExists(SchedulerFontFileName) then
Res.SavetoFile(SchedulerFontFileName);
This works for me. Can this be put into the next update?