Lua error when an AI wiped out another AI in endless game (nog fog of war) :27: attempt to concatenate local 'name' (a nil value)

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

Bug Description

I played a game with two other AI players, and selected "Endless game (no fog of war)" as game type. I didn't do anything, but I watched the AI players as they expanded and fought. Finally, one of the AI players wiped out the other and took over the last military buildings. At that point, I received an in-game message with the following message:

Error in Lua Coroutine
[/home/user/widelands/src/scripting/scripting.h:45] [string "aux:win_condition_functions"]:27: attempt to concatenate local 'name' (a nil value)
Send message to all players and pause game

This was also printed in the terminal. I assume it attempts to print the player name, and AI players might not have names?

Widelands r6254

Tags: ai lua
Revision history for this message
SirVer (sirver) wrote : Re: [Bug 940608] [NEW] Lua error when an AI wiped out another AI in endless game (nog fog of war) :27: attempt to concatenate local 'name' (a nil value)

>This was also printed in the terminal. I assume it attempts to print the
>player name, and AI players might not have names?
No, this is not the case. 05_endless_game_foless calls
check_player_defeated without setting the wc_name and wc_ver variable.
This nil values are passed on to make_extra_data which then crashes.
This would also crash for human players.

Peter, I assign you because those modifications and the win condition
are done by you, so I guess you know what you intended.

  status triaged
  importance high
  milestone build17-rc1
  assignee Nasenbaer

SirVer (sirver)
Changed in widelands:
assignee: nobody → Nasenbaer (nasenbaer)
Revision history for this message
Nasenbaer (nasenbaer) wrote :

Fixed in bzr rev.no 6265

Changed in widelands:
status: Triaged → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
SirVer (sirver) wrote :

Fixed in r6350.

Revision history for this message
SirVer (sirver) wrote :

Again :)

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.