Sporadic Access Violation in TJvMemoryData.InternalSetFieldData

亡梦爱人 提交于 2020-07-07 11:25:25

问题


I am trying to resolve an access violation in a Delphi XE7 application which is occurs in this code, which is part of the Jedi VCL JvMemoryDataset component (current source at Github):

begin
  Data^ := Ord(Buffer <> nil);
  Inc(Data);
  if Buffer <> nil then
    Move(Buffer^, Data^, CalcFieldLen(Field.DataType, Field.Size)) <---------- AV here
  else
    FillChar(Data^, CalcFieldLen(Field.DataType, Field.Size), 0);
end;

The code sporadically causes a read access violation at address 04020111. Is there an obvious problem in this code? (CalcFieldLen might return 0, not sure if this is relevant here).

I have checked the current development version of JVCL and the Move call is the same as in my (older) local version.

It might be related to the issue https://issuetracker.delphi-jedi.org/view.php?id=6276


Related (with debugging suggestions): Sporadic Access Violation after porting from D2006 to XE5, doesn't happen in XP compatibility mode

来源:https://stackoverflow.com/questions/62306617/sporadic-access-violation-in-tjvmemorydata-internalsetfielddata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!