[C++-sig] First time pointers, first crash...

Stefan Franke franke at ableton.com
Tue Feb 19 15:54:28 CET 2002


As far as I understand the problem, the crash occurs because a non-matching
pair of allocator / deallocator is used and the debug heap manager complains
about an illegal address.

	HEAP[boosttest.exe]: Invalid Address specified to RtlValidateHeap( b60000,
1be9ac8 )

Of course, I thought, this is because our app uses an own global new
operator
so I took this out (I had tried this even before my first posting). But
unluckily this does not change anything.

As can be seen from the stack trace in my previous post, the problem occurs
at the following point:

	[classes.hpp: line 275]

	template <class T>
	void class_t<T>::delete_instance(PyObject* obj) const
	{
		delete downcast<T>(obj);
	}

I think this is the location where the wrapper object itself is deleted
(which shouldn't affect the wrapped object - does it?).

In my example, the wrapper object is created by Boost.Python for the
return value of the wrapped GetFoo() function.

	foo *GetFoo() { return myFoo; }
[...]
	this_module.def(GetFoo, "getfoo");

My question: Can you point my to the position where the new operator
for the wrapper object is called. Then I could put a breakpoint there
and see which allocator is actually used.

Thanks,
Stefan





More information about the Cplusplus-sig mailing list