Latest Posts

Topic: WL crashes while saving if port and military building near enemy territory

hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2014-12-11, 22:36

Hi everybody. First of all I want to thank everybody involved with the project for so much fun since build 15. But today I have to report about a possible bug to improve the product. The bug arises when following conditions apply: 1. a port is build very close to enemy territory (in fact the ports working space overlaps with enemy territory, which in my case happened over a small channel or river) 2. a military building is erected in the territory solely reachable by the port which is affecting the enemy territory as well. ( the working space of the military building is overlapping with enemy territory) the bug results in the following behaviour: 1. an attemot to save the game ends with a crash into desktop and a corrupted savefile (this is either true for automatic as manual saving attempts) 2. the port switches its buttons: in the lower left corner a destroy button is shown instead of a expedition button. the situation can only be cured by destructing the port. if anybody tells me how I can provide 2 savegames with this behaviour

best regards hessenfarmer


Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2014-12-11, 23:40

It looks like portdock being destroyed and port stays without it. After some time it will crash the game. This should be fixed in development branch seafaring-ai. The game now tries to restore a portdock or burn the port down as well. Agressive, but it will keep the game consistent.

Bug report here: https://bugs.launchpad.net/widelands/+bug/1389211

Of course, the problem might be elsewhere.

(Portdock is invisible immovable in the water near the port, each port has and must have one)


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2014-12-12, 23:58

I don't know wether this is due to a destroyed portdock. However the crash only happens if the game should be saved. When automatic saving is turned off the game runs for hours and hours. it is even possible to reach the "colonies" territory to dismantle the damaged port and fix the problem by doing so. Until a military building from the "colony" affects the enemy territory the port works fine. After the effect takes place it does not support any shipping of goods any more. The curious thing is the effect does not need to occur near the port so it is not understandable why the port is affected. Again if anybody can explain to me how to send or upload a savegame I can provide 2 games on different maps where I tested the bug.

Best regards


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2014-12-13, 00:05

For clarification I'm running Build 18 official release. And the enemy is not doing anything that could affect my port. The only change leading to the effect is my own military building being manned by a soldier.

Best regards hessenfarmer


Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-12-13, 12:04

I have never heard of it. Could you please check whether the problem is still there in the latest version of Widelands (https://wl.widelands.org/wiki/Download/#unofficial_development_builds) and in the seafaring branch Tibor mentioned (https://code.launchpad.net/~widelands-dev/widelands/seafaring-ai) (you need to compile it yourself)?

If yes, please provide a savegame (using the current development build) that is not corrupted (e.g. before the military building is built). This makes it easier to reproduce the bug. You can upload the savegame to https://launchpad.net/widelands, which is the official bug tracker (Report a bug -> describe the problem as brief as possible and link here -> "Add attachment of patch").

Just for clarification: Your port does not work as a port anymore (only like a warehouse) after you built a military building next to it, and this only happens when there is an enemy next to it?


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2014-12-13, 16:27

Ok I'll try to check with the latest build on 8-Schuss (currently this is 7322) I don't know how to compile my own versions. To illustrate the problem I will upload 2 savegames played under build 18. For your clarification: yes the first part of the problem (port operating like warehouse) is like you describe it although the military Building does not necessarily need to be close to the port. It needs just to be close to the enemy territory´. thats what I found out so far.


Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-12-13, 16:42

I don't know how to compile my own versions

No problem. It is not trivial, so do not worry about it. Someone else can maybe do it, too.

To illustrate the problem I will upload 2 savegames played under build 18.

That is only partly useful. We had to break savegame compatibility, so the files cannot be loaded in the current development version (or Tibor's branch).


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2014-12-13, 18:32

I compiled build18, it is really problem with portdock, bt shows:

#0  0x08941951 in std::unique_ptr<Widelands::ExpeditionBootstrap, std::default_delete<Widelands::ExpeditionBootstrap> >::get (
    this=0x54) at /usr/include/c++/4.9.2/bits/unique_ptr.h:305
#1  0x08940b4f in Widelands::PortDock::expedition_started (this=0x0) at /var/widelands/BZR/build18/src/economy/portdock.cc:416
#2  0x08a630f7 in Widelands::Map_Buildingdata_Data_Packet::write_warehouse (this=0xbfffc384, warehouse=..., fw=..., game=..., 
    mos=...) at /var/widelands/BZR/build18/src/map_io/widelands_map_buildingdata_data_packet.cc:1507
#3  0x08a6251c in Widelands::Map_Buildingdata_Data_Packet::Write (this=0xbfffc384, fs=..., egbase=..., mos=...)
    at /var/widelands/BZR/build18/src/map_io/widelands_map_buildingdata_data_packet.cc:1322
#4  0x08a486b3 in Widelands::Map_Saver::save (this=0xb148e50) at /var/widelands/BZR/build18/src/map_io/widelands_map_saver.cc:189
#5  0x089e97ca in Widelands::Game_Map_Data_Packet::Write (this=0xbfffc4ac, fs=..., game=...)
    at /var/widelands/BZR/build18/src/game_io/game_map_data_packet.cc:71
#6  0x089e72dc in Widelands::Game_Saver::save (this=0xbfffc504) at /var/widelands/BZR/build18/src/game_io/game_saver.cc:61
#7  0x08972ca5 in SaveHandler::save_game (this=0xbfffd060, game=..., complete_filename="save/hextest1-own.wgf", error=0xbfffc628)
    at /var/widelands/BZR/build18/src/save_handler.cc:182


Particular lines in portdock.cc 415-417:

bool PortDock::expedition_started() {
	return (m_expedition_bootstrap.get() != nullptr) || m_expedition_ready;
}


So it is for 99% a problem with a missing portdock. And it crashes on save because it needs to read all objects on map and save them to a file.

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2654
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2014-12-13, 20:26

Thanks for all the effort. Unfortunately I can't currently help with trying on a newer build, cause I'm running only 32 bit Win Vista. Which leads me to the question if there is a future win32 release planned or if all future releases will be 64 bit. Anyhow now that Tibor could recreate the behaviour I hope you will be able to check whether this will still happen in newer releases. I'm going to upgrade my system but this will take time. It would be fine if anybody could update this thread if there is a solution. Again thousand thanks to everybody who is or was involved in creating such a great game. For my perspective it is far better than the original settlers.

Best regards hessenfarmer


Top Quote
wl-zocker

Joined: 2011-12-30, 16:37
Posts: 495
Ranking
Tribe Member
Location: Germany
Posted at: 2014-12-13, 20:49

Concerning 32bit builds: This thread contains probably what you need.

Thank you for reporting this bug on Launchpad. It will surely be investigated further.

We are all very happy to hear that you like Widelands so much. Remember that Widelands is still under development (bugs being fixed and new features being introduced). If you have some knowledge in programming or are interested in learning it, feel free to join us! Otherwise, simply enjoy the game face-smile.png


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote