[Freeciv-Dev] [bug #16656] Arithmetic exception in improvement_effect_value()

2010-09-13 Thread Matthias Pfafferodt

Follow-up Comment #4, bug #16656 (project freeciv):

 My proposal... 

Looks good; there are so many hidden code blokes I don't know about
(player_researches_iterate) ...

___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #16656] Arithmetic exception in improvement_effect_value()

2010-09-13 Thread pepeto

Follow-up Comment #5, bug #16656 (project freeciv):

player_researches_iterate is pretty new (see patch #1868 and patch #1869).


___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  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 #16656] Arithmetic exception in improvement_effect_value()

2010-09-13 Thread pepeto

Update of bug #16656 (project freeciv):

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


___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  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 #16656] Arithmetic exception in improvement_effect_value()

2010-09-12 Thread pepeto

Update of bug #16656 (project freeciv):

 Assigned to:None = pepeto 


___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  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 #16656] Arithmetic exception in improvement_effect_value()

2010-09-10 Thread pepeto

Follow-up Comment #2, bug #16656 (project freeciv):

This points out an other problem about _team_pooled_research_. It assumes the
research is shared by the team.


___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  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 #16656] Arithmetic exception in improvement_effect_value()

2010-09-10 Thread pepeto

Update of bug #16656 (project freeciv):

  Status:None = Ready For Test 

___

Follow-up Comment #3:

My proposal...


(file #10299)
___

Additional Item Attachment:

File name: trunk_improvement_effect_value.diff Size:2 KB


___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  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 #16656] Arithmetic exception in improvement_effect_value()

2010-09-07 Thread pepeto

URL:
  http://gna.org/bugs/?16656

 Summary: Arithmetic exception in improvement_effect_value()
 Project: Freeciv
Submitted by: pepeto
Submitted on: mardi 07.09.2010 à 11:28
Category: ai
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: trunk
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.3.0

___

Details:

Running with the experimental ruleset (maybe linked with tech upkeep?):

Program received signal SIGFPE, Arithmetic exception.
0x00427d20 in improvement_effect_value (pplayer=value optimised
out, 
pcity=value optimised out, pimprove=0x8d73a0, 
already=value optimised out) at aicity.c:526
526   turns = MIN(turns,
#0  0x00427d20 in improvement_effect_value (
pplayer=value optimised out, pcity=value optimised out, 
pimprove=0x8d73a0, already=value optimised out) at aicity.c:526
potential = -1
aplayer = 0x16634e0
_pslot = value optimised out
turns = 81
bulbs = 90
amount = 2
uclass = value optimised out
move = LAND_MOVING
num = value optimised out
#1  adjust_improvement_wants_by_effects (pplayer=value optimised out, 
pcity=value optimised out, pimprove=0x8d73a0, 
already=value optimised out) at aicity.c:1014
v1 = value optimised out
mypreq = 0x2
active = true
n_needed_techs = 0
myiter = 0x0
peffect = 0x51
v = value optimised out
cities = {0, 0, 1, 8, 10, 10}
nplayers = value optimised out
ai = 0x1d4e8a0
capital = false
can_build = value optimised out
source = {value = {advance = 0x8d73a0, govern = 0x8d73a0, 
building = 0x8d73a0, nation = 0x8d73a0, specialist = 0x8d73a0, 
terrain = 0x8d73a0, uclass = 0x8d73a0, utype = 0x8d73a0, 
base = 0x8d73a0, ai_level = 9270176, citytile = 9270176, 
minsize = 9270176, minyear = 9270176, outputtype = 9270176, 
terrainclass = 9270176, terrainalter = 9270176, special =
9270176, 
unitclassflag = 9270176, unitflag = 9270176}, 
  kind = VUT_IMPROVEMENT}
is_coinage = false
__FUNCTION__ = adjust_improvement_wants_by_effects
#2  0x00428801 in adjust_wants_by_effects (
pplayer=value optimised out) at aicity.c:1292
already = false
myiter = 0x1615b50
is_coinage = false
pimprove = 0x8d73a0
#3  ai_manage_buildings (pplayer=value optimised out) at aicity.c:1410
ai = value optimised out
wonder_city = 0x1613a90
__FUNCTION__ = ai_manage_buildings
#4  0x00428ff1 in ai_manage_cities (pplayer=0x16904a0) at
aicity.c:1939
__FUNCTION__ = ai_manage_cities
#5  0x004bdade in ai_do_last_activities (pplayer=0x16904a0)
at aihand.c:479
No locals.
#6  0x00406f15 in end_phase () at srv_main.c:876
MY_i = 1
pplayer = 0x16904a0
__FUNCTION__ = end_phase
#7  0x0040b97d in srv_running () at srv_main.c:2087
save_counter = 1
is_new_turn = true
eot_timer = 0x16afff0
need_send_pending_events = value optimised out
#8  srv_main () at srv_main.c:2467
__FUNCTION__ = srv_main
#9  0x004039af in main (argc=value optimised out, 
argv=0x7fffe2d8) at civserver.c:376
inx = 7
showhelp = false
showvers = false
option = 0xa3c0b0 \320\300\243
__FUNCTION__ = main






___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  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 #16656] Arithmetic exception in improvement_effect_value()

2010-09-07 Thread Matthias Pfafferodt

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

 Running with the experimental ruleset (maybe linked with tech
 upkeep?): 

Seems to be. I think you got a division by 0 (potential == -1):


if (valid_advance(pimprove-obsolete_by)) {
  turns = MIN(turns, 
  total_bulbs_required_for_goal(aplayer,
advance_number(pimprove-obsolete_by))
  / (potential + 1));
}


Does the attached patch fixes the problem? I'm not sure I do understand the
logic for this effect.


(file #10232)
___

Additional Item Attachment:

File name:
20100907-08-trunk-fix-possible-division-by-0-in-improvement_effect_val.patch
Size:2 KB


___

Reply to this item at:

  http://gna.org/bugs/?16656

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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