ManuelVzquez
Sat Feb 19 15:31:06 CST 2005
Mea culpa est.
I found the bug. It's all mine, and I'm ashame having bothered you this long.
It was a global (static) registration scheme that was cleaned after the
Graph object was collected.
I added support for IDisposable interface, called the Dispose method, and
all worked fine.
Sorry,
Manuel.
"Matt Berther" wrote:
> Hello Manuel,
>
> I would propose that you create the smallest duplicatable example of this
> issue and attach all relevant code to your reply to this message. Id be glad
> to look at it more with you.
>
> I can not get the error that you're seeing.
>
> --
> Matt Berther
>
http://www.mattberther.com
>
> > I have verified it.
> > The flush trick didn't make it.
> > I think this is a BUG. Do you?
> >
> > Manuel.
> >
> > "Matt Berther" wrote:
> >
> >> Hello Manuel,
> >>
> >> Have you verified that a complete document is in fact saved when you
> >> call Hibernate? Between Hibernate and Awake, check and make sure that
> >> the complete file is written out (Im guessing its not).
> >>
> >> You might try something along this line:
> >>
> >> static void Hibernate(string filename, Graph graph)
> >> {
> >> XmlSerializer s = new XmlSerializer(typeof(Graph));
> >> TextWriter writer = new StreamWriter(filename, false);
> >> s.Serialize(writer, graph);
> >> writer.Flush();
> >> writer.Close();
> >> }
> >> The trick is probably in the Flush command. I cant count how many
> >> times Ive been bitten by that.
> >>
> >> --
> >> Matt Berther
> >>
http://www.mattberther.com
> >>> This the message:
> >>>
> >>> There is an error in XML document (4, 16).
> >>>
> >>> at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> >>> xmlReader, St
> >>> ring encodingStyle, XmlDeserializationEvents events)
> >>> at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
> >>> xmlReader, St
> >>> ring encodingStyle)
> >>> at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader
> >>> textReader)
> >>> at CPN_WF_Test.Class1.Awake(String filename) in
> >>> d:\users\manu\programming\tes
> >>> ts\cpn wf test\class1.cs:line 17
> >>> at CPN_WF_Test.Class1.TestAwake() in
> >>> d:\users\manu\programming\tests\cpn
> >>> wf t
> >>> est\class1.cs:line 44
> >>> at CPN_WF_Test.Class1.Main(String[] args) in
> >>> d:\users\manu\programming\tests\
> >>> cpn wf test\class1.cs:line 124
> >>> "HakonB" wrote:
> >>>
> >>>> Hello Manuel,
> >>>>
> >>>> Which exception is thrown?
> >>>>
> >>>> Regards,
> >>>> HakonB
>
>
>
>