Page 1 of 1

Recently introduced errors with xml file

Posted: Sat Oct 04, 2008 10:28 am
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.

Re: Recently introduced errors with xml file

Posted: Sat Oct 04, 2008 7:40 pm
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).

Re: Recently introduced errors with xml file

Posted: Sat Oct 04, 2008 8:39 pm
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)

Re: Recently introduced errors with xml file

Posted: Sat Oct 04, 2008 11:19 pm
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.

Re: Recently introduced errors with xml file

Posted: Tue Oct 07, 2008 9:51 pm
by drcode
Oops! 7 years? Most software expires before then.

Re: Recently introduced errors with xml file

Posted: Tue Oct 07, 2008 10:21 pm
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...

Re: Recently introduced errors with xml file

Posted: Tue Oct 07, 2008 10:34 pm
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?

Fatal: Not able to open ./cache/production/data_global.php