New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGABRT calculate_probability_of_debuff #2251

Closed
vgaming opened this Issue Nov 28, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@vgaming
Contributor

vgaming commented Nov 28, 2017

(gdb) run
Starting program: /opt/wesnoth-1.13-debug/bin/wesnoth --debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffecd7f700 (LWP 116)]
Battle for Wesnoth v1.13.10+dev (e8655af1-Clean)
Started on Tue Nov 28 21:44:37 2017


Data directory:               /opt/wesnoth-1.13-debug/share/wesnoth
User configuration directory: /home/vasya/.local/share/wesnoth/1.13
User data directory:          /home/vasya/.local/share/wesnoth/1.13
Cache directory:              /home/vasya/.local/share/wesnoth/1.13/cache

Setting mode to 1920x1048
[New Thread 0x7fffe7725700 (LWP 117)]
20171128 21:44:38 warning general: no location found for 'data/add-ons/Creep_War_Dev/translations', skipping textdomain
[Thread 0x7fffe7725700 (LWP 117) exited]
Checking lua scripts... ok
[New Thread 0x7fffe7725700 (LWP 118)]
[Thread 0x7fffe7725700 (LWP 118) exited]
[New Thread 0x7fffe7725700 (LWP 119)]
[Thread 0x7fffe7725700 (LWP 119) exited]
ERROR: TYPE ERROR: expected string but found null (null())
  enemy_of
  unit_at
  direction_from
formula type error: TYPE ERROR: expected string but found null (null())
ERROR: TYPE ERROR: expected string but found null (null())
  enemy_of
  unit_at
  direction_from
formula type error: TYPE ERROR: expected string but found null (null())
ERROR: TYPE ERROR: expected string but found null (null())
  enemy_of
  unit_at
  direction_from
formula type error: TYPE ERROR: expected string but found null (null())
ERROR: TYPE ERROR: expected string but found null (null())
  enemy_of
  unit_at
  direction_from
formula type error: TYPE ERROR: expected string but found null (null())
ERROR: TYPE ERROR: expected string but found null (null())
  enemy_of
  unit_at
  direction_from
formula type error: TYPE ERROR: expected string but found null (null())
ERROR: TYPE ERROR: expected string but found null (null())
  enemy_of
  unit_at
  direction_from
