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
Random ASSERTION when create a new TMyConnection at run-time
Re: Random ASSERTION when create a new TMyConnection at run-time
I forgot the routine I using to build the new connection, maybe it should help someway.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
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;
}
I have moved to the rev. 4.3.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.
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