Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata problems with python-libsbml and python-libcombine #15

Closed
matthiaskoenig opened this issue Sep 8, 2017 · 3 comments
Closed

Comments

@matthiaskoenig
Copy link
Contributor

Reading the metadata with libcombine alone works.
But in combination with python-libsbml (which I use in the project) it looks like symbols are overwritten (libcombine.Date with libsbml.Date) and I get segmentation faults (see below).

I think it depends on the order of the import of the python packages, but could not find out in which order these must be imported (and difficult to control because projects I import also use python-libsbml and python-libsedml)

/home/mkoenig/git/tellurium-web/teweb/media/archives/CombineArchiveShowCase_cUbCtPq.omex
./manifest.xml
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f0ae8440ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f0ae8440f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f0ae8440f90> > <class 'libsbml.Date'>
./README.md
master: False
None
*** Error in `/home/mkoenig/envs/tellurium-web/bin/python': corrupted double-linked list: 0x00007f0ae0010720 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f0b2dabe7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7e6ed)[0x7f0b2dac56ed]
/lib/x86_64-linux-gnu/libc.so.6(+0x81cde)[0x7f0b2dac8cde]
/home/mkoenig/git/tellurium-web/teweb/media/archives/CombineArchiveShowCase_cUbCtPq.omex
./manifest.xml
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f90> > <class 'libsbml.Date'>
./README.md
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f60> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f30> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
./model/BIOMD0000000144.xml
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f60> > <class 'libsbml.Date'>
./model/calzone_2007.ai
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f60> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
./model/calzone_2007.png
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17ed0> > <class 'libsbml.Date'>
modified: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f60> > <class 'libsbml.Date'>
./model/calzone_2007.svg
master: False
None
created: <libsbml.Date proxy of <Swig Object of type 'Date *' at 0x7f9561f17f60> > <class 'libsbml.Date'>
Segmentation fault (core dumped)
@matthiaskoenig
Copy link
Contributor Author

Yes, is definitely the order of imports.
If libsbml is imported after libcombine libcombine breaks, i.e. something like

from libcombine import *
import libsbml

This is the same issue like libsedml and libsbml imports at
fbergmann/libSEDML#21

@fbergmann
Copy link
Member

not entirely sure what I can do about that at this point ... it is also not quite the same issue, as libsedml would not crash afterwards ... i'm having to prepare for a workshop and will try to get back to this end of next week

@matthiaskoenig
Copy link
Contributor Author

Hi Frank,
no problem. Just posted this to let you know.
The workaround I found is to reload the module when I am using it to make sure the symbols are correct

import importlib
importlib.reload(libcombine)

Works fine for now.
Thanks for all the fixes.
M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants