bugBattle for Wesnoth - Bugs: bug #20352, Assertion failure line 631 of...

Show feedback again

bug #20352: Assertion failure line 631 of src/whiteboard/side_actions.cpp line 631, done via planning mode

Submitted by:  T <hoffmant99>
Submitted on:  Wed Dec 5 16:13:12 2012  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Whiteboard
Status: ConfirmedPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.10.5Operating System: All

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Mon Nov 7 12:38:42 2016, comment #4:

Bug #25227 seems related, has the same assertion failure in erase().

Wedge009 <wedge009>
Project Member
Mon Oct 12 11:09:23 2015, comment #3:

Using the conditions jamit described (primarily ending the first planned move on a friendly unit), I find the following in 1.13.1+dev:

Turn indicator 1: Not possible as this results in the friendly unit being selected.

Turn indicator 2: 'Dashed arrow', upon ending the turn the invalid planned move is discarded without warning.

Turn indicator 3: 'Dashed arrow', upon ending the turn the invalid planned move is discarded without warning.

Turn indicator 4+: 'Dashed arrow', upon ending the turn an assertion failure is flagged (even in 'release' build). If ignored, the invalid planned move is discarded without warning.

The aforementioned assertion is in side_actions_container::erase():
assert(turn_of_position == 0);

This is a rather contrived set-up, I don't think it is likely it will happen in normal play. Nonetheless, I think it would be good to implement a solution like disabling the 'end turn' button (and corresponding hot-key) while an invalid planned move is in place. Alternatively, display a warning or prompt when attempting to end the turn and prevent end of turn until the invalid planned move is removed.

It does involve a lot of UI tinkering, which I'm not very good at - let alone in Wesnoth. So I'll leave this as a suggestion or 'wish' while this bug report remains open.

Wedge009 <wedge009>
Project Member
Sat Dec 15 13:19:15 2012, comment #2:

I did a quick look at this, and it seems like the trigger conditions are:

1) Plan a move that goes (at least) three turns into the future (so the turn indicator for the move is a "4").

2) Have one of stages (turns) of the move end on a friendly unit.

If the turn indicator is less than 4, the planned move is trashed instead of this assertion failing. (When the turn indicator is 4, the C++ variable turn_num is 3, which no longer satisfies the second half of the assertion.)

This does not occur in 1.11. (In 1.11, the same conditions cause a "dashed arrow" to indicate the problematic move.)

J Tyne <jamit>
Project Member
Wed Dec 5 16:22:45 2012, comment #1:

I did not have enough space to include screen shots of Bug. E-mail me for more info.

(file #16828)

T <hoffmant99>
Wed Dec 5 16:13:12 2012, original submission:

When I played this scenario the first time and other reloads, I have this same error.

"Assertion failed!
src\whiteboard\side_actions.cpp, line 631
Expression: turn_num <= actions_.size() || turn_num <= 2"

>systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

OS Name: Microsoft Windows 7 Home Premium
OS Version: 6.1.7601 Service Pack 1 Build 7601

It happens when I move the 'Walking Corpse' from hex location (23,11) to (10,18) by 'planning mode'. See attached picture "bug0".

I get this message (is it an exception? I am not sure)
It is taken screen-shotted next to the line of the code I believe where the assertion is thrown. Even though I downloaded the code to look at, this error was thrown from the 1.10.5 Win executable downloaded - It was NOT ran from my own compiled attempts.

I have also attached auto saved files, you need to start from #4, as that is where the zombie initially is.

I am trying to enque the unit's path to hit all 4 of my allies villages, started with the closest one. I notice that if I enque any of the other 3 villages to the far west this error does not happen.

Recreating the Bug:
1.) Load "DiD-Saving_Parthyn-Auto-Save4" and try to move the 'Walking Corpse' unit from (23,11) to (10,18)

Another way to recreate the Bug:
2.) Load "DiD-Saving_Parthyn-Auto-Save4"
IF you hit "end turn" without performing ANY action, this error will happen again ONLY if you attempt to move the 'Walking Corpse' unit from (23,11) to any of the far two villages (2,13) and (6,14)

-- However, if DURING turn 4 you move your units around the river with a mix of normal moves and planning mode (some of them I moved immediately via normal moves and planning mode, one unit I enqued for two moves) you will NOT get this error when you attempt to move the 'Walking Corpse' unit on (23,11) to any of the four far west villages. This replay file has been included.

T <hoffmant99>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #16828:  README.txt added by hoffmant99 (290B - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by wedge009 (Posted a comment)
  • -unavailable- added by jamit (Posted a comment)
  • -unavailable- added by hoffmant99 (Submitted the item)
  • -unavailable- added by hoffmant99 (wesnoth bug, i love turtles!)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Nov 7 12:38:42 2016wedge009StatusNone=>Confirmed
      Assigned togabba=>None
      Operating SystemWin=>All
    Sat Dec 15 13:19:15 2012jamitAssigned toNone=>gabba
    Wed Dec 5 16:22:45 2012hoffmant99Attached File-=>Added README.txt, #16828
    Wed Dec 5 16:21:08 2012hoffmant99Attached File-=>Added DiD-Saving_Parthyn-Auto-Save4.gz, #16825
      Attached File-=>Added DiD-Saving_Parthyn-Auto-Save5SKIPPED.gz, #16826
      Attached File-=>Added DiD-Saving_Parthyn-Auto-Save5MOVED.gz, #16827
    Wed Dec 5 16:13:12 2012hoffmant99Carbon-Copy-=>Added -unavailable-
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup