Bygfoot is too breakable concerning the config files

Here you can... report bugs. Open a new thread for each bug, please.
Post Reply
arnaudus
Posts: 41
Joined: Thu Dec 23, 2004 6:43 pm

Bygfoot is too breakable concerning the config files

Post by arnaudus »

I experienced lots of crashes due to the xml config files. With the last cvs version, when I launch "src/bygfoot", chosing some teams leads to a crash. For example, "country_scg" causes lots of error messages, and finally a segfault when a team is chosen and "OK" is clicked:

Code: Select all

** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: overall_teams; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: overall_teams; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: choose_team_user; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: choose_team_user; I'm in state 23


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: overall_teams; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: overall_teams; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: choose_team_user; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: choose_team_user; I'm in state 23


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: overall_teams; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: overall_teams; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: choose_team_user; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: choose_team_user; I'm in state 23


** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: xml_cup_read_end_element: unknown tag: type; I'm in state 0


** (bygfoot:7940): WARNING **: cup_load_choose_team: not enough teams in league 0 for chooseteam europe_champ_league (16; required: -1) in cup UEFA Supercup

Erreur de segmentation
Moreover, "make install" returns lots of errors, and it is impossible to install bygfoot:

Code: Select all

/usr/bin/install: ne peut évaluer `support_files/names/player_names_poland.xml': Aucun fichier ou répertoire de ce type
/usr/bin/install: ne peut évaluer `support_files/pixmaps/symbols/flag_czech.png': Aucun fichier ou répertoire de ce type
/usr/bin/install: ne peut évaluer `support_files/pixmaps/symbols/flag_denmark.png': Aucun fichier ou répertoire de ce type
... (snip dozens other errors)
I don't really want to report a precise bug on some config files, but rather to highlight the fact that, althrough they bring some wonderful features, the xml cup files also induce weaknesses and crashes, and I wonder if there is a simple way to make bygfoot more robust against bad config files. Moreover, even if the config files are broken, a segfault remains a segfault...
MarkC
Posts: 96
Joined: Tue Mar 29, 2005 10:34 pm

Re: Bygfoot is too breakable concerning the config files

Post by MarkC »

the xml cup files also induce weaknesses and crashes, and I wonder if there is a simple way to make bygfoot more robust against bad config files. Moreover, even if the config files are broken, a segfault remains a segfault...
Absolutely right. I made this point in the long thread called "1.9 Cup System" on the code discussion board, and I kind of volunteered to write some code that would do a check on the config files before starting the game, and exit with a clear error message if it found a problem.

I might get round to looking at this before 2.0 comes out... it depends how busy I get with other stuff!

I'm not sure what's causing the problems you mentioned - I've just got the latest cvs and it runs fine (although that's the developer cvs; the anonymous cvs might not be up to date yet.) Have you tried running it directly from the source tree with src/bygfoot? I think Győző has said this is the preferred method for running the cvs version. You could also try starting with a clean ~/.bygfoot-1.9 directory.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Re: Bygfoot is too breakable concerning the config files

Post by gyboth »

arnaudus wrote:

Code: Select all

** (bygfoot:7940): WARNING **: xml_cup_read_start_element: unknown tag: type; I'm in state 0

...snip...

** (bygfoot:7940): WARNING **: cup_load_choose_team: not enough teams in league 0 for chooseteam europe_champ_league (16; required: -1) in cup UEFA Supercup

Erreur de segmentation
these are very weird symptoms, because

1) the tags (type, overall_teams etc.) the program complains about are deprecated since months and aren't used anymore, and most definitely not in the definition files in the cvs. from where did you start the game? there must be a lot of old files lying around on your system.

2) the game shouldn't cause a segfault while trying to load choose_teams. this was the case before the release of 1.9.0, but i've added clean exits after every choose_team error before making the release, and you shouldn't get a segfault because of this specific problem with the current cvs version.

it'd be nice if you could give the exact steps that lead to these problems.
Moreover, "make install" returns lots of errors, and it is impossible to install bygfoot:
this is because each time i update the cvs the makefile gets updated, too, and sometimes there are files in my local directory that aren't cvsed.
MarkC wrote:Have you tried running it directly from the source tree with src/bygfoot? I think Győző has said this is the preferred method for running the cvs version. You could also try starting with a clean ~/.bygfoot-1.9 directory.
this is true, the cvs version shouldn't be installed. i don't want to have to take care whether make install works each time i update the cvs.
I don't really want to report a precise bug on some config files, but rather to highlight the fact that, althrough they bring some wonderful features, the xml cup files also induce weaknesses and crashes, and I wonder if there is a simple way to make bygfoot more robust against bad config files. Moreover, even if the config files are broken, a segfault remains a segfault...
as i said, this specific segfault should be fixed. i really don't have any clue why it occurred on your system.

in general i'm a bit concerned because of the conf files system (not only the country files, also the option files). e.g. the program exits if an option isn't found. but in 1.9.1 there will be new options and constants, and if a user installs 1.9.1 and still has the old file in his home dir, the program won't work. and the same applies to changed definition files.

i see a few possibilities here, none of which are satisfactory:

1) make a new home dir for 1.9.1 (e.g. HOME/.bygfoot-1.9.1). but this method would lead to having 5 or 6 bygfoot dirs in HOME after a few releases.

2) tell the user to remove the bygfoot dir from HOME. this is awkward.

3) automatically remove or rename the old dir. a bit circumstantial :-P we'd also have to warn the user.

any ideas?

gyözö
Press any key to continue or any other key to quit.
arnaudus
Posts: 41
Joined: Thu Dec 23, 2004 6:43 pm

Post by arnaudus »

there must be a lot of old files lying around on your system.
Yes, there are. Thus, bygfoot seems to check the .bygfoot directory before support_files? This would indicate that it is not possible to run the cvs version if a stable version is already installed?
you shouldn't get a segfault because of this specific problem with the current cvs version.
This has been obtained by launching bygfoot directly from the cvs directory:

Code: Select all

cd bygfoot2-unstable
src/bygfoot
and I compiled it yesterday after a cvs update.
it'd be nice if you could give the exact steps that lead to these problems.
1) src/bygfoot
2) choose country_scg.xml (here: lots of Errors and Warnings)
3) double click on a team
4) Start (here: segfault)

country_scg is not the only country showing such a problem.
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

arnaudus wrote:
there must be a lot of old files lying around on your system.
Yes, there are. Thus, bygfoot seems to check the .bygfoot directory before support_files? This would indicate that it is not possible to run the cvs version if a stable version is already installed?
no. the primary support directory is './support_files', 'HOME/.bygfoot-1.9' is the secondary one. i talked about old files because the xml warnings are about old tags that are definitely NOT in the current cvs. i have no idea how you can get warnings about those tags with the latest cvs. is maybe bygfoot installed, some older version? and could you do a 'grep -r overall_teams ./support_files' in the cvs dir?

Code: Select all

cd bygfoot2-unstable
src/bygfoot
and I compiled it yesterday after a cvs update.
mysterious.
1) src/bygfoot
2) choose country_scg.xml (here: lots of Errors and Warnings)
3) double click on a team
4) Start (here: segfault)
i just got a clean new cvs. i didn't have any problem. what happens if you do a 'cvs diff' in your cvs directory? and does a new clean cvs work?

gyözö
Press any key to continue or any other key to quit.
Post Reply