[Freeciv-Dev] [bug #15456] api_actions_change_gold() crash

2010-02-27 Thread pepeto

Update of bug #15456 (project freeciv):

  Status:  Ready For Test => Fixed  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15456] api_actions_change_gold() crash

2010-02-26 Thread pepeto

Update of bug #15456 (project freeciv):

Category:None => general
  Status:None => Ready For Test 
 Assigned to:None => pepeto 
 Planned Release: => 2.2.1  

___

Follow-up Comment #2:

Patch attached: add the SCRIPT_ASSERT macro that make lua errors when one
failed. Not sure it will fix anything, but at least no more plain crash.
Keeping the bug #15458 open for more investigation.


(file #8286)
___

Additional Item Attachment:

File name: trunk_S2_2_SCRIPT_ASSERT.diff  Size:9 KB


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15456] api_actions_change_gold() crash

2010-02-22 Thread pepeto

Follow-up Comment #1, bug #15456 (project freeciv):

The lua script may contain an error, it calls a function for a NULL player.
However, the server shouldn't crash in that case.


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15456] api_actions_change_gold() crash

2010-02-22 Thread Marko Lindqvist

URL:
  

 Summary: api_actions_change_gold() crash
 Project: Freeciv
Submitted by: cazfi
Submitted on: Monday 02/22/2010 at 19:22
Category: None
Severity: 3 - Normal
Priority: 1 - Later
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

Crash from 2.2.0 server running galactic ruleset 0.2.4 (
http://forum.freeciv.org/viewtopic.php?t=3900&start=90 )

Program terminated with signal 11, Segmentation fault.
#0  0x005b0203 in api_actions_change_gold (pplayer=0x0, amount=50)
at server/scripting/api_actions.c:72
72pplayer->economic.gold += amount;
(gdb) bt full
#0  0x005b0203 in api_actions_change_gold (pplayer=0x0, amount=50)
at server/scripting/api_actions.c:72
No locals.
#1  0x005ae1d7 in tolua_api_change_gold00 (tolua_S=0x16e4be0)
at server/scripting/api_gen.c:1905
pplayer = 0x0
amount = 50
tolua_err = {index = 0, array = 0, type = 0x19ed900 "P8\215\001"}
#2  0x005b74e2 in luaD_precall (L=0x16e4be0, func=0x18d37a0,
nresults=0)
at dependencies/lua-5.1/src/ldo.c:319
ci = 0x19ed8d8
n = -609042528
cl = 0x1f37d90
funcr = 160
#3  0x005cc796 in luaV_execute (L=0x16e4be0, nexeccalls=2)
at dependencies/lua-5.1/src/lvm.c:587
b = 3
nresults = 0
i = 25182428
ra = 0x18d37a0
cl = 0x19f39a0
base = 0x18d3770
k = 0x19f3c70
pc = 0x19f3990
#4  0x005b778d in luaD_call (L=0x16e4be0, func=0x18d3720,
nResults=1)
at dependencies/lua-5.1/src/ldo.c:377
No locals.
#5  0x005b2464 in f_call (L=0x16e4be0, ud=0x7fffdbb2c530)
at dependencies/lua-5.1/src/lapi.c:800
c = 0x7fffdbb2c530
#6  0x005b6700 in luaD_rawrunprotected (L=0x16e4be0, 
f=0x5b242f , ud=0x7fffdbb2c530)
at dependencies/lua-5.1/src/ldo.c:116
lj = {previous = 0x0, b = {{__jmpbuf = {16, -8085995675295295808, 
4368480, 140736879316960, 0, 0, -8085995675261741376, 
8086057090794378944}, __mask_was_saved = 0, __saved_mask = {
__val = {27228920, 24005944, 140736879314016, 6061520, 
  140736879314176, 25197248, 140736879314128, 4368480, 
  140736879316960, 0, 0, 6044960, 26031904, 4, 6427900, 
  26366144, status = 0}
#7  0x005b7b97 in luaD_pcall (L=0x16e4be0, func=0x5b242f , 
u=0x7fffdbb2c530, old_top=32, ef=16)
at dependencies/lua-5.1/src/ldo.c:463
status = 26031888
oldnCcalls = 0
old_ci = 0
old_allowhooks = 1 '\001'
old_errfunc = 0
#8  0x005b250d in lua_pcall (L=0x16e4be0, nargs=1, nresults=1, 
errfunc=1)
at dependencies/lua-5.1/src/lapi.c:821
c = {func = 0x18d3720, nresults = 1}
status = 0
func = 16
#9  0x005a8fab in script_call (L=0x16e4be0, narg=1, nret=1)
at server/scripting/script.c:128
status = 0
base = 1
#10 0x005a9493 in script_callback_invoke (
callback_name=0x19f3730 "hut_enter_callback", nargs=1,
args=0x7fffdbb2c610)
at server/scripting/script.c:250
nres = 32731920
res = false
#11 0x005a9f1a in script_signal_emit (signal_name=0x5e101d
"hut_enter", 
nargs=1)
at server/scripting/script_signal.c:258
myiter = 0x0
pcallback = 0x19f3930
hash = 0x1f37e90
signal = 0x19f7720
args = {{gp_offset = 32, fp_offset = 48, 
overflow_arg_area = 0x7fffdbb2c710, reg_save_area =
0x7fffdbb2c650}}
#12 0x0044a18e in unit_enter_hut (punit=0x1799b60)
at server/unittools.c:2377
pplayer = 0x981800
behavior = HUT_NORMAL
#13 0x0044c00c in move_unit (punit=0x1799b60, pdesttile=0x1807b20, 
move_cost=3) at server/unittools.c:3038
saved_id = 162
pplayer = 0x981800
psrctile = 0x1807ac0
pcity = 0x0
ptransporter = 0x0
old_vision = 0x1f2c9c0
new_vision = 0x18c23c0
saved_id = 162
unit_lives = true
__PRETTY_FUNCTION__ = "move_unit"
#14 0x004ce2b7 in unit_move_handling (punit=0x1799b60, 
pdesttile=0x1807b20, igzoc=false, move_diplomat_city=true)
at server/unithand.c:1366
move_cost = 3
pplayer = 0x981800
pcity = 0x0
__PRETTY_FUNCTION__ = "unit_move_handling"
#15 0x00467f60 in ai_unit_move (punit=0x1799b60, ptile=0x1807b20)
at ai/aitools.c:1089
bodyguard = 0x7fffdbb2c980
sanity = 162
pplayer = 0x981800
is_ai = false
__PRETTY_FUNCTION__ = "ai_unit_move"