[CF-Devel] bugs/problems with windows server

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Thu Mar 25 01:20:45 CST 2004


Nicolas Weeger wrote:
>>
     
      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?
     
     
gettimeofday is a native function in linux, since there is no issue of it using 
the 'broken' emulated version.  Crossfire was programmed to use the calling 
semantics provided on unix type system, and thus it shouldn't see any problems 
in this area.

>
     
     
     >>
     
      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++).
     
     
  I recently fixed this in CVS.


_______________________________________________
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