Latest Posts

Topic: Place port per Lua crashes the game

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 323
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-11-26, 10:43

*** # place_port(4,170,182)
*** Starting Lua interpretation!
Forcing flag at (170, 182)
Message: adding warehouse for player 4 at (169, 181)
Attempting to setup port without neighboring water (coords: 169x181).
AddressSanitizer:DEADLYSIGNAL

How can I prevent this? My Lua-Code uses the place_building_in_region-function from infrastructure.lua. I used the coordinates on map, which has a port space. Instead of crashing, the game should refuse a try of build a port, if no neighboring water, or ignore it.

Edited: 2020-11-26, 10:49

My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 1950
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-11-26, 10:49

Build-21? This should be fixed in master already: https://github.com/widelands/widelands/pull/3994


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 323
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-11-26, 10:50

Nordfriese wrote:

Build-21? This should be fixed in master already: https://github.com/widelands/widelands/pull/3994

Yes, Build 21.


My widelands project: https://github.com/widelands/wl_addons_server/tree/master/addons/europeans_tribe.wad

Top Quote