Recently introduced errors with xml file

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Recently introduced errors with xml file

Post by Malignant Manor »

It isn't reading some of the resources properly. Here are a few examples. In BG it tries to load paperdol.vga from BG/static instead of SI (can't tell if there are more because of crashes). In SI, defaultkeys.txt and avatar_data.txt don't load. These are unaltered xml files generated with the current version.
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: Recently introduced errors with xml file

Post by marzo »

That makes absolutely no sense. The only thing I did with the xml file was to add palette patches. Moreover, it shouldn't even be able to affect the loading of paperdol.vga, which is controlled solely by shape_files.txt.

I will see what is going on, but all problems seem related to using the xml file (they seem to happen only when it is there).
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Re: Recently introduced errors with xml file

Post by Malignant Manor »

Well, then it is likely that shape_files.txt isn't loading in BG similar to the problems in SI loading flx files with an xml file present. (maybe more files too)
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: Recently introduced errors with xml file

Post by marzo »

It was a time bomb with the XML resource file that has been waiting to explode for almost seven years (!) now; when Exult got the resource from the XML file, it would return a pointer to a c-string that was deallocated before the end of a function. In Windows, I got simply a segfault; in Linux, I got the problem you describe. This should be fixed in the next snapshot.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Recently introduced errors with xml file

Post by drcode »

Oops! 7 years? Most software expires before then.
marzo
Site Admin
Posts: 1925
Joined: Thu May 14, 2020 1:34 pm

Re: Recently introduced errors with xml file

Post by marzo »

I was also stunned to see just how old that bug was and still be undetected; it was there ever since the XML-config support was added to Game::get_resource. Seems that no one ever seriously used the XML config file...
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Malignant Manor
Site Admin
Posts: 985
Joined: Thu May 14, 2020 1:34 pm

Re: Recently introduced errors with xml file

Post by Malignant Manor »

Well, it isn't even show in the site documentation. I found out about it through a bug report. I saw it with the -h command line earlier but never paid attention to it. It seemed to be working fine for BG and SI when I tried it prior to a recent revision (although I never tested it much and Dev games didn't seem to load avatar_data.txt).

If I stop procrastinating, I might actually finish what I'm doing and make the xml more useful. Can support be added for indexes?
Locked