Go Back   EQ2Flames Forum > Information and Resources > EQ2 Fan Site and Resource Provider Forums > Advanced Combat Tracker Forums > General ACT Discussion

Reply
 
LinkBack (2) Thread Tools
Old 06-28-2008, 02:54 PM  
Raid Princess
 
Character: Kirisha
Guild: Journeymen of the Overlord
Server: Antonia Bayle

Posts: 28
Photos: (0)

Default Backup Suggestion for xml config file

I just loaded up ACT today after it was working just find last night and got an error message saying my xml file was corrupt and it was going to use default settings. That's all fine and dandy, except the fresh config xml overwrote the old "corrupt" file immediately upon opening the software. Now I cannot go back and look to see what was wrong with it. On top of that, I have now lost a year's worth of timers and triggers I'd been gathering. I'd like to make a small suggestion for the software to rename the old corrupt file as a backup instead of completely overwriting it. At least some data can possibly be salvaged. However as it stands now, I have to go back and figure out (or find) all my timers all over again and redo all my triggers.

PS - no I didn't open my xml config file and change anything... I didn't even open it at all.
Ninsanna is offline   Reply With Quote
Old 06-28-2008, 04:02 PM  
Regular
 
Character: Mayriia
Guild: DT
Server: Valor

Posts: 993
Photos: (0)

Default Re: Backup Suggestion for xml config file

happened to me once too, since then i manually keep a backup file and it never happened again (murphy i guess)
the_mo is offline   Reply With Quote
Old 06-28-2008, 09:51 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 624
Photos: (3)

Send a message via AIM to EQAditu Send a message via Yahoo to EQAditu
Default Re: Backup Suggestion for xml config file

That's not quite how it happens. When ACT loads, it reads the xml config. When it closes, it saves the xml config. It certainly does not write to the file when opening no matter the circumstance, as you decribe.

It already doesn't immedately overwrite the old file when closing. It writes to a backup file and checks the file size. If the file passes that check, it deletes the old file and renames the backup.

I suppose instead of the file size check it could validate the backup quickly using a DOM parser that doesn't actually look at the data but only the structure of the XML.

I'm not entirely convinced that ACT is writing corrupt files as I've never been able to reproduce the error. If there was an error creating the backup xml, it would never overwrite the old one. On the other hand, I don't know what would go around corrupting XML files either.

Last edited by EQAditu; 06-28-2008 at 10:00 PM.
EQAditu is online now   Reply With Quote
Old 06-29-2008, 02:07 AM  
Because I'm right.
 
Illuminator's Avatar
 

Posts: 9,395
Photos: (0)

Send a message via AIM to Illuminator
Default Re: Backup Suggestion for xml config file

Not that I know exactly how you're doing it without the source, but in the past I've gotten corruption problems when data didn't fully flush to disk before the program terminated.
Illuminator is offline   Reply With Quote
Old 06-29-2008, 03:47 AM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 624
Photos: (3)

Send a message via AIM to EQAditu Send a message via Yahoo to EQAditu
Default Re: Backup Suggestion for xml config file

Using a stream method if I didn't flush the document, it would never not be corrupt. Not unless I created a document with an exact multiple of 4096 bytes.
EQAditu is online now   Reply With Quote
Old 06-29-2008, 01:36 PM  
Raid Princess
 
Character: Kirisha
Guild: Journeymen of the Overlord
Server: Antonia Bayle

Posts: 28
Photos: (0)

Default Re: Backup Suggestion for xml config file

The error msg I got was something like:

"The config.xml file is corrupt. Reverting to default config settings."

(not exactly that, but something very similar)

Not sure if you can trace where that might in the code or it's just an exception thrown in a library or something. If it's not possible to trace it, maybe a back-up to the config could be made every so often? Granted this has only happened to me once in my ~1 year of using ACT, but losing all that information was pretty stressful esp considering the fact I call timers for my guild. >.<
Ninsanna is offline   Reply With Quote
Old 06-29-2008, 08:51 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 624
Photos: (3)

Send a message via AIM to EQAditu Send a message via Yahoo to EQAditu
Default Re: Backup Suggestion for xml config file

I expect it was probaby,
Quote:
The XML settings file may be corrupt or unusable. Loading defaults where applicable.
Which is sort of a lie. It doesn't load defaults, it merely doesn't change the defaults at this point.

Essentially the error means that the file was extremely corrupted and the XML parser couldn't even begin to read it. ACT does not use a DOM parser for loading settings but a pull parser. If you delete the bottom half of the config file, ACT will still read every single setting it is able to before producing an error.

If a line in the middle of the config file is corrupted, several things may happen depending on the type of corruption. Unclosed quotations could cause the above error. Unclosed XML tags could cause an error at the end but not affect anything. Invalidly formed XML tags could cause an error and halt the XML parsing at that point.
EQAditu is online now   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.EQ2Flames.com/general-act-discussion/27852-backup-suggestion-xml-config-file.html
Posted By For Type Date
EQ2Flames Forum This thread Refback 06-29-2008 02:41 AM
Backup Suggestion for xml config file - EQ2Flames Forum This thread Refback 06-29-2008 02:41 AM

Sponsor Ads


All times are GMT -4. The time now is 12:15 AM.


Design By: Miner Skinz.com Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0