Skip to content
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

Assertion failure in wb::side_actions_container::erase #1841

Closed
orivej opened this issue Jul 17, 2017 · 5 comments
Closed

Assertion failure in wb::side_actions_container::erase #1841

orivej opened this issue Jul 17, 2017 · 5 comments
Labels
Bug Issues involving unexpected behavior. Whiteboard Issues with the Planning Mode (a.k.a. Whiteboard) feature.

Comments

@orivej
Copy link

orivej commented Jul 17, 2017

Wesnoth 1.13.8 has crashed, so I built the current master (d02be2a) to investigate. The OS is Linux.

This save https://s3.amazonaws.com/orivej/bugs/wesnoth/HaT-Los_elfos_asediados-Guardado_autom%C3%A1tico7.gz reliably crashes the game if I:

  • load it
  • click on Konrad (13.13)
  • click on a village (2.6)
  • confirm move (y)
  • move mouse

May be related to #1595

Backtrace:

[0] from 0x00007ffff2e67384 in raise+-77943452
[1] from 0x00007ffff2e687ea in abort+362
[2] from 0x00007ffff2e60157 in __assert_fail_base+279
[3] from 0x00007ffff2e60202 in __assert_fail+66
[4] from 0x00000000010f6d59 in wb::side_actions_container::erase at /tmp/wesnoth/src/whiteboard/side_actions.cpp:229
[5] from 0x00000000010f6e7c in wb::side_actions::safe_erase+140 at /tmp/wesnoth/src/whiteboard/side_actions.cpp:671
[6] from 0x00000000010f6fd4 in wb::side_actions::synced_erase+100 at /tmp/wesnoth/src/whiteboard/side_actions.cpp:646
[7] from 0x00000000010f75d1 in wb::side_actions::remove_action+97 at /tmp/wesnoth/src/whiteboard/side_actions.cpp:548
[8] from 0x00000000010e6abb in wb::mapbuilder::process+1147 at /tmp/wesnoth/src/whiteboard/mapbuilder.cpp:142
[9] from 0x00000000010e7d84 in wb::mapbuilder::build_map+436 at /tmp/wesnoth/src/whiteboard/mapbuilder.cpp:106
[10] from 0x00000000010dd4ab in wb::manager::set_planned_unit_map+235 at /tmp/wesnoth/src/whiteboard/manager.cpp:1153
[11] from 0x00000000010dda38 in wb::future_map_if_active::future_map_if_active+4264 at /tmp/wesnoth/src/whiteboard/manager.cpp:1216
[12] from 0x0000000000f2d266 in events::mouse_handler::mouse_motion at /tmp/wesnoth/src/mouse_events.cpp:127
[13] from 0x0000000000aed75a in controller_base::handle_event at /tmp/wesnoth/src/controller_base.cpp:97
[14] from 0x00000000011dd620 in events::pump+1952 at /tmp/wesnoth/src/events.cpp:619
[15] from 0x0000000000aee1ca in controller_base::play_slice+74 at /tmp/wesnoth/src/controller_base.cpp:215
[16] from 0x0000000000f5bfcd in play_controller::play_slice_catch+77 at /tmp/wesnoth/src/play_controller.cpp:1045
[17] from 0x0000000000f696cc in playsingle_controller::play_human_turn at /tmp/wesnoth/src/playsingle_controller.cpp:467
[18] from 0x0000000000f67f94 in playsingle_controller::play_side_impl at /tmp/wesnoth/src/playsingle_controller.cpp:385
[19] from 0x0000000000f60185 in play_controller::play_side+277 at /tmp/wesnoth/src/play_controller.cpp:1137
[20] from 0x0000000000f60b34 in play_controller::play_turn+228 at /tmp/wesnoth/src/play_controller.cpp:1175
[21] from 0x0000000000f68e06 in playsingle_controller::play_scenario_main_loop+118 at /tmp/wesnoth/src/playsingle_controller.cpp:179
[22] from 0x0000000000f6a097 in playsingle_controller::play_scenario+2055 at /tmp/wesnoth/src/playsingle_controller.cpp:268
[23] from 0x0000000000c43d2f in campaign_controller::playsingle_scenario+175 at /tmp/wesnoth/src/game_initialization/playcampaign.cpp:194
[24] from 0x0000000000c4418b in campaign_controller::play_game+139 at /tmp/wesnoth/src/game_initialization/playcampaign.cpp:281
[25] from 0x0000000000c4fd17 in game_launcher::launch_game+231 at /tmp/wesnoth/src/game_launcher.cpp:953
[26] from 0x00000000008fc72c in do_gameloop at /tmp/wesnoth/src/wesnoth.cpp:832
[27] from 0x00000000008fc72c in main+4588 at /tmp/wesnoth/src/wesnoth.cpp:1060
@gfgtdf gfgtdf added Bug Issues involving unexpected behavior. Whiteboard Issues with the Planning Mode (a.k.a. Whiteboard) feature. labels Jul 17, 2017
@gfgtdf
Copy link
Contributor

gfgtdf commented Jul 17, 2017

the log said '__assert_fail', usually asserts have an erromessage, maybe you coudl try to get the erromessage aswell ?

@gfgtdf
Copy link
Contributor

gfgtdf commented Jul 17, 2017

Ok confirmed, the erromessage is side_action.cpp#L229 turn_of_position == 0

@Wedge009
Copy link
Member

@orivej Yes, I believe this is a duplicate of or at least strongly related to #1595, as well as #1324.

@gfgtdf
Copy link
Contributor

gfgtdf commented Apr 29, 2018

i couldn't reprduce this anymore in 1.14.0

gfgtdf added a commit to gfgtdf/wesnoth that referenced this issue Apr 30, 2018
i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (wesnoth#1841)
and also consiers the case `position` appears multiple times in
`turn_beginnings_`
gfgtdf added a commit that referenced this issue Apr 30, 2018
i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (#1841)
and also consiers the case where `position` appears multiple times in
`turn_beginnings_`
@gfgtdf
Copy link
Contributor

gfgtdf commented May 3, 2018

fixed in fd5fdd8

@gfgtdf gfgtdf closed this as completed May 3, 2018
Vultraz pushed a commit that referenced this issue May 3, 2018
i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (#1841)
and also consiers the case where `position` appears multiple times in
`turn_beginnings_`
jostephd pushed a commit to jostephd/wesnoth that referenced this issue Oct 6, 2018
i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (wesnoth#1841)
and also consiers the case where `position` appears multiple times in
`turn_beginnings_`
jostephd pushed a commit to jostephd/wesnoth that referenced this issue Oct 7, 2018
i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (wesnoth#1841)
and also consiers the case where `position` appears multiple times in
`turn_beginnings_`

(cherry-picked from commit 195913f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. Whiteboard Issues with the Planning Mode (a.k.a. Whiteboard) feature.
Projects
None yet
Development

No branches or pull requests

3 participants