Tracked down an error...

From: "Johann Zuschlag" <zuschlag2(at)online(dot)de>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Tracked down an error...
Date: 2001-04-05 19:05:04
Message-ID: E14lF4Q-0007Gr-00@mrelay00.kundenserver.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I went thru the code to track down the page fault error
when leaving my application. There is a funny behavior:

When I switch on CommLog (or Mylog) nothing happens.
If I switch it off: page fault when exiting the application.
I did following test in misc.c:

qlog(char *fmt,...)
{
va_list args;
char filebuf[80];
FILE *LOGFP = globals.qlogFP;

if (globals.commlog)
{
va_start(args, fmt);

if (!LOGFP)
{
generate_filename(QLOGDIR, QLOGFILE, filebuf);
// LOGFP = fopen(filebuf, PG_BINARY_W);
// globals.qlogFP = LOGFP;
// setbuf(LOGFP, NULL);
}

// if (LOGFP)
// vfprintf(LOGFP, fmt, args);

va_end(args);
}
}

like this my application crashes when I exit it.

If I remove the first comment from
LOGFP = fopen(filebuf, PG_BINARY_W);

it does NOT crash.

I don't understand that.
Any ideas?
(I'm using MS-C++ 5.0)

regards

Johann Zuschlag
zuschlag2(at)online(dot)de

Browse pgsql-odbc by date

  From Date Subject
Next Message Scott Walter 2001-04-05 20:39:46 MS Access help with boolean values
Previous Message Jean-Michel POURE 2001-04-05 16:42:27 Access2K Form object to use passtrough queries