PDA

View Full Version : db error



pomaro377
February 25th, 2013, 23:34
On Sunday at 10:30 Central time, after sending my players a dungeon image and placing all of the tokens where they needed to be, I masked the image to allow them to start playing. All players, one by one were disconnected from the game. They all tried reconnecting with no positive results. One player suggested I restart the game on my end. When I did, I received the included error screen. It says that my db has a parse error and it could not read end tag.
I have an Ultimate License and currently using 2.9.2 version. Ruleset is 3.5E.
I have no idea how this happened or how to fix, but everytime I try to open Fantasy Grounds, my current database is saved under a backup and I get a complete blank database file opened for my game.

Trenloe
February 26th, 2013, 00:04
You will need to try to recover from a previous db.xml file. It will be a good idea to make a copy of the whole Satares directory before you try this - just in case you lose data.

Go into the directory mentioned in the error message for your Satares campaign and look through any db.backup or other db.xml files - starting at the most recent file. Copy this to db.xml and then try starting your campaign. If it works, great - if not, try the next db.backup file etc...

pomaro377
February 26th, 2013, 02:59
I tried that. When I change the names from the backup to the db.xml, I get that since it is incapable of being started it makes another backlup and opens a blank db file. I believe that was already mentioned in the original posting
"I have no idea how this happened or how to fix, but everytime I try to open Fantasy Grounds, my current database is saved under a backup and I get a complete blank database file opened for my game."

The question is, how do I fix the error in the database so that I do not get the error message?
And how did this error occur?

Trenloe
February 26th, 2013, 03:19
I believe that was already mentioned in the original posting
"I have no idea how this happened or how to fix, but everytime I try to open Fantasy Grounds, my current database is saved under a backup and I get a complete blank database file opened for my game."
OK, thanks for the clarification - but you didn't actually specify that you had tried renaming the files in the directory; hence I made that suggestion that you work back through all of the possible combinations of the db.xml file.


The question is, how do I fix the error in the database so that I do not get the error message?
Work with one of the files that has data in it. Open this file in an editor that recognises XML syntax (a lot of people on here use Notepad++ with the XML plugin - it is free) and check the syntax of the XML file. The error you provided in the screenshot is suggesting that there is a missing end tag - see if Notepad++ -> Plugins -> XML -> Check Syntax gives an ideas what it might be...


And how did this error occur?
The chances are you experienced an error when your players started getting disconnected and the db.xml file got corrupted.

I know it doesn't help you now - but as with all things computers it is good to take a backup occasionally. I usually make a complete copy of the campaign folder before I start a game - just in case there are issues I can at least get back to the stage we were at at the beginning of the session.

pomaro377
February 26th, 2013, 06:28
Thank you, I will give that a shot.
Other than making a backup, which I will do from now on, is there a way to protect from these type of corruptions happening again?

pomaro377
February 26th, 2013, 06:39
So downloaded Notepad++ latest version. Open one of my backed up db files. Found line 103320. It was </>. I removed the / and now all is working just fine. Thanks for the Notepad suggestion.

Moon Wizard
February 26th, 2013, 10:16
pomaro377,

Any chance that you kept a backup of the file with the errant XML tag? I'd love to see where it occurred so I can check the code to prevent it from happening in the future.

Thanks,
JPG

pomaro377
February 26th, 2013, 14:56
Heck Yeah I have a copy of the bad file. How do you want it? An attachment in a post? Its over 6 Mg. Line 103320.

Zeus
February 26th, 2013, 21:06
Heck Yeah I have a copy of the bad file. How do you want it? An attachment in a post? Its over 6 Mg. Line 103320.

Just out of curiosity, do you mean the the db.xml file is 6MB in size!!!! If so Aye Curumba thats a huge campaign you have there. Either that or your db.xml has been borshed with other data as it should only contain XML text data (no graphics data for example).

The largest db.xml I have ever worked with (and I have worked on some pretty big ones over the last few years) has been 1.8MB. Moving forward you may want to export some of the campaign data to modules. This will reduce the size of the campaign not to mention reducing loading times for you and connection times for your players.

Moon Wizard
February 28th, 2013, 01:40
You can send it to [email protected]

I just wanted to take a look to see where the problem occurred, just in case I can shore up the code around that point.

Thanks,
JPG