Access Violation when closing an Aurelius Dataset

When I close an application and an Aurelius dataset closes and frees itself I sometimes (frequently but not always) get an access violation. Below is part of the MadExcept Report. Any ideas? thanks

exception number   : 1
exception class    : EAccessViolation
exception message  : Access violation at address 00000000004109FB in module 'SMXVATSubmission.exe'. Read of address FFFFFFFFFFFFFFFF.

thread $5764:
004109fb +00b SMXVATSubmission.exe System                    18709  +9 TObject.InheritsFrom
0041084c +00c SMXVATSubmission.exe System                    18429  +1 @IsClass
0192e40b +04b SMXVATSubmission.exe Aurelius.Bind.Dataset       276  +8 TCustomAureliusDataset.ClearInternalList
01924d87 +097 SMXVATSubmission.exe Aurelius.Bind.BaseDataset  1288 +22 TBaseAureliusDataset.InternalClose
006bd56a +04a SMXVATSubmission.exe Data.DB                   12705  +6 TDataSet.CloseCursor
006bd367 +107 SMXVATSubmission.exe Data.DB                   12657 +22 TDataSet.SetActive
006bd090 +010 SMXVATSubmission.exe Data.DB                   12608  +1 TDataSet.Close
006a23e6 +026 SMXVATSubmission.exe Data.DB                    4809  +3 TField.Destroy
00410375 +015 SMXVATSubmission.exe System                    17909  +5 TObject.Free
005f828a +09a SMXVATSubmission.exe System.Classes            16787 +10 TComponent.DestroyComponents
005f7a7a +02a SMXVATSubmission.exe System.Classes            16584  +3 TComponent.Destroy
005fb1fc +08c SMXVATSubmission.exe System.Classes            17833  +6 TDataModule.Destroy
00410375 +015 SMXVATSubmission.exe System                    17909  +5 TObject.Free
005f828a +09a SMXVATSubmission.exe System.Classes            16787 +10 TComponent.DestroyComponents
00da2343 +023 SMXVATSubmission.exe FMX.Forms                  1423  +3 DoneApplication
00483390 +030 SMXVATSubmission.exe System.SysUtils            5925  +6 DoExitProc

What usually happens is that the entity being displayed in the dataset is destroyed before the dataset is closed. Often it's the object manager that was destroyed before the dataset.

Easiest solution is just to explicitly close the dataset before any destruction operation is done.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.