This project has moved and is read-only. For the latest updates, please go here.

InvalidOperationException when opening clone report

Feb 13, 2009 at 9:50 PM

I encountered a problem running Clone Detective for the first time.  I have Win XP SP3 and VS 2008 Team Suite SP1 with the latest .NET Framework (3.5 SP1) and Java (1.6 Update 12) versions.

After analyzing the C# source code successfully, Clone Detective fails because it cannot open the clone report (see the end of the log below).  I opened the "Ums.Dmc.CloneDetective.Clones.user" file, and it contains 153KB of "null" binary data (all 00).  Obviously this is a problem if it's supposed to be XML.

**** Result ****
CD_STATUS: Succeeded
CD_MEMORY: 23556096
CD_TIME: 00:00:26.5399258

**** Error ****
System.InvalidOperationException: The clone report "M:\ma055534_DmR3ARepTask1\MgmtSysComp\Ums.Dmc\src\Ums.Dmc.CloneDetective.Clones.user" could not be loaded: Root element is missing. ---> System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at CloneDetective.CloneReporting.CloneReportReader.Read(String fileName)
   --- End of inner exception stack trace ---
   at CloneDetective.CloneReporting.CloneReportReader.Read(String fileName)
   at CloneDetective.CloneReporting.CloneDetectiveResult.FromSolutionPath(String solutionPath)

**** Result ****
CD_TIME: 00:00:00

Please let me know if you need anything else to diagnose the problem.