Access violation in oraprovider140.bpl after network connection problem

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
blogin
Posts: 6
Joined: Tue 25 Feb 2014 11:01

Access violation in oraprovider140.bpl after network connection problem

Post by blogin » Tue 23 Sep 2014 12:21

Hi,

I found an AV error in UniDAC v 5.5.11 (C++ Builder 2010) in the following scenario:
1. create and open an Oracle DB connection (TUniConnection)
2. simulate network problems by creating DROP rule with iptables on target linux machine on which Oracle resides: 'iptables -A INPUT -p tcp -s X.X.X.X -j DROP' (where X.X.X.X means my client workstation)
3. try to run ExecSQL on TUniQuery with any SQL text inside

After a few seconds the following error message occures: Project ... raised exception class EAccessViolation ... in module 'oraprovider.bpl' ...

I suppose, that some exception should occure, bot not of AV type, which suggests, that something went out of control.

I think, that this is a specific scenario, because when, instead of dropping communication on the server's side with iptables, I simply disable my PC's network card, the UniDAC throws more correct exception: Project ... raised exception class EUniError with message 'ORA-03135: connection lost....'.

Here is a sample code, which run step by step can show described problem:

TUniConnection *c = new TUniConnection(this);
TUniQuery *q = new TUniQuery(this);

q->Connection = c;
q->SQL->Text = "declare i number; begin i:=0; end;";
c->ProviderName = "Oracle";
c->Username = "system";
c->Password = "password";
c->Server = "database";
c->Connected = true;

//Here disable your network connection on target machine (iptables DROP) and then execute the following line:

q->ExecSQL();

Regards,
Bertrand

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Access violation in oraprovider140.bpl after network connection problem

Post by AlexP » Wed 24 Sep 2014 08:46

Hello,

Thank you for the information. We have reproduced and fixed the problem. This fix will be included to the next buil. We plan to release a new build within a week.

blogin
Posts: 6
Joined: Tue 25 Feb 2014 11:01

Re: Access violation in oraprovider140.bpl after network connection problem

Post by blogin » Wed 24 Sep 2014 15:02

Hi,

Thank you for your quick response and soon fix.

Kind regards,
Bertrand

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Access violation in oraprovider140.bpl after network connection problem

Post by AlexP » Fri 26 Sep 2014 11:19

You are welcome. Feel free to contact us if you have any further questions.

Post Reply