You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to the most recent version of these controls (with the changes for Berlin 10.1) I started getting AV's when doing a drag/drop from a TVirtualTreeView into a DropHandler on another form. I tracked it down to what seems to be a change to TCustomDropTarget.SetPerformedDropEffect where two lines were added:
if Result then
ReleaseStgMedium(Medium);
This seems to be Releasing a Medium which then causes an AV when it later gets released again inside the VirtualTrees code in TVTDataObject.Destroy.
I am not an expert in Drag/Drop at all, so I'm not sure if the real error is inside the function mentioned above or it's inside the VirtualTree code (though removing the ReleaseStgMedium call from SetPerformedDropEffect has resolved my issue.
The text was updated successfully, but these errors were encountered:
SetPerformedDropEffect calls TClipboardFormat.SetData which has these lines in it:
// If we didn't succeed in transfering ownership of the data medium to the
// IDataObject, we must deallocate the medium ourselves.
if (not Result) then
ReleaseStgMedium(AMedium);
The comment there seems to indicate that upon failure it should release the medium (which it does). So it does seem strange to me that once this function returns it goes back to SetPerformedDropEffect which then releases the medium in the non-failure case.. It seems like it should not be released as the IDataObject should have ownership of that medium now.
After upgrading to the most recent version of these controls (with the changes for Berlin 10.1) I started getting AV's when doing a drag/drop from a TVirtualTreeView into a DropHandler on another form. I tracked it down to what seems to be a change to TCustomDropTarget.SetPerformedDropEffect where two lines were added:
if Result then
ReleaseStgMedium(Medium);
This seems to be Releasing a Medium which then causes an AV when it later gets released again inside the VirtualTrees code in TVTDataObject.Destroy.
I am not an expert in Drag/Drop at all, so I'm not sure if the real error is inside the function mentioned above or it's inside the VirtualTree code (though removing the ReleaseStgMedium call from SetPerformedDropEffect has resolved my issue.
The text was updated successfully, but these errors were encountered: