[CODE] SYSERR: Using log() before stream was initialized!

From: QA Developer (developer@csgmail.artisoft.com)
Date: 05/25/99


I finished cleaning up the code so there are no more errors but now when I
load the mud I get the following error:
SYSERR: Using log() before stream was initialized!

O/S: Windows 98
Compiler: MS VC++ 6.0
mud: Circle bpl15
patches: Oasis olc pre-9, xapobjs, do_touch

The only code that has this line in it is found in: utils.c  around line
172 in function
void basic_mud_log(const char *format, ...)
  va_list args;
  time_t ct = time(0);
  char *time_s = asctime(localtime(&ct));

  if (logfile == NULL)
    puts("SYSERR: Using log() before stream was initialized!");
  if (format == NULL)
    format = "SYSERR: log() received a NULL format.";

  time_s[strlen(time_s) - 1] = '\0';

  fprintf(logfile, "%-15.15s :: ", time_s + 4);

  va_start(args, format);
  vfprintf(logfile, format, args);

  fprintf(logfile, "\n");

Using debug I can bring up:

Debug Assertion Failed!

Program: mud.exe
File: fprintf.c
Line: 56

Expression: str != NULL

The Details show:

MUD caused an exception 03H in module MSVCRTD.DLL at 015f:102159d3.
EAX=00000001 CS=015f EIP=102159d3 EFLGS=00000246
EBX=00680000 SS=0167 ESP=0078fcf4 EBP=0078fd10
ECX=10256538 DS=0167 ESI=0078fd24 FS=4eb7
EDX=80009198 ES=0167 EDI=0078fd7c GS=0000
Bytes at CS:EIP:
33 c9 85 c9 75 d6 83 7d 0c 00 75 1e 68 38 ea 24
Stack dump:
0078fd7c 0078fd24 00680000 0078fd20 0000000a 00000000 00000032 0078fd7c
004afbf7 00000000 005337f0 00ac08f4 0078fde8 81683cb4 00680000 cccccccc

I tried stepping through the code but it hit this segment several times.

Any help in identifying the cause would be greatly appreciated.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |

This archive was generated by hypermail 2b30 : 12/15/00 PST