on 08-02-2015 11:46 AM
We believe this regression happened due to an undocumented change in Delphi XE8. To be precise, the typecasting of TList<t> to TList is giving unexpected results. While we are in the process of raising this issue with Embarcadero, we have a workaround that should resolve the issue for ADS customers.
Please unzip and use the attached adsdata.pas file to build your project.
Once confirmed, the fix will be incorporated in the next service pack.
Best Wishes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Mr. Mahadane,
First of all, thank you for the proposed fix. The access violation seems to be gone. The proposed solution however creates a severe memory leak for every call of
TAdsDataSet.LocateRecord(..)
Line 11826 creates an instance of TList but never destroys it:
temp_poFields := TList.Create;
I'd strongly suggest destroying this "temp_poFields" instance alongside with the original "poFields" instance in its finally-block.
I have added your proposed change as a diff file since the modifications and the lacking destruction of "temp_poFields" so it's easier to see what I'm talking about.
Best regards and happy new year.
You referencing an array element that is beyond the number of fields. If the number of fields is 1, then you cannot reference anything beyond element zero, but you seem to be referencing element 1 (poFields[sFieldCount])!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thank you for your reply - I was getting frustrated that Advantage(SAP) had acknowledged an issue with the code but no one had offered any fix for this. This works fine in ADS when in XE6 but fails with XE8.1
All I do is call
Result := AdsTable1.Locate(aFieldName, aKeyValue, [loCaseInsensitive]);
I have no control over the Advantage or Embarcadero code after that, as far as I can see, the exception occurs in the Advantage code.
Regards
Philip L Jackson
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.