fully promoted soldiers remaining in training sites

Bug #1490116 reported by king of nowhere
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
TiborB

Bug Description

I noticed a bug in 7485. Sometimes, when I reload a game, there is a level 10 soldier in a training site that will not go out on its own. it's quite annoying because it keeps the site stuck. Attached is a saved game where it happens. blue player has 2 training sites, one of them is between the four mountains stretching north to south in the vast green expanse. In that training site, there is a fully promoted soldier inside that will not go out unless kicked manually.

Related branches

Revision history for this message
king of nowhere (lainluigi86) wrote :
Revision history for this message
Albert Einstein (w-aaaaa) wrote :
Revision history for this message
TiborB (tiborb95) wrote :

Are you sure this is a problem of game save/load?

I looked at the code, the bottom line is that fully trained soldier is dropped only after succesfull upgrade. Once an upgrade is not possible (so no upgrade takes place) algorithm is not going to drop such soldier.

It would be convenient if you can say for sure if problem occured during normal (uninterrupted) game or it is problem of save/load.

Revision history for this message
king of nowhere (lainluigi86) wrote :

I have no idea. I only noticed the odd behavior after reloading saved games. It doesn't happen very often, so it is difficult to replicate and identify the moment it happpens. Plus, I often play with the training site open, and I never noticed it while I was looking. That's why I suppose it is related to loading a game.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think there should be some safeguard code in any case that the site periodically makes sure that there are no fully trained soldiers hanging around by accident. If this is a saveload bug, such a check will mask that bug, but it would also make the error go away.

Revision history for this message
TiborB (tiborb95) wrote :

@GunChleoc

I am working on exactly this type of fix. It is good solution, only it does not fix the cause itself. In fact so far I failed to find an actual bug in code...

Changed in widelands:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → TiborB (tiborb95)
Revision history for this message
TiborB (tiborb95) wrote :

fixed in rev. 7516

Changed in widelands:
status: Confirmed → Fix Committed
Changed in widelands:
milestone: none → build19-rc1
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.