Random ASSERTION when create a new TMyConnection at run-time

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
earlati
Posts: 18
Joined: Thu 18 Nov 2004 07:37
Location: Bergamo / Italy

Random ASSERTION when create a new TMyConnection at run-time

Post by earlati » Mon 06 Feb 2006 09:26

Random ASSERTION when create a new TMyConnection at run-time

From time to time, maybe after 1 o 2 day of working an application of mine give me the following error:
[05/02/2006 5.16.30] [DataModule_PMV::NewMyConnection]
ERRORE Assertion failure (D:\Projects\Delphi\MyDac\Source\MySqlApiDirect.pas, line 205) ............

inside a routine which build at run-time a new connections to mysql

I'm using BCBBuilder6, mydac 3.5 and mysql 5.0 and belowe I report the function which generate the new TMyConnection object at run-time.
During the normal working the same routine , generate hundred of temporary connection at run-time, but only after several hours or days of working I get this error.
This alert are not trapped by try--catch block, so I can't manage it.
Also , is possible that the alert prompt me a dialog box and this is blocking my program, which is a service, which hangs.

I have not the source of mydac, so I couldn't make more investiogation on this error.
Can you help me ?

Regards, Enzo Arlati

earlati
Posts: 18
Joined: Thu 18 Nov 2004 07:37
Location: Bergamo / Italy

Re: Random ASSERTION when create a new TMyConnection at run-time

Post by earlati » Mon 06 Feb 2006 09:32

earlati wrote:Random ASSERTION when create a new TMyConnection at run-time

From time to time, maybe after 1 o 2 day of working an application of mine give me the following error:
[05/02/2006 5.16.30] [DataModule_PMV::NewMyConnection]
ERRORE Assertion failure (D:\Projects\Delphi\MyDac\Source\MySqlApiDirect.pas, line 205) ............

inside a routine which build at run-time a new connections to mysql

I'm using BCBBuilder6, mydac 3.5 and mysql 5.0 and belowe I report the function which generate the new TMyConnection object at run-time.
During the normal working the same routine , generate hundred of temporary connection at run-time, but only after several hours or days of working I get this error.
This alert are not trapped by try--catch block, so I can't manage it.
Also , is possible that the alert prompt me a dialog box and this is blocking my program, which is a service, which hangs.

I have not the source of mydac, so I couldn't make more investiogation on this error.
Can you help me ?

Regards, Enzo Arlati
I forgot the routine I using to build the new connection, maybe it should help someway.
And another important think, a reported a FALSE information in my previous message, I said the alert error where not trapped by the try--catch block, I just make an ERROR and I apologise, the alert is trapped correctly by try--catch block.


TMyConnection * __fastcall TDataModule_PMV::NewMyConnection(String hostName)
{
String strmsg;
TMyConnection * myConn = 0;

try
{
myConn = new TMyConnection( NULL );
myConn->Pooling = false;
myConn->Server = hostName;
myConn->Database = "my_db";
myConn->Username = "my_user";
myConn->Password = "my_password";
myConn->LoginPrompt = false;
strmsg = Format( "(conn: %s.%s.%s) ",
ARRAYOFCONST(( myConn->Server,
myConn->Database,
myConn->Username )) );
myConn->Connected = true;
}
catch( Exception & ex )
{
String serr;
serr = Format( "[DataModule_PMV::NewMyConnection] ERRORE %s %s ",
ARRAYOFCONST(( ex.Message, strmsg )) );
Util::mylog( serr );
RemoveMyConnection( myConn );
myConn = 0;
}
return myConn;
}

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 07 Feb 2006 12:45

Try downloading last version of MyDAC (3.55.0.25). If problem persists then send us complete small sample to demonstrate it, including script to
create server objects.

earlati
Posts: 18
Joined: Thu 18 Nov 2004 07:37
Location: Bergamo / Italy

Post by earlati » Tue 07 Feb 2006 16:59

Ikar wrote:Try downloading last version of MyDAC (3.55.0.25). If problem persists then send us complete small sample to demonstrate it, including script to
create server objects.
I have moved to the rev. 4.3.
The assertion error din't appear anymore, tough I got from time to time an EaccessViolation without futher iformation.
But this should be due to other problem, I'm still investigating on that, so consider the original error as resolved.

Regards and many thanks, Enzo Arlati

Post Reply