sys-bio / libOmexMeta

libOmexMeta is a library aimed at providing developer-level support for reading, writing, editing and managing semantic annotations for biosimulation models.
https://sys-bio.github.io/libOmexMeta/
Apache License 2.0
8 stars 6 forks source link

Semantic extraction from SBML fails with segmentation faults for example models #107

Open jonrkarr opened 3 years ago

jonrkarr commented 3 years ago
from pyomexmeta import RDF
import lxml.etree
import os

model_filename = 'toy-model.xml'

# verify file exists, is a syntactically-valid XML
assert os.path.isfile(model_filename)
lxml.etree.parse(model_filename)

rdf = RDF()
editor = rdf.to_editor(model_filename, generate_new_metaids=True, sbml_semantic_extraction=True)
editor.get_xml()

Failing examples:

For each example, I copied the model XML out of the above text files, saved it to a file, and then tried to use pyomexmetadata to extract metadata from it.

These failures each have invalid metaids (see #106). I don't know whether that's the reason or a coincidence.

Passing examples

CiaranWelsh commented 3 years ago

Looks like the examples output folder in the master branch were outdated - the invalid metaids (that begin with #) have already been dealt with.

Note that the sbml strings that you have been looking at are the output from executing the examples. For instance, take a look at some of the docs rst files and look at the .. literalinclude commands.

So, these examples were not run prior to the last merge into master, most likely meaning that there is a bug in my cmake custom target that deals with running the docs examples.

CiaranWelsh commented 3 years ago

Even with the old sbml code I cannot reproduce the segfault. What version of pyomexmeta are you using - the latest is v1.2.10. I'm currently using windows, what platform and version are you using please?

jonrkarr commented 3 years ago

I found all of the issues I created in this environment (copied from #94)

pyomexmeta: 1.2.10 Python: 3.9.5 Ubuntu

CiaranWelsh commented 3 years ago

Probably resolved by this issue. Leaving open until we get confirmation.