-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0' #1532
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
Conversation
Reinstate the manual reference counting as discovered in #1054 This is starting to look like a merry go round. lssue # /1054 submitter by a fellow gentooer. Now you have in source versions of both pycxx and pyparsing. |
The reason we need a patched version of PyCXX is because the mainline PyCXX simply doesn't compile on Python 2.7 due to the removal of PyCObject (in favor of PyCapsule). Please ping PyCXX for this -- I have submitted a patch, but it doesn't seem to have been incorporated. I can ping Barry Scott again about this. I've never understood why the On further investigation, there are two things required to see this bug, which is why it rarely pops up onto the radar of the developers: The binaries must be built in debug mode (by undef'ing NDEBUG), and then the opening of the font file must fail, either because it's an unsupported format or some kind of IO error. Indeed, with NDEBUG defined, the
Does the file exist -- is it the same as the one that ships with matplotlib? If not, can you send me a link to it so I can investigate further? Mike |
BTW: We need to fix this bug on 1.2.x and in master -- but I should note also to address the issue of using a system pycxx, see #1454. Note that I was wrong about the PyCapsule support -- it's a non-issue. The remaining issue is the lack of buffer support on Python 3.x. I'll submit a patch upstream for that, and once that's in a PyCXX and we merge the setup retooling in #1454, we should be able to not need the local copy of CXX (though we may keep it around in the source tree for a while to support to keep the source install as easy as possible). |
hey Mike; good to see you're onto this. This is all about the release 1.2.0 A user has at this point gone to quite a bit of effort to prepare an ebuild to bump matplotlib to 1.2.0. So far we have the hindrance of this bug and a tardy pyparsing upstream seemingly sitting on their hands re releasing a next version with a 1 line patch to fix an issue in python3. I've entered the patch and bumped it anyway, the preferred option of course being to have the next release release requiring no patching. with python2.7 eselected, matplotlib # bpython
Looks fine to me. "BTW: We need to fix this bug on 1.2.x and in master " |
Ok -- on our end, I'll remove the It remains a puzzle as to why loading that font is failing. If you patch out the Ideally, this is the sort of thing that would get sorted out during the release candidate cycle. Do you have contact information for the maintainer of the matplotlib Gentoo package? I can add that person to my list of people that I notify about release candidates etc., though better yet would be for that person to monitor the github download page for new releases. |
hey Mike, good work. Thanks so much "Do you have contact information for the maintainer of the matplotlib Gentoo package" Don't forget the 4 so I can distinguish from idellas 5 & 6. They're quite temperamental you know. " though better yet would be for that person to monitor the github download page for new releases." A pleasure doing business with you. So many bugs I file draw no reply. Well done. |
I spoke a fraction too soon. The only test it bails out on now is the building of docs under python3. x86_64-pc-linux-gnu-g++ -pthread -march=athlon64 -pipe -fomit-frame-pointer -O2 -fno-strict-aliasing -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -DPYCXX_PYTHON_2TO3=1 -I/usr/local/include -I/usr/include -I/usr/include/libpng15 -I/usr/include -I. -I/usr/lib64/python3.2/site-packages/numpy/core/include -I. -I/usr/include/python3.2 -c CXX/cxx_extensions.cxx -o build-3.2/temp.linux-x86_64-3.2/CXX/cxx_extensions.o
ok, so it appears that make.py is written to python2 format and setup.py doesn't include it for conversion for python3. Is this by intent, ie. python2 is sufficient for building docs? Otherwise a separate issue? |
Sorry this response fell through the cracks. We don't currently support building the docs on Python 3.x, since there are still issues with Sphinx in that context. See #1383. I think for that reason, we should probably merge this if there are no objections. |
I'd like to see this rebased so Travis can do the tests for Python 3 before it gets merged. |
Good idea. Rebased. |
CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0'
In your recent version matplotlib-1.2.0, you appear to have an issue with the file CXX/Python2/cxx_extensions.cxx. The testsuite is massive and it's currently stopped in its tracks by the above. Comment out the line make_set('mathfont', 'cm', font_tests, ['png']) in matplotlib/tests/test_mathtext.py and the massive testsuite completes fine.
python2.7: CXX/Python2/cxx_extensions.cxx:1320: virtual Py::PythonExtensionBase::~PythonExtensionBase(): Assertion `ob_refcnt == 0' failed.
Building HTML failed.
See here it's called in the building of the docs and it also fails. Why you have an in source version of CXX for pycxx rather than use a system installed version I don't know,. but the one you have has this deficit.
CXX/Python2/cxx_extensions.cxx:1320:
You even have the line number
libpng version 1.2.50
stix-fonts version 1.0.0
ipython version 0.13
Python version 2.7.3, 3.2.3