DAMemDataTable - WideString field and DABin2DataStreamer causes AV (RO/DA 10.0.0.1449)

Hello,

I have discovered a serious bug in the TDAMemDataTable (the one from DA v10), when trying to stream a table with datWideString fields an AV exception is triggered. I think the error is in the TDAMemoryDataSet.GetNativeFieldData() implementation writing to an uninitialized buffer. Also the new TDADBSupport.UnsafeSetBytes() does not have the Buffer parameter marked as var (it seems that it should be var, because its content is modified in there). Also as you can see from the FastMM report even the simple sample project leaks memory a lot. I have analysed it and the cause is in the TDAMemoryDataset.intInitRecord() method the call to FreeBin2Buffer is missing (it was in version 9), also in the TDAMemoryDataset.DuplicateBin2Struct() the Dest reference data (eg. blob) is not cleared when the Source data is null.

Regards, Jan

daSample.zip (1.1 MB)

Thanks, logged as bugs://83091

Thank you for the report

bugs://83091 got closed with status fixed.

Hi, can you provide fix here?

Hi,

The fix is included into Data Abstract for Delphi v10.0.0.1457 or later

Don’t have access now to download it.

pls drop email to support@ with your account details.
also this fix is available in trial version.