Page 1 of 1

Problem loading ruleset - "segmentation fault"

Posted: Thu May 09, 2019 5:20 pm
by Corbeau
Hello. I have been working on a ruleset and when I tried to load it to test it, I can't even get to the stage where I test the bugs.

When I try to load it through the Client, the window goes through a painfully slow listing of server settings and then "disconnects", and if I start the server and then type "rulesetdir LT48", this happens:

Code: Select all

> ruleset LT48
2: Loading rulesets.
Segmentation fault


Any ideas?

Re: Problem loading ruleset - "segmentation fault"

Posted: Fri May 10, 2019 7:54 am
by Alien Valkyrie
Try running the server with verbose logging:

Code: Select all

freeciv-server --debug 3
That might give some insight into when the error happens. This looks like a serious problem in the Freeciv server (not the ruleset); segfaults shouldn't ever happen.

Re: Problem loading ruleset - "segmentation fault"

Posted: Fri May 10, 2019 8:16 am
by Corbeau
Thanks.

Unfortunately, I get this, and I have a feeling it doesn't help:

Code: Select all

> rulesetdir LT48
3: set_rulesetdir() does load_rulesets() with "LT48"
2: Loading rulesets.
3: Trying "LT48/techs.ruleset".
3: Reading registry from "data/LT48/techs.ruleset"
3: Trying "LT48/buildings.ruleset".
3: Reading registry from "data/LT48/buildings.ruleset"
3: Trying "LT48/governments.ruleset".
3: Reading registry from "data/LT48/governments.ruleset"
3: Trying "LT48/units.ruleset".
3: Reading registry from "data/LT48/units.ruleset"
3: Trying "LT48/terrain.ruleset".
3: Reading registry from "data/LT48/terrain.ruleset"
3: Trying "LT48/cities.ruleset".
3: Reading registry from "data/LT48/cities.ruleset"
3: Trying "LT48/nations.ruleset".
3: Reading registry from "data/LT48/nations.ruleset"
3: Trying "LT48/effects.ruleset".
3: Reading registry from "data/LT48/effects.ruleset"
3: 87 advances (including possibly unused)
3: 77 improvement types (including possibly unused)
3: 10 unit classes
3: 64 unit types (including possibly unused)
Segmentation fault
It's not *only* server's fault because other rulesets are loaded fine, inclidung LT42 which was the base for LT48.

Is it possible that I simlpy missed a bracket somewhere in the file? I guess that error would be reported.

For testing, I loaded LT42 in this debug mode and, just after the "3: 58 unit types (including possibly unused)", I got a bunch of "unused entries" from effects.ruleset, which is fine, it was a known bug. But this is where loading of LT48 stops. Loading LT42 continues with game.ruleset.

So, the error is probably with effects.ruleset. I checked if it's because it's too big, but that's not it. I cut less relevant pieces and dropped it below LT42 size, but still no cigar.

Re: Problem loading ruleset - "segmentation fault"

Posted: Fri May 10, 2019 5:45 pm
by cazfi
Is this ruleset available somewhere for me to run it in debugger?

Re: Problem loading ruleset - "segmentation fault"

Posted: Fri May 10, 2019 9:34 pm
by Corbeau
It's LT48 in the Longturn Github. I can attach it here later, not at home now.

edit: Attached.

Re: Problem loading ruleset - "segmentation fault"

Posted: Sat May 11, 2019 12:45 am
by cazfi
Bowmen has no tech_req, not even "None"

Re: Problem loading ruleset - "segmentation fault"

Posted: Sat May 11, 2019 12:48 am
by cazfi

Re: Problem loading ruleset - "segmentation fault"

Posted: Sat May 11, 2019 6:55 am
by Corbeau
Image