[EDIT] I am using Delphi XE2 with update 3. We cannot upgrade to 4 at this time.
Hey there, hopefully there is a simple solution here because this problem is rather urgent. I will likely not be able to test solutions until morning though.
This closely mirrors our code. It uses a session component and a query component in the ODAC suite by Corelab. I am not sure that those exact components matter. I think I could get the same results with any TComponent. Following this access violation, shutting down the application generates Invalid Pointer Operation and the application hangs. It will not close. Application.Components still maintains a reference to the created TForm2 even though the free is being called.
TMyClass = class
procedure TForm1.Button1Click(Sender: TObject);
Frm := TForm2.Create(Application);
Frm.Qry.Session := MyClass.Sess; // AV generated here
Thanks in advance,