some questions about ruleset development, some specific to the master branch of freeciv

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by Ignatus »

eldritch_cookie wrote: Thu Jul 14, 2022 11:02 am should i report any time that i get a segmentation fault instead of a error as a bug? that happens constantly,and i am using the latest master so i thought that was expected.
Well, a good error message is if the server politely tells you that your ruleset (or anything out of Freeciv application) is wrong when it is and terminates. If you see a traceback ladder, it's already something that should not happen for better and probably a point to be bugtracked. If you even get segfault instead of traceback, it's just a very bad error. Alas, the code of ruleset loading has been mostly tested on a limited range of parameters that appear in the standard rulesets and out of it has dozens of holes like overflows or dangling pointers that corrupt the application's memory, and if the program survives this stage, you easily get problems afterwards. Since your ruleset is, like, very unusual and tests limits of many things, you indeed naturally get loads of segfaults.

Reporting bugs is not what you are obliged to do but if you can supply some clues (describe what you were doing, bring console output, ruleset files or savegames, maybe for a segfault case run your program in gdb and show the backtrace) the developers will be thankful for the help (though not necessary that they deal with the problem in any specific time).
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

Yes, things that nobody has ever tried before (tested) are often broken. We don't have too many custom rulesets to do any testing with.

It's great to have a new ruleset to add to my autogame testing matrix. I'll do that next time I setup such run on master.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

cazfi wrote: Wed Jul 20, 2022 7:36 amIt's great to have a new ruleset to add to my autogame testing matrix. I'll do that next time I setup such run on master.
So far I've run only server-only autogames with this. First attempts were indeed crashing a lot, but now that I've had fixes for those issues found thanks to this testing, there's been no crashes in later runs. All the related fixes have now been pushed to the freeciv repository.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

Current ruleset version from git does not parse:
secfile '/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units.ruleset' in section 'unit_proponent_of_the_mark': Expected value
file "/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units/tier1.ruleset", line 101, pos 0
looking at: 'sound_move ='
included from file "/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units.ruleset", line 173
That looks like something that has never worked, but in general you should probably document which freeciv commit your ruleset is supposed to be compatible with, as you follow freeciv development branch with no frozen ruleset format.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

cazfi wrote: Thu Aug 25, 2022 11:49 am Current ruleset version from git does not parse:
secfile '/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units.ruleset' in section 'unit_proponent_of_the_mark': Expected value
file "/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units/tier1.ruleset", line 101, pos 0
looking at: 'sound_move ='
This error message seems to come out a bit confusing. In this particular case the value is missing from line 100: "graphic_alt =" already, though the parser ends to line 101 "sound_move =" when looking for that value.
Of course, value seems to missing from that "sound_move =" line too. It's just that fixing that latter problem is not going to get you rid of the first error message.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

cazfi wrote: Sat Sep 03, 2022 2:06 am This error message seems to come out a bit confusing.
-> https://osdn.net/projects/freeciv/ticket/45573
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

cazfi wrote: Sun Sep 04, 2022 11:41 pm
cazfi wrote: Sat Sep 03, 2022 2:06 am This error message seems to come out a bit confusing.
-> https://osdn.net/projects/freeciv/ticket/45573
Also, https://osdn.net/projects/freeciv/ticket/45418, fixes a crash I got in the error handling of that parse error on --enable-debug build. Going to push it in in a few minutes now, as soon as I've got some builds finished.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: some questions about ruleset development, some specific to the master branch of freeciv

Post by cazfi »

cazfi wrote: Thu Aug 25, 2022 11:49 am Current ruleset version from git does not parse:
secfile '/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units.ruleset' in section 'unit_proponent_of_the_mark': Expected value
file "/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units/tier1.ruleset", line 101, pos 0
looking at: 'sound_move ='
included from file "/work/freeciv/rulesets/3rd/S3_2/data/fantasy/units.ruleset", line 173
That looks like something that has never worked, but in general you should probably document which freeciv commit your ruleset is supposed to be compatible with, as you follow freeciv development branch with no frozen ruleset format.
I created a Pull Request to your repository to fix that part of your ruleset.
Post Reply