Problem loading ruleset - "segmentation fault"

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
User avatar
Corbeau
Elite
Posts: 924
Joined: Mon Jan 13, 2014 11:13 pm

Problem loading ruleset - "segmentation fault"

Postby Corbeau » Thu May 09, 2019 5:20 pm

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?

User avatar
Caedo
Elite
Posts: 470
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Problem loading ruleset - "segmentation fault"

Postby Caedo » Fri May 10, 2019 7:54 am

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.
~S.C. L.

User avatar
Corbeau
Elite
Posts: 924
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem loading ruleset - "segmentation fault"

Postby Corbeau » Fri May 10, 2019 8:16 am

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.

cazfi
Elite
Posts: 1616
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem loading ruleset - "segmentation fault"

Postby cazfi » Fri May 10, 2019 5:45 pm

Is this ruleset available somewhere for me to run it in debugger?

User avatar
Corbeau
Elite
Posts: 924
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem loading ruleset - "segmentation fault"

Postby Corbeau » Fri May 10, 2019 9:34 pm

It's LT48 in the Longturn Github. I can attach it here later, not at home now.

edit: Attached.
Attachments
LT48.zip
(67.38 KiB) Downloaded 4 times

cazfi
Elite
Posts: 1616
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem loading ruleset - "segmentation fault"

Postby cazfi » Sat May 11, 2019 12:45 am

Bowmen has no tech_req, not even "None"

cazfi
Elite
Posts: 1616
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem loading ruleset - "segmentation fault"

Postby cazfi » Sat May 11, 2019 12:48 am


User avatar
Corbeau
Elite
Posts: 924
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem loading ruleset - "segmentation fault"

Postby Corbeau » Sat May 11, 2019 6:55 am

Image