A list for the developers of CellML tools

Text archives Help


[cellml-dev] Changing state in libxml


Chronological Thread 
  • From: lpsmith at spod-central.org (Lucian Smith)
  • Subject: [cellml-dev] Changing state in libxml
  • Date: Sat, 19 Feb 2011 00:12:04 +0000

When trying to code up a translator which would convert between CellML,
Antimony, and SBML, I ran into the following problem.

Right now, I have libsbml configured to use libxml, the same XML parser
that CellML uses. I can read a document in with libsbml, and everything
is fine. I can then read a document with the CellML API, and everything
is fine. However, if I then read that same document with libsbml, I get a
segfault error, and if I run it though valgrind, I'm actually getting an
invalid read.

Attached is a smallish program that demonstrates this issue. It seems to
me that CellML is changing the state of libxml in some way, and this
messes up the subsequent libsbml call, causing the segfault.

So my question is: how does CellML change the state of libxml, and how
do I undo this? Or is there something else going on?

-Lucian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 1699 bytes
Desc: not available
URL:
<http://lists.cellml.org/pipermail/cellml-tools-developers/attachments/20110219/6075a3ae/attachment.cpp>




Archive powered by MHonArc 2.6.18.

Top of page