unidac_9.0.1 TCRVioSocket access violation in thread trying to connect to nonexistent IP second time

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
VojkoCendak
Posts: 7
Joined: Thu 23 Apr 2020 12:52

unidac_9.0.1 TCRVioSocket access violation in thread trying to connect to nonexistent IP second time

Post by VojkoCendak » Fri 15 Oct 2021 12:51

Hi, (D 10.4.2 Ent)

We had to move back to 8.4.1 !

We don't know exactly, because if we test it in simple app it works, but with other components in bigger app we get those exceptions,
Anyway if we move back to 8.4.1 it works again.

Scenario:
If We try to reconnect in existing connection we get exception second time we try to connect.
In our bigger project we create TUniConnection in thread:

C := TUniConnection.Create(nil);
try
C.ConnectString := fConnStr;
while not fconnected do begin
try
C.Connected := true; <== if we try to connect to non existent IP
fconnected := true;
C.Connected := false;
except on e:exception do begin <== here we get this exception dialog second time we try
ferrstr:= e.Message;
fconnected := false;
end;
if not fconnected then begin
sleep(1000)
else
exit;
end;
finally
C.free;
end;

Here is text from madExcept:

exception message : Access violation at address 0040B818 in module 'PotopneKlient.exe'. Read of address 8D0057FF.

thread $2f88 (TConnector):
0040b818 +008 PotopneKlient.exe System 105 +0 UTF8IdentToString
0040b939 +00d PotopneKlient.exe System 105 +0 TObject.ClassName
0057ff6a +04e PotopneKlient.exe System.Classes TPersistent.AssignError
0057ffd9 +001 PotopneKlient.exe System.Classes TPersistent.AssignTo
019d6573 +00f PotopneKlient.exe CRVioSocket TCRVioSocket.CloseSocket
019d85bd +005 PotopneKlient.exe CRVioTcp TCRVioTcp.CloseSocket
019d8b66 +3be PotopneKlient.exe CRVioTcp TCRVioTcp.InternalConnect
019db7a1 +009 PotopneKlient.exe CRVioTcp TConnector.Execute
004c643f +02b PotopneKlient.exe madExcept HookedTThreadExecute
00596bb5 +049 PotopneKlient.exe System.Classes ThreadProc
00596c18 +0ac PotopneKlient.exe System.Classes ThreadProc
0040d9a4 +028 PotopneKlient.exe System 105 +0 ThreadWrapper
004c6325 +00d PotopneKlient.exe madExcept CallThreadProcSafe
004c638a +032 PotopneKlient.exe madExcept ThreadExceptFrame
76fdfa27 +017 KERNEL32.DLL BaseThreadInitThunk
>> created by thread $2bd0 (TOmniThread) at:
00596c7c +018 PotopneKlient.exe System.Classes TThread.Create

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: unidac_9.0.1 TCRVioSocket access violation in thread trying to connect to nonexistent IP second time

Post by ViktorV » Thu 21 Oct 2021 15:14

Thank you for letting us know about this unfortunate situation. We would like to inform you that we have successfully reproduced this issue and at the moment our team is investigating it. I would like to kindly assure you that as soon as we have any results, we will immediately let you know.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: unidac_9.0.1 TCRVioSocket access violation in thread trying to connect to nonexistent IP second time

Post by ViktorV » Tue 09 Nov 2021 15:58

Kindly be informed that we fixed a bug we previously have found. Also note that we can provide you a nightly build that includes this change so you can check if this change solves the problem on your side. To do this, please send us your license number and the version of the IDE you are using via our contact form:
https://devart.com/company/contactform.html

Post Reply