Matt Sprague wrote: > I was working on the next release of OBDotNet when I discovered that > read or writing any xml format triggers an access violation exception. > After debugging into the C++ code I was able to identify the call to > xmlFreeTextReader as the source of the exception. I've spent the last 3 > days trying to figure out a work around but I'm stumped. Any thoughts?
I find libxml2 difficult and cumbersome to work with. Its interface is C, not a C++, in style and sometimes, but not always, you have to delete the memory used by strings it has given you and other objects. I have to confess I never really sorted this out properly and the code was left working in C++ but possibly with memory leaks. I'm sorry if it has turned out to be more than this and has wasted your time. I'll try to look at it again, but, in the meantime, it looks as if it could benefit addition of the second line here xmlFreeTextReader(_reader); _reader = NULL; This would ensure it wasn't deleted twice, which might be the immediate cause of the error. Chris ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-scripting mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-scripting
