Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] Re: (PR#10935) Fatal Freeciv Server Crash
Home

[Freeciv-Dev] Re: (PR#10935) Fatal Freeciv Server Crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: lightning4@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10935) Fatal Freeciv Server Crash
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 7 Nov 2004 16:12:47 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10935 >

Jeff wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10935 >
> 
> Whenever Freeciv or the server tries to start a game, it has a fatal 
> error. No matter if it's single player or just running the server, it 
> just suddenly crashes.
> Running Windows 98 SE.

> Error occured on Sunday, November 7, 2004 at 15:57:46.
> 
> G:\FREECIV\CIVSERVER.EXE caused an Access Violation at location 00405487 in 
> module G:\FREECIV\CIVSERVER.EXE Reading from location 00d7ffe0.
> 
> Registers:
> eax=00d8007a ebx=00e70ce2 ecx=00e70cdc edx=ffffffb3 esi=00e70cdc edi=019480d4
> eip=00405487 esp=00d6fb40 ebp=00d6fb48 iopl=0         nv up ei pl zr na po nc
> cs=017f  ss=0187  ds=0187  es=0187  fs=5d97  gs=0000             efl=00010246
> 
> Call stack:
> 00405487  G:\FREECIV\CIVSERVER.EXE:00405487  my_isspace  
> c:/dev/freeciv/freeciv-mod/utility/support.c:553
> 004028E1  G:\FREECIV\CIVSERVER.EXE:004028E1  remove_trailing_spaces  
> c:/dev/freeciv/freeciv-mod/utility/shared.c:495
> 0042E9CA  G:\FREECIV\CIVSERVER.EXE:0042E9CA  load_city_name_list  
> c:/dev/freeciv/freeciv-mod/server/ruleset.c:2210
> 0042F7C9  G:\FREECIV\CIVSERVER.EXE:0042F7C9  load_ruleset_nations  
> c:/dev/freeciv/freeciv-mod/server/ruleset.c:2465
> 00432477  G:\FREECIV\CIVSERVER.EXE:00432477  load_rulesets  
> c:/dev/freeciv/freeciv-mod/server/ruleset.c:3230
> 00409FEA  G:\FREECIV\CIVSERVER.EXE:00409FEA  srv_loop  
> c:/dev/freeciv/freeciv-mod/server/srv_main.c:1695
> 004098D2  G:\FREECIV\CIVSERVER.EXE:004098D2  srv_main  
> c:/dev/freeciv/freeciv-mod/server/srv_main.c:1649
> 00401D16  G:\FREECIV\CIVSERVER.EXE:00401D16  main  
> c:/dev/freeciv/freeciv-mod/server/civserver.c:181

A quick internet search indicates isspace() can crash if given "bad" 
input.  Someone will have to look into this a bit more to find out what 
the acutal problem is.  But with different charsets the "character" 
passed to isspace could be just about anything.

- An easy fix?  Just change the cast on the variable to the isspace call.

- Write our own isspace.  It should take just a few lines.

- Convert the string into UCS before using it in this way.  (I throw 
this out just for the sake of argument; I have no intention of doing this.)

jason




[Prev in Thread] Current Thread [Next in Thread]