cancel
Showing results for 
Search instead for 
Did you mean: 

AdsData - Access Violation - XE8.1

Former Member
0 Kudos

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Dear Mr. Mertelmeyer,

Happy New Year to you too, and thanks for identifying and reporting the memory leak.

We are including the proposed fix in the upcoming service pack.

Best regards,

Parag Mahadane

Former Member
0 Kudos

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])!

Former Member
0 Kudos

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

Former Member
0 Kudos

I see. Perhaps they are waiting to bring out version 12 before killing this bug in their code. Are you sure XE8.1 is sound?

Former Member
0 Kudos

Hi

I will be annoyed if they leave this so long - I spend many £10,000's with them every year and if I do not get my application to market they will not be getting the revenue.

Best Wishes

PLJ

Former Member
0 Kudos

Re XE8.1 - who can say if its sound or not?

I have seen other Advantage post's about this error but nothing in any Embarcadero newsgroup. I tried this with a Client Data Set  before posting on the Advantage Newsgroups and with the cds there was no issue.

Regards

PLJ