formula type error: TYPE ERROR: expected string but found null (null())
wesnoth: src/attack_prediction.cpp:1766: double {anonymous}::calculate_probability_of_debuff(double, bool, double, double, bool, double): Assertion `prob_stay_alive >= 0.0 && prob_stay_alive <= 1.0' failed.

Thread 1 "wesnoth" received signal SIGABRT, Aborted.
0x00007ffff37c88a0 in raise () from /usr/lib/libc.so.6
(gdb) 
(gdb) bt
#0  0x00007ffff37c88a0 in raise () at /usr/lib/libc.so.6
#1  0x00007ffff37c9f09 in abort () at /usr/lib/libc.so.6
#2  0x00007ffff37c10dc in __assert_fail_base () at /usr/lib/libc.so.6
#3  0x00007ffff37c1153 in  () at /usr/lib/libc.so.6
#4  0x0000555555daefac in (anonymous namespace)::calculate_probability_of_debuff(double, bool, double, double, bool, double) (initial_prob=0, enemy_gives=false, prob_touched=0.99998719999999996, prob_stay_alive=-2.2204460492503131e-16, kill_heals=false, prob_kill=0) at src/attack_prediction.cpp:1766
#5  0x0000555555db2322 in combatant::fight(combatant&, bool) (this=0x555567501550, opponent=..., levelup_considered=true) at src/attack_prediction.cpp:2413
#6  0x0000555555cc100f in battle_context::get_attacker_combatant(combatant const*) (this=0x555562212980, prev_def=0x555567125d30) at src/actions/attack.cpp:461
#7  0x00005555562cb558 in ai::attack_analysis::analyze(gamemap const&, unit_map&, ai::readonly_context const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, double) (this=0x7fffffffba90, 
    map=..., units=..., ai_obj=
    ..., dstsrc=std::multimap with 417 elements = {...}, srcdst=std::multimap with 417 elements = {...}, enemy_dstsrc=std::multimap with 0 elements, aggression=0.90000000000000002)
    at src/ai/default/attack.cpp:141
#8  0x00005555562c63a8 in ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(map_location const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, map_location const*, bool*, std::vector<map_location, std::allocator<map_location> >&, std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> >&, ai::attack_analysis&, team const&) const (this=0x5555576a2dc0, loc=..., srcdst=std::multimap with 417 elements = {...}, dstsrc=std::multimap with 417 elements = {...}, fullmove_srcdst=std::multimap with 469 elements = {...}, fullmove_dstsrc=std::multimap with 469 elements = {...}, enemy_srcdst=std::multimap with 0 elements, enemy_dstsrc=std::multimap with 0 elements, tiles=0x7fffffffbb60, used_locations=0x7fffffffbb5a, units=std::vector of length 5, capacity 16 = {...}, result=std::vector of length 381, capacity 512 = {...}, cur_analysis=..., current_team=...) at src/ai/default/aspect_attacks.cpp:332
#9  0x00005555562c6443 in ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(map_location const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, map_location const*, bool*, std::vector<map_location, std::allocator<map_location> >&, std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> >&, ai::attack_analysis&, team const&) const (this=0x5555576a2dc0, loc=..., srcdst=std::multimap with 417 elements = {...}, dstsrc=std::multimap with 417 elements = {...}, fullmove_srcdst=std::multimap with 469 elements = {...}, fullmove_dstsrc=std::multimap with 469 elements = {...}, enemy_srcdst=std::multimap with 0 elements, enemy_dstsrc=std::multimap with 0 elements, tiles=0x7fffffffbb60, used_locations=0x7fffffffbb5a, units=std::vector of length 5, capacity 16 = {...}, result=std::vector of length 381, capacity 512 = {...}, cur_analysis=..., current_team=...) at src/ai/default/aspect_attacks.cpp:335
#10 0x00005555562c6443 in ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(map_location const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, map_location const*, bool*, std::vector<map_location, std::allocator<map_location> >&, std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> >&, ai::attack_analysis&, team const&) const (this=0x5555576a2dc0, loc=..., srcdst=std::multimap with 417 elements = {...}, dstsrc=std::multimap with 417 elements = {...}, fullmove_srcdst=std::multimap with 469 elements = {...}, fullmove_dstsrc=std::multimap with 469 elements = {...}, enemy_srcdst=std::multimap with 0 elements, enemy_dstsrc=std::multimap with 0 elements, tiles=0x7fffffffbb60, used_locations=0x7fffffffbb5a, units=std::vector of length 5, capacity 16 = {...}, result=std::vector of length 381, capacity 512 = {...}, cur_analysis=..., current_team=...) at src/ai/default/aspect_attacks.cpp:335
#11 0x00005555562c6443 in ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(map_location const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, map_location const*, bool*, std::vector<map_location, std::allocator<map_location> >&, std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> >&, ai::attack_analysis&, team const&) const (this=0x5555576a2dc0, loc=..., srcdst=std::multimap with 417 elements = {...}, dstsrc=std::multimap with 417 elements = {...}, fullmove_srcdst=std::multimap with 469 elements = {...}, fullmove_dstsrc=std::multimap with 469 elements = {...}, enemy_srcdst=std::multimap with 0 elements, enemy_dstsrc=std::multimap with 0 elements, tiles=0x7fffffffbb60, used_locations=0x7fffffffbb5a, units=std::vector of length 5, capacity 16 = {...}, result=std::vector of length 381, capacity 512 = {...}, cur_analysis=..., current_team=...) at src/ai/default/aspect_attacks.cpp:335
#12 0x00005555562c6443 in ai::ai_default_rca::aspect_attacks_base::do_attack_analysis(map_location const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const---Type <return> to continue, or q <return> to quit---
&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, std::multimap<map_location, map_location, std::less<map_location>, std::allocator<std::pair<map_location const, map_location> > > const&, map_location const*, bool*, std::vector<map_location, std::allocator<map_location> >&, std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> >&, ai::attack_analysis&, team const&) const (this=0x5555576a2dc0, loc=..., srcdst=std::multimap with 417 elements = {...}, dstsrc=std::multimap with 417 elements = {...}, fullmove_srcdst=std::multimap with 469 elements = {...}, fullmove_dstsrc=std::multimap with 469 elements = {...}, enemy_srcdst=std::multimap with 0 elements, enemy_dstsrc=std::multimap with 0 elements, tiles=0x7fffffffbb60, used_locations=0x7fffffffbb5a, units=std::vector of length 5, capacity 16 = {...}, result=std::vector of length 381, capacity 512 = {...}, cur_analysis=..., current_team=...) at src/ai/default/aspect_attacks.cpp:335
#13 0x00005555562c4df9 in ai::ai_default_rca::aspect_attacks_base::analyze_targets() const (this=0x5555576a2dc0) at src/ai/default/aspect_attacks.cpp:118
#14 0x00005555562c4492 in ai::ai_default_rca::aspect_attacks_base::recalculate() const (this=0x5555576a2dc0) at src/ai/default/aspect_attacks.cpp:69
#15 0x0000555555d55e8d in ai::typesafe_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::get_ptr() const (this=0x5555576a2dc0)
    at src/ai/composite/aspect.hpp:169
#16 0x0000555555d99f31 in ai::composite_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::recalculate() const (this=0x5555585a0d80)
    at src/ai/composite/aspect.hpp:318
#17 0x0000555555d55e8d in ai::typesafe_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::get_ptr() const (this=0x5555585a0d80)
    at src/ai/composite/aspect.hpp:169
#18 0x0000555555d55d7a in ai::typesafe_aspect<std::vector<ai::attack_analysis, std::allocator<ai::attack_analysis> > >::get() const (this=0x5555585a0d80) at src/ai/composite/aspect.hpp:132
#19 0x00005555562b043a in ai::readonly_context_impl::get_attacks() const (this=0x5555585ba250) at src/ai/contexts.cpp:571
#20 0x0000555555cf05f7 in ai::readonly_context_proxy::get_attacks() const (this=0x5555585e8e98) at src/ai/contexts.hpp:677
#21 0x00005555562d48cf in ai::ai_default_rca::combat_phase::evaluate() (this=0x5555585e8cb0) at src/ai/default/ca.cpp:169
#22 0x0000555556327e74 in ai::ai_default_rca::candidate_action_evaluation_loop::do_play_stage() (this=0x55555d1673d0) at src/ai/default/stage_rca.cpp:112
#23 0x0000555555d09d57 in ai::stage::play_stage() (this=0x55555d1673f8) at src/ai/composite/stage.cpp:58
#24 0x0000555555cee6c3 in ai::ai_composite::play_turn() (this=0x5555585e62d0) at src/ai/composite/ai.cpp:150
#25 0x0000555555d357c4 in ai::manager::play_turn(int) (side=8) at src/ai/manager.cpp:769
#26 0x0000555556213c89 in playsingle_controller::play_ai_turn() (this=0x7fffffffc690) at src/playsingle_controller.cpp:560
#27 0x0000555556212bd8 in playsingle_controller::play_side_impl() (this=0x7fffffffc690) at src/playsingle_controller.cpp:402
#28 0x000055555620ca39 in playmp_controller::play_side_impl() (this=0x7fffffffc690) at src/playmp_controller.cpp:85
#29 0x0000555556207cea in play_controller::play_side() (this=0x7fffffffc690) at src/play_controller.cpp:1153
#30 0x0000555556207fa6 in play_controller::play_turn() (this=0x7fffffffc690) at src/play_controller.cpp:1191
#31 0x000055555621104f in playsingle_controller::play_scenario_main_loop() (this=0x7fffffffc690) at src/playsingle_controller.cpp:188
#32 0x00005555562119b3 in playsingle_controller::play_scenario(config const&) (this=0x7fffffffc690, level=...) at src/playsingle_controller.cpp:277
#33 0x0000555555f1a801 in campaign_controller::playmp_scenario(end_level_data&) (this=0x7fffffffcd40, end_level=...) at src/game_initialization/playcampaign.cpp:225
#34 0x0000555555f1ab32 in campaign_controller::play_game() (this=0x7fffffffcd40) at src/game_initialization/playcampaign.cpp:288
#35 0x0000555555f0edf1 in (anonymous namespace)::enter_staging_mode((anonymous namespace)::mp_workflow_helper_ptr) (helper=std::shared_ptr (count 3, weak 0) 0x5555576f5670)
    at src/game_initialization/multiplayer.cpp:455
#36 0x0000555555f0f215 in (anonymous namespace)::enter_create_mode((anonymous namespace)::mp_workflow_helper_ptr) (helper=std::shared_ptr (count 3, weak 0) 0x5555576f5670)
    at src/game_initialization/multiplayer.cpp:477
#37 0x0000555555f106a1 in mp::start_local_game(config const&, saved_game&) (game_config=..., state=...) at src/game_initialization/multiplayer.cpp:650
#38 0x00005555558dcb98 in game_launcher::play_multiplayer(game_launcher::mp_selection) (this=0x55555742ff50, res=game_launcher::MP_LOCAL) at src/game_launcher.cpp:848
#39 0x0000555555846d3f in do_gameloop(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (args=std::vector of length 2, capacity 2 = {...}) at src/wesnoth.cpp:821
#40 0x00005555558476fa in main(int, char**) (argc=2, argv=0x7fffffffe468) at src/wesnoth.cpp:1072
(gdb)

bt full is so huge that I've put it in a separate gist: https://gist.github.com/vgaming/1c4463a141b4c7add56616ecefac63e2

@Vultraz Vultraz added the Bug label Nov 28, 2017

@vgaming

This comment has been minimized.

Show comment
Hide comment
@vgaming

vgaming Nov 28, 2017

Contributor

I don't remember exactly, but I think I left my wesnoth instance playing against itself (AI vs AI).

Contributor

vgaming commented Nov 28, 2017

I don't remember exactly, but I think I left my wesnoth instance playing against itself (AI vs AI).

@Pentarctagon

This comment has been minimized.

Show comment
Hide comment
@Pentarctagon

Pentarctagon Nov 28, 2017

Member

Related to #2247?

Member

Pentarctagon commented Nov 28, 2017

Related to #2247?

@vgaming

This comment has been minimized.

Show comment
Hide comment
@vgaming

vgaming Nov 28, 2017

Contributor

@Pentarctagon it seems the log indeed shows #2247, too, but the SIGABT is because of a different bug. (Namely, probability exception.)

Contributor

vgaming commented Nov 28, 2017

@Pentarctagon it seems the log indeed shows #2247, too, but the SIGABT is because of a different bug. (Namely, probability exception.)

@jyrkive jyrkive closed this in f62b62b Nov 28, 2017

@vgaming

This comment has been minimized.

Show comment
Hide comment
@vgaming

vgaming Nov 28, 2017

Contributor

@jyrkive thanks.:)

Contributor

vgaming commented Nov 28, 2017

@jyrkive thanks.:)

GregoryLundberg added a commit that referenced this issue Nov 30, 2017

GregoryLundberg added a commit that referenced this issue Nov 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment