Adding wrong ware per script crashes game

Bug #1638280 reported by Notabilis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Unassigned

Bug Description

When creating and filling a building per lua script, the game crashes when the ware can not be stored in the building.

Version: trunk/r8163

Steps to reproduce:
- Modify:
 data/tribes/scripting/starting_conditions/barbarians/fortified_village.lua
- Give the lime kiln "log" instead of "coal" as input.
- Start a game as a barbarian fortified village.

Expected behavior would be an ingame message about the error (as hinted by the console output and happening on other lua errors). Unfortunately, the game crashes while trying to do so.

Related branches

Revision history for this message
Notabilis (notabilis27) wrote :
Revision history for this message
GunChleoc (gunchleoc) wrote :

We actually get these a lot with Lua programming errors, and it's sort of on purpose - we didn't halt these in the past and ended up with some bugs that nobody noticed for a good while.

It is still possible to unpause the game and continue playing, so this doesn't qualify as a crash.

Attaching a screenshot of the error message.

Revision history for this message
Notabilis (notabilis27) wrote :

That is the message I was expecting to see (and have seen with other errors).

Ah, turns out I failed with the "steps to reproduce" (again...).
It only crashes, when the player is the only participant in the game. With some
AIs it works fine.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Yes, I can reproduce that when I deactivate a player in the setup screen.

Changed in widelands:
status: New → Triaged
milestone: none → build20-rc1
importance: Undecided → Low
tags: added: crash lowhangingfruit
GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: Triaged → In Progress
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-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.