Latest Posts

Topic: Destroying a port causes a crash

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-11, 02:02
widelands: ../src/logic/map_objects/tribes/warehouse.cc:726: virtual void Widelands::Warehouse::cleanup(Widelands::EditorGameBase&): Zusicherung »!game->is_loaded() || (!incorporated_workers_.count(id) || incorporated_workers_[id].empty())« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

Attachment:
wl_autosave_00.wgf (864.6 KB)

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

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-01-11, 11:29

I cannot even load your tribe with the latest version 1.0~git25287[7188a17@HEAD] (Debug): FATAL EXCEPTION: special building 'scouts_house' not defined

So please fix this before your savegame can be investigated face-smile.png Is the bug reproducible? Any special action needed to trigger it?


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-11, 17:22

My tribe has no scouts_house defined. As a workarround please use "scouts_house = "europeans_foresters_house_basic"," in the units.lua. I tried it and the savegame is playable with this line. The subsequent installation of a newly "europeans_scouts_house" would probably not work, since the building would not be activated in the savegame.

Myself is out of game, its only AI vs. AI. If the barbarians destroyes the port of the europeans on the main land, than the game crashes. You can trigger it directly if you destroy this port via a lua command. Same effect.

Edited: 2021-01-11, 17:40

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

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-01-11, 17:43

Please do add a scout's building for your tribe, else it will crash when a player attempts to use the new targeted scouting feature with it.

Crash confirmed & backtrace attached, will investigate


Attachment:
bt.txt (17.2 KB)

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-11, 18:06

Okay. I forgot the scout as I designed my tribe, because I never used this feature. My militarysites can be extented to advanced buildings with very high vision range.


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

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-01-11, 19:57

Now here's an interesting bug. The port in question has incorporated 20 workers of type europeans_builder – but the stock lists only 2 of these workers. That's 18 existing and properly initialized workers just missing from the records, which causes trouble when the warehouse does an inventory (as happens e.g. on cleanup). I have no idea how this can happen… Did you do some Lua magic to fiddle with workers? If not, can you upload a replay?


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 321
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-11, 20:25

> *Nordfriese wrote:*
>
> Now here's an interesting bug. The port in question has incorporated 20 workers of type `europeans_builder` – but the stock lists only 2 of these workers. That's 18 existing and properly initialized workers just missing from the records, which causes trouble when the warehouse does an inventory (as happens e.g. on cleanup). I have no idea how this can happen… Did you do some Lua magic to fiddle with workers? If not, can you upload a replay?

My fault. I used a set_worker_debug_script to set a worker count. At the beginning of the game, the AI had a stall in building work, because of missing build materials. So there were contructionssites with all materials but without a builder and other constructionssite had a builder but not all material. So I used my debug-script to create some builders from nothing, that the AI could properly start the game. Maybe this cause this error.

Next time I use my script I should create sommer hammers with set_ware instead of using set_worker. I will delete my set_worker function from my debug script.

Edited: 2021-01-11, 20:30

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

Top Quote