Description of problem:
Using this with the FreeCAD RPM currently undergoing review in RPMFusion.
With this version of the zipios++ RPM, FreeCAD can write model files, but is unable to read model files created with this or working versions of zipios++. The model files it creates can be read by other versions of zipios++.
I can't tell where this zipios tarball came from. It is not the packed up version on the sourceforge site, and does not match SVN. It is also not the version in Ubuntu. As far as I know, SVN and Ubuntu versions work; haven't tested the released tarball on SF.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build FreeCAD referenced from RPMFusion review ticket https://bugzilla.rpmfusion.org/show_bug.cgi?id=2300
2. Create a model
3. Save it
4. Close it
5. Attempt to reopen it
Error message on console; FreeCAD handles the error badly, appearing to have the file open, but with no model
I should add, I've been messing with this for a few hours now. I'm pretty sure if the same specfile + patches are used, but with one of the tarballs pointed to above, the package should start working.
Also, this may be an older version of zipios++. Compared to Ubuntu and SVN, there are quite a large number of changes. I'd go with SVN.
Yeah, zipios is a mess. Upstream seems pretty much dead and FreeCAD made modifications to their bundled version.
Do you know of a SVN upstream? All I can find on sourceforge is CVS and none of the source files seem recently updated.
I'm wondering if FreeCAD even considers their zipios to be bundled since it's not in the 3rdparty directory. It could be considered a fork...
(In reply to comment #2)
> Yeah, zipios is a mess. Upstream seems pretty much dead and FreeCAD made
> modifications to their bundled version.
Are you sure they modified their bundled version, or is it a stale version of zipios++, and the modifications came from upstream?
> Do you know of a SVN upstream? All I can find on sourceforge is CVS and none
> of the source files seem recently updated.
Oops, not sure why I said SVN just a few minutes after using CVS to check out the latest code. :)
> I'm wondering if FreeCAD even considers their zipios to be bundled since
> it's not in the 3rdparty directory. It could be considered a fork...
They do consider it bundled, since the FreeCAD .dfsg tarball (in the SF files page) unbundles it. On Debian, they use the system zipios++.
I'd just swap in either the CVS source or the Debian source (the difference is in one file, didn't look carefully to see what it was) and be done with it.
BTW, I looked at using the .dfsg tarball for the FreeCAD RPM, but they also removed some STEP files needed for a different piece. Werner Mayer said that was to comply with some Debian copyright policies, but it's been cleared up and those files should be included for the next release. Hopefully there's nothing else missing from the .dfsg tarball and we can just use that next time; it's 10MB smaller.
To answer your question about where the source came from, I'm pretty sure I got it from debian.
Ok, I'm getting myself confused trying to comapre cvs with what I have with debian, with ubuntu. I just want to rm -rf it all!
I got my sources from Debian and the Ubuntu versions seems to be identical. I don't know why this version isn't working...
I pulled the ubuntu source and diff but it produces dpatch's not regular patches but they look to be the same as the ones I got from Debian...
Well dangit, now it seems like I'm the one who's confused. I just compared all three versions: CVS, Debian and Fedora, and they're all three identical. Sorry about that.
Hold off and I'll go back and retrace my steps. I'll get back later today, most likely. My apologies for the confusion.
BTW, so I know whether to question my sanity, have you actually tried saving and re-opening a model from FreeCAD (with the Fedora+RPMFusion RPMs, of course) and confirmed the problem on your side?
(In reply to comment #6)
> Well dangit, now it seems like I'm the one who's confused. I just compared
> all three versions: CVS, Debian and Fedora, and they're all three
> identical. Sorry about that.
Well at least I'm not going crazy! :)
> Hold off and I'll go back and retrace my steps. I'll get back later today,
> most likely. My apologies for the confusion.
> BTW, so I know whether to question my sanity, have you actually tried saving
> and re-opening a model from FreeCAD (with the Fedora+RPMFusion RPMs, of
> course) and confirmed the problem on your side?
Not yet. If I have time I'll try tonight but I just got back from vacation and we badly need groceries :)
Created attachment 594602 [details]
specfile patch: apply Debian's source patch; probably fixes to src/zipinputstreambuf.cpp that are the problem
(In reply to comment #7)
> Well at least I'm not going crazy! :)
Nope, as expected it's all me.
Turns out that the package you grabbed from me had a 'special' (I'm being kind to myself) tarball. Apparently (am I innocent if I don't remember?) I grabbed the Debian tarball and unpacked it, then applied the Debian patch, and *then* repacked it all up as though it were original. I know all about and am all for the 'pristine sources' objective, so I'm clueless why I would've done that, unless I found the tarball somewhere else (in which case I'm just as guilty because I didn't document it).
Attaching a patch to the specfile that should fix this.
> Not yet. If I have time I'll try tonight but I just got back from vacation
> and we badly need groceries :)
'Vacation'? What is this thing, 'vacation', that you speak of? Is it delicious? I'm not sure I've ever had one of those!
I have reproduced the bug. It seems (as I think your mention) that the file is created correctly. I could even open it in Archive Manger and see the files contained within, but it could not open the file.
I tried gdb, but since there wasn't an actual "crash" it didn't produce any output. I also tried strace which did find that there were seek errors in the file. I think that means that it's having trouble seeking within the zip stream. Since I'm using the latest available sources from Debian, where do we go from here?
I'll post on the FreeCAD forums and see if they can help.
Ok, although I did post to the forum, I found the answer on my own.
While comparing the Debian source and package diff I finally noticed that instead of creating a patch, the diff directly patches zipinputstreambuffer.cpp!!!
I didn't know that was acceptable but I guess it is. I have creating a patch from it and installed a local build. I had to test it over X11 Forwarding so the model wouldn't actually display (Coin issue) it didn't produce any console output so I think that's got it!
I'll start builds shortly.
zipios++-0.1.5.9-7.fc16 has been submitted as an update for Fedora 16.
zipios++-0.1.5.9-7.fc17 has been submitted as an update for Fedora 17.
Heh, you missed my comment #8! Sorry Richard, of course it was my doing. Thanks for the help.
(In reply to comment #13)
> Heh, you missed my comment #8! Sorry Richard, of course it was my doing.
> Thanks for the help.
Yup, didn't catch what you meant at the time! Everything makes more sense once you already have the answer :)
Almost forgot! When the builds make it into testing, please try installing them and if it fixes the problem (it should), go give it karma on bodhi so I can push it to stable quicker.
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zipios++-0.1.5.9-7.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Great, this fixes it. Karma left on bodhi.
(In reply to comment #14)
> (In reply to comment #13)
> > Heh, you missed my comment #8! Sorry Richard, of course it was my doing.
> > Thanks for the help.
> Yup, didn't catch what you meant at the time! Everything makes more sense
> once you already have the answer :)
Ha, the attached patch would've explained everything, but I must've drowned it out with all the blabber. Hope it didn't cost you too much time to figure it out again.
Thanks again! I guess this can be closed?
Nah, Bodhi will close it once it hits the stable repos.
zipios++-0.1.5.9-7.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
zipios++-0.1.5.9-7.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.