I've found enabling PYTHONTRACEMALLOC=1 in the environment gives me a
pointer to where to offending block was allocated.
I'm calling this method from C:
18 def handleSocket(self, addr, data, type, name, uuid):
19 if addr == "/pulse":
20 self.lampval += 1
21 return (addr, [0,0])
Modules/gcmodule.c:108: gc_decref: Assertion "gc_get_refs(g) > 0"
failed: refcount is too small
Memory block allocated at (most recent call first):
File "/home/arnaud/src/build-gazebosc-Desktop-Debug/bin/lampen.py",
line 21
object address : 0x7fffd81154c0
object refcount : 1
object type : 0x7ffff7f3df20
object type name: list
object repr : [117, 0]
Fatal Python error: _PyObject_AssertFailed
Python runtime state: initialized
Current thread 0x00007ffff2481640 (most recent call first):
File "/home/arnaud/src/build-gazebosc-Desktop-Debug/bin/lampen.py",
line 21 in handleSocket
Thread 0x00007ffff5d288c0 (most recent call first):
<no Python frame>
Now it clearly says the refcount is 1 so I'm puzzling what it means?
Rg,
Arnaud