Home » Developer & Programmer » Precompilers, OCI & OCCI » Core Dump after OCI Server Detach
Core Dump after OCI Server Detach [message #93614] Wed, 07 August 2002 15:45 Go to next message
Jim Bingham
Messages: 2
Registered: August 2002
Junior Member
All,

We are receiving a core dump (segmentation fault) while cleaning up handles. The program performs a bulk update - and does so successfully. The point at which the core dump occurs is when executing OCIServerDetach.

The code is very basic:

/*--------------------------------------*/
/* STATIC */
/* Exit program with an exit code. */
/*--------------------------------------*/
static void cleanup()
{
printf ("nFreeing global structures..n");
if (srvhp) OCIServerDetach (srvhp, errhp, (ub4) OCI_DEFAULT );
if (srvhp) OCIHandleFree((dvoid *) srvhp, (CONST ub4) OCI_HTYPE_SERVER);
if (svchp) OCIHandleFree((dvoid *) svchp, (CONST ub4) OCI_HTYPE_SVCCTX);
if (errhp) OCIHandleFree((dvoid *) errhp, (CONST ub4) OCI_HTYPE_ERROR);
if (authp) OCIHandleFree((dvoid *) authp, (CONST ub4) OCI_HTYPE_SESSION);

// if (envhp)
// (void) OCIHandleFree((dvoid *) envhp, OCI_HTYPE_ENV);

return;
}

Any thoughts
Re: Core Dump after OCI Server Detach [message #93615 is a reply to message #93614] Wed, 07 August 2002 16:11 Go to previous message
Jim Bingham
Messages: 2
Registered: August 2002
Junior Member
Forgot to mention. We are calling OCISessionEnd before rolling through OCIServerDetach.

/*---------------------------------*/
/* STATIC */
/*---------------------------------*/
static void logout()
{
printf ("nnFreeing statement handles..n");
if(stmthp) OCIHandleFree ((dvoid *) stmthp, (ub4) OCI_HTYPE_STMT);

printf ("Logging off...n");
if(authp) OCISessionEnd (svchp, errhp, authp, (ub4) 0);
}
Previous Topic: problem with runtime context in Pro*C
Next Topic: Proc on Ora8i
Goto Forum:
  


Current Time: Fri Mar 29 10:39:33 CDT 2024