dllinit / exit problem?

drd

Member
Hi

I have an ActiveX application that connects to oracle. If I in my java host-application open and close the ActiveX a couple of times the whole thing crashes with a runtime error 217 or 216.

I've made a minimal app to demonstrate the problem. It runs the following code (and only this code) in it's create procedure.

Code:
MySession := TOracleSession.Create(nil);
  try
    try
      MySession.LogonDatabase := 'mydb';
      MySession.LogonUsername := 'foo';
      MySession.LogonPassword := 'bar';
      MySession.LogOn;
    except
      On E: Exception do
        showmessage(E.Message);
    end;
  finally
    MySession.Free;
  end;
I use 10.2 instant client (also tested with 11)

Do you have any idea what causes this?

Cheers,
drd
 
Hi

After some more digging i have found that the crash is in finalization section of 'classes.pas', when trying to do "FreeAndNil(GlobalLists);"

Is there a possiblity that the DOA or some OCI-call cause this?

Another odd thing is that the crash only happens when using InstantClient (as opposed to a full client), and only when i build the delphi-project with run-time packages.

Cheers,
Daniel
 
GlobalLists is a private TList variable in classes.pas. I cannot imagine what could cause this error when freeing this TList instance, unless there is a bug in classes.pas itself. I could not find any reference to such a bug though.
 
Back
Top