[CF-Devel] bugs/problems with windows server

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Wed Mar 24 12:33:58 CST 2004


>
     
      1.) The server sometimes did hang. After building a full-debug
     
     >
     
      version, i found out, that the problem was the windows
     
     >
     
      emulation of the gettimeofday function in "win32.c", which simply set 
     
     >
     
        "time_Info->tv_usec = timeGetTime() *1000;",
     
     >
     
      which is wrong, since timeGetTime() returns the system
     
     >
     
      time in milliseconds and somewhere else in the code
     
     >
     
      there are code fragments like: "last_time->tv_usec = 0;",
     
     >
     
      so that sleep_delta() in "time.c" sometimes tried to
     
     >
     
      Sleep enormously long (> 4800 seconds:).
     
     >
     
      The patch at the end of this mail fixes the problem.
     
     
This should probably happen also under Linux, though - no one noticed this issue?

>
     
      2.) The variable "skill" is sometimes used uninitialized in
     
     >
     
      "int kill_object(object *op,int dam, object *hitter, int type)"
     
     >
     
      in "attack.c" (change_exp() is sometimes called there with 
     
     >
     
      skill=0xcccccccc, when doing a full debug build with VisualC++).
     
     
This should be fixed, imo. Probably missing initialization.

>
     
      3.) The VisualC++ runtime uses another type prefix in printf 
     
     >
     
      format strings for 64-bit integers than the GNU C/C++ compiler. 
     
     >
     
      Could you please change all occurrencs (about 20-30) of code like
     
     
Yes, missing a few here & there. Didn't really take the time to fix everything.

Please, if you send a patch, send a cvs diff, or a regular diff, not code like 
what you sent :)

Nicolas ('official' Windows maintainer)

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list