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.
Post Reply
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Problem loading ruleset - "segmentation fault"

Post 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?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Problem loading ruleset - "segmentation fault"

Post 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.
~ AVL
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem loading ruleset - "segmentation fault"

Post 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.
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem loading ruleset - "segmentation fault"

Post by cazfi »

Is this ruleset available somewhere for me to run it in debugger?
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem loading ruleset - "segmentation fault"

Post by Corbeau »

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 311 times
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem loading ruleset - "segmentation fault"

Post by cazfi »

Bowmen has no tech_req, not even "None"
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem loading ruleset - "segmentation fault"

Post by cazfi »

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

Re: Problem loading ruleset - "segmentation fault"

Post by Corbeau »

Image
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Post Reply