bugBattle for Wesnoth - Bugs: bug #20895, Using the default random map...

 
 
Show feedback again

bug #20895: Using the default random map generator in sp causes assertation failure

Submitted by:  SigurdFireDragon <sigurdfdragon>
Submitted on:  Thu 13 Jun 2013 05:30:09 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Campaign
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: trunk (1.11.4+dev)Operating System: Win 7 x64

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue 15 Apr 2014 01:44:12 AM UTC, comment #12:

No special reason to think it can be fixed soon.
No plans to do it myself. My C++ knowledge is dreadfully insufficient to handle this situation.

SigurdFireDragon <sigurdfdragon>
Mon 14 Apr 2014 02:28:37 AM UTC, comment #11:

It's an interesting (and undocumented :( ) commit you have found there. But my knowledge about that part of the code is quiet low, and most likely i cannot do anything else than the other thing before 1.12. Maybe i'll try to refcator gamestatus.hpp&co which could have an influence on this bug. but i don't think i'll do that in 1.12.

> When the "invalid because of no id" is solved, can a simplified backport for 1.12 be made?

do you have a specail reason to think we can fix this issue soon ? Or do you even plan to do it yourself ? If there is a commit that would fix this issue that doesn cause other problme ther is no reason why it shouldn't be backported.

the commit i mentioned earlier will most liekey go into 1.12.

Daniel <gfgtdf>
Project Member
Sat 12 Apr 2014 11:51:08 PM UTC, comment #10:

8617a02a88a38d8fe01ee0a3672d75fc5fe72924 fixed the assertation failure that occurred with loading MP random map start of scenario saves through the Main Screen -> Load Game menu; loading a start of scenario save from the in game top of screen menu bar -> menu -> load game during a game; and starting a SP Campaign that uses random maps. Thus, it seems to cover all occurrences of the assertion failure.

It did not fix loading a random map start of save through the Main Screen -> Multiplayer -> Load Game button, that still produces the: "The scenario is invalid because it has no id." error.

On a related note, can someone more knowledgeable than me take a look at c17d84b12f4b45555fa5ec2b3f51c4fe5a1d67e3 and see if anything there caused the issue? My reasoning is that the backtrace goes through playcampaign.cpp and this seems to be a significant change during the time frame in question that may have affected it.

When the "invalid because of no id" is solved, can a simplified backport for 1.12 be made?

SigurdFireDragon <sigurdfdragon>
Wed 02 Apr 2014 11:14:30 PM UTC, comment #9:

the bug might be fixed after 8617a02a88a38d8fe01ee0a3672d75fc5fe72924, since that code removes the file src\random.cpp.
(i noticed this bug after committing this, so the commit was unrelated to this bug)

Daniel <gfgtdf>
Project Member
Tue 04 Mar 2014 02:41:08 AM UTC, comment #8:

I've tried solve this by doing an alternate git timeline, but I'm not really familiar enough with git at this point to resolve all the conflicts that appeared. I've done all I can with this at this point. If anyone has any questions about any of my comments or research here, feel free to email me or pm me on the forums about it.

SigurdFireDragon <sigurdfdragon>
Sun 02 Feb 2014 03:22:17 AM UTC, comment #7:

More info: If you load a multiplayer start of scenario save that uses a random map with a road, what happens depends on how you load it.

Launch game -> Load button -> mp scenario start = crash (Same assertation failure line #74 as below)
Launch game -> Multiplayer button -> Local Game -> Load Game -> mp scenario start = message: "The scenario is invalid because it has no id."

SigurdFireDragon <sigurdfdragon>
Fri 03 Jan 2014 12:21:11 AM UTC, comment #6:

Wrong bug.

Alexander van Gessel <ai0867>
Project Member
Fri 03 Jan 2014 12:19:24 AM UTC, comment #5:

Fixed in 3a2c24d2d087.

For the bug to trigger, the attacker (the eye stalk) has to have exactly one usable attack (its gaze), and the defender (the royal guard) has to have no defense at that range. There are other requirements though, as simply pitting an ulf against a DA isn't enoough.

Alexander van Gessel <ai0867>
Project Member
Fri 03 Jan 2014 12:04:28 AM UTC, comment #4:

Also,
Running the map generator code in a strictly multiplayer setup does not cause problems.

SigurdFireDragon <sigurdfdragon>
Thu 02 Jan 2014 09:41:58 PM UTC, comment #3:

Some more info:

Final lines in 1.11.7+dev stderr using --log-debug=all
where it raises the assertion failure

Comparable lines in 1.10.7+dev stderr using --log-debug=all
where it works

Running the SP campaign in --debug Multiplayer does not cause the error.

Starting the SP campaign in single player with the MULTIPLAYER define does not prevent the assertation failure.

SigurdFireDragon <sigurdfdragon>
Sun 01 Dec 2013 05:45:26 AM UTC, comment #2:

This has something to do with road placement in the default map generator, as removing all [road_cost] tags from [generator] will prevent the assertion failure from occurring.

As an example, Mystery Campaign uses removing [road_cost] tags as a workaround for 1.11)

SigurdFireDragon <sigurdfdragon>
Fri 19 Jul 2013 12:17:11 AM UTC, comment #1:

Some more info on the bug:

I've narrowed the bug's introduction to between: 1a27a8cb08e846722005f618bdb8a14c843eee7e on 2012-02-22
and
84b8dbafd26fdd1000a8f677d65973cd836999b3 on 2012-08-24.
Due to the map format changes, I can't narrow it down futher, perhaps there's some fancy git branching/merging that could be done to allow the old format during the time period, but I don't know how to do that at the moment.

I ran a debug build using CodeBlocks 10.05 & gdb 7.3 here's the call stack:

Here's the relevant Codeblocks console dialog:

SigurdFireDragon <sigurdfdragon>
Thu 13 Jun 2013 05:30:09 PM UTC, original submission:

Whenever the default random map generator is used in a single player campaign, the following happens:

Assertion failed!
\src\random.cpp Line 74
Expresion: random_generator!=NULL

stderr relevant contents:

Attached is a test case add-on causing the error in sp

Here's a link to a possible relevant previous bug.
https://gna.org/bugs/?20009

SigurdFireDragon <sigurdfdragon>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #18082:  Test_Bed.zip added by sigurdfdragon (2kB - application/x-zip-compressed)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gfgtdf (Posted a comment)
  • -unavailable- added by ai0867 (Posted a comment)
  • -unavailable- added by sigurdfdragon (Submitted the item)
  •  

    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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Jan 2014 12:21:11 AM UTCai0867StatusFixed=>None
      Assigned toai0867=>None
    Fri 03 Jan 2014 12:19:24 AM UTCai0867StatusNone=>Fixed
      Assigned toNone=>ai0867
    Thu 13 Jun 2013 05:30:09 PM UTCsigurdfdragonAttached File-=>Added Test_Bed.zip, #18082
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup