Re: libsbml-3.2.0: zip and bzip2 compressed documents
03 Oct '08 05:11
Hi Florian,
Thank you for your bug report.
Florian Kamm <Florian.Kamm@gmx.de> wrote
> I tried yesterday the new feature of libsbml-3.2.0 to save and load compressed xml
> documents. There were no problems with gzipped documents at all. However, using bzip2 to write a
> compressed document to the file system I got an error in an error-handling method of bzip2 (it
> seems that there is a problem with an array index used to get the correct error string) which make
> my application crash. But the file is actually written. Did anyone else notice this or a similar
> problem?
I'll look into the problem.
So, could you let us know the exact error message you got?
Also, did you get the error at all times when writing a bzip2 file?
> At last, writing and reading of zipped xml documents seems to work reliably, but when I discovered the zipped document file I encountered a really strange folder hierarchy stored within the zip-file. In my case, it looks like the following (using Windows XP): C:->Projects->sbml->models->file.xml where all parts between the arrows are folders. Is this the normal behavior? Should the folders of the document's path be really stored this way?
This is obviously a bug in libSBML 3.2.0.
The SBML file (file.xml) is wrongly archived with the folder path name (C:\Projects\sbml\models\)
in the zip file due to the bug (the folder path portion should be deleted...).
I just fixed the bug and attached a zip file which contains the fixed source file
(src/sbmlSBMLWriter.cpp) and a patch file.
If possible, could you try the fix?
You can apply the fix by one of the following methods:
a) copy the fixed source file (SBMLWriter.cpp) to "src/sbml/SBMLWriter.cpp"
or
b) apply the patch by patch command as follows:
% cd /path/to/libsbml-3.2.0/
% patch -p1 < /path/to/patch_libsbml-320_20081003.diff