two bugs in a row

Do you want to help out with Freeciv development? Then check out this forum.
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

two bugs in a row

Post by meynaf »

Don't know how to reproduce. Happened only once in hours of game play.
But that's once too much and there are two errors.

The main window suddenly disappeared right after i've moved some unit, returning to menu as if i'd have selected to disconnect.
In the log was the following message :
Rupture de la connexion avec le serveur (erreur de décodage) !
(text from FR ; basically says connection broken due to some decoding error)

That was the first bug.
Here is the second : normally there is some automatic save in case of passive disconnect (like with a client crash). Here, no save...

Maybe they are already fixed but how can I know this ? I just can't try another version ; as said, unlikely to reproduce.
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: two bugs in a row

Post by meynaf »

Well, it appears it's not THAT difficult to reproduce. At least, from my current game.
I have a barb city which I cannot approach with a unit : it always triggers the problem.
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: two bugs in a row

Post by Alien Valkyrie »

Could you upload the last save from before the crash?
Also, what Freeciv version are you using?
Lastly, I assume you're playing single-player, so a version mismatch between client and server is unlikely?
~ AVL
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: two bugs in a row

Post by meynaf »

Caedo wrote:Could you upload the last save from before the crash?
That will be difficult. You'd need the whole ruleset with it because it's far from being standard (and attempt to apply standard rules again with that save, only gets assertion errors).

Caedo wrote: Also, what Freeciv version are you using?
Both 2.5.9 and 2.5.11 showed the behaviour. I can't test 2.6 because the ruleset won't work there (and my feeble attempt fails without an error message so i don't know what to fix next).

Caedo wrote: Lastly, I assume you're playing single-player, so a version mismatch between client and server is unlikely?
Totally unlikely indeed ;)

However, by hacking the save game i finally found what was wrong with that city.
It had 132 units inside !
I guess the max is at 128 ?
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: two bugs in a row

Post by Alien Valkyrie »

meynaf wrote:However, by hacking the save game i finally found what was wrong with that city.
It had 132 units inside !
I guess the max is at 128 ?
Possibly (though it's probably more likely to be 127). Did removing some of the units solve the problem? Because if so, this is worthy of a proper report over on HRM. (If not, we'll really need the save and ruleset to figure anything more out.)
~ AVL
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: two bugs in a row

Post by meynaf »

Caedo wrote: Possibly (though it's probably more likely to be 127). Did removing some of the units solve the problem? Because if so, this is worthy of a proper report over on HRM. (If not, we'll really need the save and ruleset to figure anything more out.)
Yes, removing some of the units actually solved the problem.
The limit, however, looks more like 100 than 127 ; i don't know the exact number and am not sure it's of any relevance at all.
The recalled me the old times when 1.12.0 crashed because i had more than 255 cities ;)

The fact it's a custom ruleset should not have any impact ; it just triggered the fact that so many units ended up in the same city.
Barbs - actually pirates - took a lot of AI cities and kept them for a very long time.
The ruleset is very tough for the computer players ; 9 out of 20 did not survive barb attacks (this, however, made the few survivors stronger because they had more space to settle).
Being allowed to harbor so many homeless units, the city of Spanawatka contained up to 79 barbarian leaders, 19 legions, 37 galleons.

Removing the "dc" entry in the save game, decreasing dc_total accordingly, allows moving a single unit. But the problems occurs again later.
Oddly, it appeared units could come if they arrive right to a cell that's actually worked by the city.
I could finally approach with a few destroyers, and this was more fun than editing the save game with npp :geek:
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: two bugs in a row

Post by Alien Valkyrie »

I haven't been able to easily reproduce the bug (2.5.11, gui-gtk2 client). I tried to create a city inside the fog of war using the edit mode, then place a large number of units inside, then discovering it, but that didn't cause a client crash. It was not a barbarian city (though I doubt that would make the difference).
Having that savegame and ruleset could really be useful in fixing this bug, because if it's not reproducible, it's really hard to figure out the cause. Who knows, maybe it's a weird combination of a quirk of your ruleset along with the name of the city and a specific unit inside the city or something.
~ AVL
User avatar
meynaf
Hardened
Posts: 155
Joined: Sun Jan 21, 2018 10:27 am
Location: Lyon / France
Contact:

Re: two bugs in a row

Post by meynaf »

What you did does not trigger the problem. As suggested, it's linked with "dc" entry (i.e. your city must have a non up-to-date version in that tab for this to work).
So create your city, visit it, then leave it alone (away from any unit able to view it). Of course, must be an enemy city, not one you own.
Then add the units.
After a few turns, return and attempt to move around it. Only the 8 cells directly close seem to have an effect.
If a unit can come without problem, try putting another on the same cell.

I tried changing the city name (even swapping it with another city), the city id, etc. Still crash.
Changing its location is ok, no problem with units inside.
Removing the worked tiles makes the city get "repaired" at startup and then i can move by - but not for long.
cazfi
Elite
Posts: 3069
Joined: Tue Jan 29, 2013 6:54 pm

Re: two bugs in a row

Post by cazfi »

meynaf wrote:
Caedo wrote:Could you upload the last save from before the crash?
That will be difficult. You'd need the whole ruleset with it because it's far from being standard (and attempt to apply standard rules again with that save, only gets assertion errors).
Is there a reason you can't share also your ruleset? What sounds like a easy thing to debug (because of reproducibility) is going to be very hard hunt otherwise.
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: two bugs in a row

Post by Alien Valkyrie »

So far, I haven't been able to reproduce the crash. I've encountered a (possibly related) crash that occasionally occurred when adding units to the city, but I couldn't reproduce that crash either (it happened twice by itself, but when I tried to actively reproduce it, it didn't).

If you can find a course of action that's sure to reproduce the crash (preferably beginning at starting a new game), it might be possible to figure out the cause; otherwise we'll really need that savegame.
~ AVL
Post Reply