AV by calling TAureliusDataset.First in Delphi 10.4.1

Greetings, I'd like to consult following issue: I had a fully functional code for my mobile app for Android in Delphi 10.3.2. Because of conforming to Google requirements, I had to upgrade to Delphi 10.4.1.

Without any change in my source code, an AV exception is thrown when I call TAureliusDataset.First method - however it worked properly in version 10.3.2.

Issue occurs on Android and on Windows 32bit too.

I do not know what should be wrong, the newest version of appropriate TMS components are installed.

Thank you for any advice.

Can you please provide the call stack at the moment of the error?

Hello, thank you, it is attached. Will it be sufficient please?

You have to take into account that the memory management in Android changed from Delphi 10.3 to Delphi 10.4. My guess is that you are somehow destroying some objects used by the dataset, that were not being destroyed before due to reference counting, and now they are being destroyed.

I understand but I mentioned that the issue occured on Win32 platform too.

I'd ask you to build a separated compialble sample project reproducing the issue and send it to us, so we can debug and fix it (or point what's wrong).

Okay, I'll send you the requested sources through a personal e-mail message. Thank you your help!

The cause of the problem is the following procedure:

procedure THeaderFooterForm.Akt_Zadanky;
 GZadanky:=Client.List<TT_Zadanka>('$filter=(OSOBA eq ''1'')&$orderby=D_ZACATEK');

You cannot destroy the list passed to the dataset. It keeps a reference to it. You should only destroy the list after the dataset is closed.