AV on XP, Not on Vista or 7

Weird...

Hi Bruno,

Weird... my customers reported an error on closing my application. It happens only on XP, not on Vista or 7.

After digging and digging (the error was app not in my code) I found that placing a try-except-end
around:

 if Assigned(FSyncGrid) and (AOperation = opRemove) and (AComponent = FSyncGrid.Grid) then
    FSyncGrid.Grid := nil;

Somewhere along line 18855 in AdvGrid.pas helped to get rid of the error.

I have updated the VCL-component pachake up til the latest, 5.8.1.0.
The error appeared shortly after updating to a prior version (5.8.0.0(I think). a few weeks ago.

using D7, and I have no idea what the FSyncGrid is about....

tia!
John

In addition:

it was the error-address in the AV popup that directed Delphi via Find Error to these lines in AdvGrid.pas.

John

Could you please provide some sample source code with which we can reproduce this 

issue so we can trace what exactly is going wrong? We have not been able to see this 
error in any of our demos or test applications so far.

Nancy,

I tried, but guess what: I failed.
I can reproduce it in my project, but the project is just too big to strip down.
And guess what again: if I throw all tms-grids on a form, there is no problem...

However, if I change code in my project and rebuild, all memory addresses change (as expected, of course) and the newly produced AV popup (the one that asks to inform Microsoft) points to a new error address (as expected) and this address points to exactly the same line. I even split up this composed AND function into three different lines, rebuild and again it points to the first line: if assigned(FSyncGrid)....

I'll come back if I can reproduce in a sample.

John


Hello,

 
have exactly the same problem since version 5.6.0.1 of tAdvStringGrid
When closing a form where there is a TadvStringGrid , memory violation ...
It happens randomly , difficult to reproduce
and seems coming from part of code indicated by John in Advgrid.pas
 
 if Assigned(FSyncGrid) and (AOperation = opRemove) and (AComponent = FSyncGrid.Grid) then
    FSyncGrid.Grid := nil;
 
Pascal
 

Please update to the latest version of TAdvStringGrid where this was already fixed.

Thanks,

 
I download and install latest version this afternoon,
Source AdvGrid.pas still mention version 5.6.0.1.
Is it normal ?
 
Pascal