View Issue Details

IDProjectCategoryView StatusLast Update
0006767JEDI VCL00 JVCL Componentspublic2024-01-11 08:41
ReporterbazilioAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformEmbarcadero® Delphi 11 Version 2OSWindowsOS Version7+
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0006767: in TJvMemoryData.Field[...].OnValidate sometimes the old field value comes in
Descriptionin TJvMemoryData.Field[...].OnValidate sometimes the old field value comes in.
Steps To ReproduceAssign TJvMemoryData.Field[].OnValidate and append many records (more then one screen)
Additional InformationThis bug does not occur on previous versions of delphi because the code TField.GetData has been changed but CurrentRecord is sometimes not equal to ActiveRecord:

function TField.GetData(var Buffer: TValueBuffer; NativeFormat: Boolean = True): Boolean;
begin
  if FDataSet = nil then DataSetMissingError;
  if FValidating and not (FDataSet.State in [dsOldValue, dsCurValue]) and
     ((FDataSet.CurrentRecord = -1) or (FDataSet.ActiveRecord = FDataSet.CurrentRecord)) then
  begin
    Result := FValueBuffer <> nil;
    if Result and (Buffer <> nil) then
      CopyData(FValueBuffer, Buffer);
  end
  else
    Result := FDataSet.GetFieldData(Self, Buffer, NativeFormat);
end;
TagsNo tags attached.

Activities

bazilio

2023-05-18 19:37

reporter  

Project.zip (91,659 bytes)

AHUser

2024-01-02 14:17

developer   ~0022067

In Delphi 11.3 the TField.GetData method changed again. Maybe they fixed that bug.

bazilio

2024-01-11 08:41

reporter   ~0022071

I sorry, but we wrote the wrong information in the bug report. First affected version is 11.3, noy 11.2
Yes that method has been changed in 11.3 Update 3, but it didn't fix the bug. We see the wrong behavior in 11.3 Update 3 and 12.
But unfortunately that test project works well in the last versions of delphi, but actual more complicated application doesn't work.
We will try to make better test case to reproduce the bug.

Issue History

Date Modified Username Field Change
2023-05-18 19:37 bazilio New Issue
2023-05-18 19:37 bazilio File Added: Project.zip
2024-01-02 14:17 AHUser Assigned To => AHUser
2024-01-02 14:17 AHUser Status new => feedback
2024-01-02 14:17 AHUser Note Added: 0022067
2024-01-02 15:00 AHUser Assigned To AHUser =>
2024-01-11 08:41 bazilio Note Added: 0022071
2024-01-11 08:41 bazilio Status feedback => new