Hello,
i am totally new to Panda3D and currently working through the Manual. Now there’s my first question regarding a crash when subclassing AsyncTask and performing ANY action in the subclassed constructor. Take a look at the following code:
Class definition:
class CameraMovementTask : public AsyncTask
{
private:
ClockObject *m_Clock;
public:
CameraMovementTask();
// Overriden from AsyncTask
virtual AsyncTask::DoneStatus do_task();
};
Class constructor:
CameraMovementTask::CameraMovementTask() : AsyncTask( "Camera Movement Task" )
{
cout << "CameraMovementTask::ctor()" << endl;
}
Interesting part is, that a crash occurs on instantiating the class:
dtool/src/dtoolbase/deletedBufferChain.cxx:51: void* DeletedBufferChain::allocate(size_t, TypeHandle): Assertion `size <= _buffer_size' failed.
But only when there’s some code in the constructor… if i remove the cout line, everything works as expected. Any ideas what’s going on here?
Thanks,
Egon