[Freeciv-Dev] (PR#40070) Server crash 3

2008-02-03 Thread Jason Short

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40070 

get_city_bonus is passing in a NULL city.  This is allowed according to
the effects interface (undocumented of course) but because it calls
city_owner that function now segfaults on it.

I have no definite opinion on whether NULL targets are worthwhile for
get_xxx_bonus functions, but the function docs do need to specify.

-jason


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#40070) Server crash 3

2008-02-02 Thread Christian Knoke

URL: http://bugs.freeciv.org/Ticket/Display.html?id=40070 


SVN S2_2 rev 14375 02 FEB 2008 GTK2

Unreproducible server crash. Backtrace below. Core file available on
request.

Christian

Core was generated by `civserver -p 5556 -q 1 -e --saves ~/.freeciv/saves'.
Program terminated with signal 6, Aborted.
#0  0xb7f0e410 in ?? ()

(gdb) bt full
#0  0xb7f0e410 in ?? ()
No symbol table info available.
#1  0xbfdfe128 in ?? ()
No symbol table info available.
#2  0x0006 in ?? ()
No symbol table info available.
#3  0x4ff7 in ?? ()
No symbol table info available.
#4  0xb7d84811 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#5  0xb7d85fb9 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#6  0xb7d7dfbf in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#7  0x08060e8d in city_owner (pcity=0x0) at city.c:654
__PRETTY_FUNCTION__ = city_owner
#8  0x08065f0e in get_city_bonus (pcity=0x0, effect_type=EFT_GROWTH_FOOD) at 
effects.c:810
No locals.
#9  0x080ff9df in contemplate_terrain_improvements (pcity=0x8b87000) at 
settlers.c:738
virtualunit = (struct unit *) 0x85f7270
want = 17
completion_time = 2
best_act = value optimized out
best_tile = (struct tile *) 0x8a9f47c
ptile = value optimized out
pplayer = value optimized out
ai = (struct ai_data *) 0x824c8e8
unit_type = (struct unit_type *) 0x81ef720
place = 4
__PRETTY_FUNCTION__ = contemplate_terrain_improvements
#10 0x0811804c in ai_manage_cities (pplayer=0x8283710) at aicity.c:1700
myiter = (struct genlist_link *) 0x8b897a0
__PRETTY_FUNCTION__ = ai_manage_cities
#11 0x0811d569 in ai_do_last_activities (pplayer=0x8283710) at aihand.c:463
luxrate = value optimized out
scirate = 80
cmp = {minimal_surplus = {0, 0, 0, -10, 0, 0}, require_happy = 
true, allow_disorder = false, 
  allow_specialists = true, factor = {20, 1, 1, 1, 1, 1}, happy_factor = 1}
cmr = {found_a_valid = true, disorder = false, happy = true, surplus = 
{1, 2, 17, 2, 14, 0}, 
  worker_positions_used = {{255, false, true, false, false}, {false, false, 
false, false, true}, {true, false, 
  true, false, false}, {false, true, false, false, false}, {false, false, 
true, false, 255}}, specialists = {
---Type return to continue, or q return to quit---
0, 0, 0, -1, 10, -1, 10, -1, 10, -1, 10, 
-1, 10, -1, 10, -1, 
10, -1, 10, -1}}
#12 0x080b13af in srv_running () at srv_main.c:784
pplayer_index = value optimized out
eot_timer = (struct timer *) 0x83b6160
save_counter = 1
is_new_turn = true
__PRETTY_FUNCTION__ = srv_running
#13 0x080b1a6c in srv_main () at srv_main.c:2194
No locals.
#14 0x0804aaea in main (argc=Cannot access memory at address 0x4ff7
) at civserver.c:265
inx = 8
showhelp = false
showvers = false
option = value optimized out
(gdb) quit

-- 
Christian Knoke* * *http://cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev