Possible to override predefined tribe selection in multiplayer scenario if an AI player is included

Bug #946588 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Nasenbaer

Bug Description

Steps to reproduce:
1. Start a new multiplayer game.
2. First add some random map, for instance Crater.
3. Add yourself and an AI player with some non-atlantean tribe of your choice.
4. Now go back to the map selector and pick the multiplayer scenario game "Together we're strong". Make sure you check the box to load it as a scenario.
5. Observe the list of players.

Expected:
Since scenario mode was selected, both players should be given atlantean.

Actual:
If one of the players is an AI (doesn't seem to reproduce with two humans), the tribes are *not* changed, even though starting condition shifts to Scenario.
Yes, I realize the AI player will be completely rubbish in the scenario, but as long as it is possible to select them it should be handled. I briefly tried triggering this with Island jumping, but that seemed to change the tribe regardless of human/AI players. We should ensure all scenarios which limits tribe selection should set this, even with AI players.

If you start the game with either players as barbarian (and maybe empire?) you will receive the following error as a message in the inbox, as well as see it printed to the terminal.

Error in Lua Coroutine
[/home/user/widelands/src/scripting/scripting.h:45] Unknown Building: 'tower'
stack traceback:
 [string "aux:infrastructure"]:94: in function 'prefilled_buildings'
 [string "map:multiplayer_init"]:21: in function <[string "map:multiplayer_init"]:12>
Send message to all players and pause gamelastserial: 0

Widelands r6279

Revision history for this message
Jens Beyer (qcumber-some) wrote :

I'm having problems with your description.

1. If you start it as MP scenario, you don't have a choice of tribes, it's Atlantean.
2. If you don't start it as MP scenario (but as Map), I tried several combinations of Tribes without any luck triggering the error.

However, I see in the confs that there's an Empire and an Antlantean Tower, but no Barbarian tower, so this might be the root cause of the problem.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Hi Jens. I thought about this a bit more after filing it, and it turns out the real bug here is that I'm able to dodge the atlantean only choice when I start it as an MP scenario. I have updated the description to reflect this.

description: updated
summary: - Error in lua coroutine: unknown building 'tower'
+ Possible to override predefined tribe selection in multiplayer scenario
+ if an AI player is included
Revision history for this message
Nasenbaer (nasenbaer) wrote :

I wasn't able to reproduce it "out of the box", but from your description, this looks like a two bugs:

A) you should not be able to play that scenario with a computer player. If one was set before choosing that map, it should be replaced with an open slot

B) Widelands does not handle the predefined scenario tribe correctly.

I'll give it a try to fix it in the next days.

Changed in widelands:
assignee: nobody → Nasenbaer (nasenbaer)
Revision history for this message
Jens Beyer (qcumber-some) wrote :

We had a brief IRC conversation about this yesterday.
I can not reproduce it either on Gentoo, hjd can reproduce it on Ubuntu, but not on Arch.

Revision history for this message
SirVer (sirver) wrote :

I cannot reproduce it on Mac. This points to an uninitialized member or function variable which gets a random value depending on memory layout and/or compiler.

Revision history for this message
Venatrix (elisabeth) wrote :

I can reproduce it on Ubuntu 11.10 and bzr6279 with a modification:
The first map has to be "Together we are strong" itself. Other multiplayer maps seem to be unaffected.

Revision history for this message
Nasenbaer (nasenbaer) wrote :

jepp at least I can reproduce #6 :)
Thanks Venatrix!
I'll start working on it.

Revision history for this message
Nasenbaer (nasenbaer) wrote :

The case of #6 is fixed in bzr rev. 6284. I haven't found any uninitialized variables, that could have lead to that behaviour, so I guess the initial bug was the same, as described by Venatrix in #6.

In case I am wrong and it can still be reproduced or reappears, please reopen :)

Changed in widelands:
status: New → Fix Committed
Revision history for this message
Jens Beyer (qcumber-some) wrote :

I was also able to reproduce it the way of #6, but after updating current trunk I can confirm it's fixed :-)

Revision history for this message
SirVer (sirver) wrote : Re: [Bug 946588] Re: Possible to override predefined tribe selection in multiplayer scenario if an AI player is included

>The case of #6 is fixed in bzr rev. 6284. I haven't found any
>uninitialized variables, that could have lead to that behaviour, so I
>guess the initial bug was the same, as described by Venatrix in #6.

Lucky I didn't offered a bet for this then ;)

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I am not able to reproduce it with the latest changes either. Thanks for sorting this out :)

Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.