Crash with set_wares in warfare tutorial

Bug #1662479 reported by GunChleoc
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

When starting the warfare tuorial, the following crash happens:

 WidelandsMapLoader::load_map_complete() for 'Warfare' took 182ms
[sync] Reset
ComputerPlayer(2): initializing as type 2
 2: expedition max duration = 3600 (60 minutes), map area root: 64
Trying to run: map:scripting/init.lua: Forcing flag at (32, 63)
Forcing flag at (34, 58)
Message: adding warehouse for player 1 at (33, 57)
Forcing flag at (29, 58)
Forcing flag at (38, 62)
Forcing flag at (30, 59)
Forcing flag at (32, 59)
Fatal exception: lua: [C:\projects\widelands\src\scripting\lua_errors.cc:22] [C:\projects\widelands\src\scripting\lua_errors.cc:22] [string "scripting/coroutine.lua"]:32: [string "scripting/infrastructure.lua"]:113: attempt to call a nil value (method 'set_wares')
stack traceback:
 [string "scripting/init.lua"]:15: in main chunk
FATAL ERROR - game crashed. Attempting emergency save.
Game: Writing Preload Data ...

Related branches

Revision history for this message
TiborB (tiborb95) wrote :

The barracks are involved here.
bdescr.wares - returns table, but should not
bdescr.inputs - returns nil, but should return table
if I am right, for productionsites it should be this way. Or not?

Revision history for this message
GunChleoc (gunchleoc) wrote :

https://wl.widelands.org/docs/wl/autogen_wl_map/

For inputs, check class wl.map.HasInputs, the get_inputs function.

class wl.map.HasWares for wares.

What is returned depends on how the methods are called.

Revision history for this message
TiborB (tiborb95) wrote :

Well, the problem was in bdescr.wares - I did not understood what it is, but I figured it out. I will propose the fix soon

GunChleoc (gunchleoc)
Changed in widelands:
status: New → Fix Committed
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.