malformed XML - on startup for AutoAddNewSeasons

paxomega

03-02-2009 21:20:55

Howdy,
I started TVrenamer (current version Early Jan) today and was greated by an error dialog stating this

The 'AutoAddNewSeasons' start tag on line 1856 does not match the end tag of 'GuestStars'. Line 1856, position 195.

at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.InternalReadContentAsString()
at System.Xml.XmlReader.ReadContentAsBoolean()
at System.Xml.XmlSubtreeReader.ReadContentAsBoolean()
at System.Xml.XmlSubtreeReader.ReadContentAsBoolean()
at System.Xml.XmlReader.ReadElementContentAsBoolean()
at TVRename.ShowItem..ctor(TheTVDB db, XmlReader reader, TVSettings settings)
at TVRename.TVDoc.LoadXMLSettings()
at TVRename.TVDoc..ctor()
at TVRename.UI..ctor()
at main(String[] args)

which I'm guessing means malformed XML. I shutdown the application normally last time and I always do a save so it shouldn't have been prematurely stopped from writing.

Any thoughts? Are there any other logs that I can provide to aid in the process?

thanks muchly
pax

PS I love your program ... would have liked to learn about it sooner ... as I was halfway through writing a similar app in Java based upon TVDB etc :-)

sstteevvee

03-02-2009 23:03:52

Its possible that one of the settings or data files has gotten damaged. The odd thing is that "GuestStars" is a thetvdb thing, while AutoAddNewSeasons is a main program setting, from two different settings files, handled in two different places in the code!

Go to the tvrename settings folder: c:\documents and settings\<username>\application data\tvrename\tvrename\2.1\ (XP) or c:\users\<username>\appdata\tvrename\tvrename\2.1 (Vista). Make a ZIP of the main .xml files (TVRenameSettings.xml, TheTVDB.xml, Layout.xml, Statistics.xml), and put it aside for later.

If you're feeling adventurous, you could open the first two XML files (TVRenameSettings / TheTVDB) and see if one of them is malformed, particularly in a "ShowItem" element in the first, or "GuestStars" in the second.

Try removing the current TheTVDB.xml file, and see if it starts up ok. If that doesn't help, send me the ZIP file you made to tvrename [at] tvrename.com (hopefully it shouldn't be more then a meg or two). If this fixes it, TVRename will just have to re-download data again from thetvdb.

If it is still busted, there are also periodic backups of the settings and TheTVDB data files in that folder, which you could try by renaming to ".xml". More recent versions have a lower number on the end.

Let me know how you get on.

paxomega

07-02-2009 21:14:23

Firstly thanks sstteevvee for your prompt reply. I'm sorry for my tardy response but RL has kept me away from tvrename until today.

Secondly ... I tried your suggestions ... rolling back to the earlier versions of the files but that hasn't worked so far (tried 3 versions of the each file). I suspect the reason may be some cross-linked files which were fixed by an automated checkdisk upon startup - as I just found this in my event log


Event Type: Error
Event Source: Ntfs
Event Category: Disk
Event ID: 55
Date: 3/02/2009
Time: 8:58:52 PM
User: N/A
Computer: TV-ARCHIVE
Description:
The file system structure on the disk is corrupt and unusable. Please run the chkdsk utility on the volume C:.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 00 00 00 00 02 00 4e 00 ......N.
0008: 02 00 00 00 37 00 04 c0 ....7..À
0010: 00 00 00 00 32 00 00 c0 ....2..À
0018: 18 00 00 00 00 00 00 00 ........
0020: 00 00 00 00 00 00 00 00 ........

So I suspect it's totally the fault of the OS and not your application in any way. Sorry to have wasted your time.

pax

sstteevvee

07-02-2009 22:20:20

No problem.. Sounds like a reasonable explanation for what seems like one file getting mixed in with another.