type_traverse() called for non-heap type

Bug #1883514 reported by John A Meinel
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I was trying to add a smoke test for https://code.launchpad.net/~jelmer/meliae/itervalues/+merge/385313

However, in Python 3+ I get failures of the form:
Fatal Python error: type_traverse() called for non-heap type '_ctypes.PyCFuncPtr'
Fatal Python error: type_traverse() called for non-heap type '_ctypes.Union'

I don't know if there is an obvious way to determine if a type is a 'non-heap type' and so we can avoid calling type_traverse for these objects.

It doesn't seem like writing the test to work around it is appropriate, as it seems like actual usage is going to run into these failures.

Revision history for this message
Tom Cook (tom-k-cook) wrote :

Just to note that I've run across this in actual usage. In particular, gtk's GObject type (`gi._gobject.GObject`) produces this error when meliae's `dump_all_objects` method is called, crashing the Python process.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.