When the unit I want to check contains inline variable declarations FixInsight throws an exception and does not write anything more into the FixInsight message tab.
The following code is tested correctly:
var
I: Integer;
begin
...
for I := 0 to Segment.Data.Size - 1 do
begin
if SeekPtr^ in [#0..#8, #11..#12, #14..#31] then SeekPtr^ := ' ';
Inc(SeekPtr);
end;
...
end;
-> [FixInsight Warning] STGEXIF.pas(1005): W528 Variable 'I' not used in FOR-loop
Changing the unit to use inline variable declarations:
I: Integer;
begin
...
for I := 0 to Segment.Data.Size - 1 do
begin
if SeekPtr^ in [#0..#8, #11..#12, #14..#31] then SeekPtr^ := ' ';
Inc(SeekPtr);
end;
...
end;
-> [FixInsight Warning] STGEXIF.pas(1005): W528 Variable 'I' not used in FOR-loop
Changing the unit to use inline variable declarations:
begin
...
for var I: Integer := 0 to Segment.Data.Size - 1 do
begin
if SeekPtr^ in [#0..#8, #11..#12, #14..#31] then SeekPtr^ := ' ';
Inc(SeekPtr);
end;
...
end;
...
for var I: Integer := 0 to Segment.Data.Size - 1 do
begin
if SeekPtr^ in [#0..#8, #11..#12, #14..#31] then SeekPtr^ := ' ';
Inc(SeekPtr);
end;
...
end;
-> Exception in FixInsight.Services.dll/FixInsight_10_3.bpl
exception class : EAccessViolation
exception message : Zugriffsverletzung bei Adresse 23FA960B in Modul 'FixInsight.Services.dll'. Lesen von Adresse 00000210.
thread $14f4 (TAnalysisThread):
23fa960b +00 FixInsight.Services.dll
5985b7e7 +2b madExcept_.bpl madExcept HookedTThreadExecute
5985b6cd +0d madExcept_.bpl madExcept CallThreadProcSafe
5985b732 +32 madExcept_.bpl madExcept ThreadExceptFrame
75f00177 +17 KERNEL32.DLL BaseThreadInitThunk
>> created by main thread ($d58) at:
24044f06 +00 FixInsight.Services.dll
main thread ($d58):
1fcb2634 +0a0 FixInsight_10_3.bpl Fixinsight Expert.TFixInsightExpert.OnFixInsightRunSingleUnit
1fcaea4d +07d FixInsight_10_3.bpl Fixinsight Expert.Datamodule.TdmFixInsightExpert.actRunFixInsightForUnitExecute
exception class : EAccessViolation
exception message : Zugriffsverletzung bei Adresse 23FA960B in Modul 'FixInsight.Services.dll'. Lesen von Adresse 00000210.
thread $14f4 (TAnalysisThread):
23fa960b +00 FixInsight.Services.dll
5985b7e7 +2b madExcept_.bpl madExcept HookedTThreadExecute
5985b6cd +0d madExcept_.bpl madExcept CallThreadProcSafe
5985b732 +32 madExcept_.bpl madExcept ThreadExceptFrame
75f00177 +17 KERNEL32.DLL BaseThreadInitThunk
>> created by main thread ($d58) at:
24044f06 +00 FixInsight.Services.dll
main thread ($d58):
1fcb2634 +0a0 FixInsight_10_3.bpl Fixinsight Expert.TFixInsightExpert.OnFixInsightRunSingleUnit
1fcaea4d +07d FixInsight_10_3.bpl Fixinsight Expert.Datamodule.TdmFixInsightExpert.actRunFixInsightForUnitExecute