THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/09/2012 at 18:27, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 14
Platform: Windows ;
Language(s) : C++ ;
---------
Hey everyone,
I am getting a strange error that is crashing C4D.
When I run C4D through the debugger in VS 2010 I get the following exception in the file c4d_objectplugin.cpp.
the exception happens at line 163 in that file:
The exception is:
Unhandled exception at 0x0e3d217a (PXG Elements.cdl) in CINEMA 4D Demo.exe: 0xC0000005: Access violation reading location 0x00000000.
This is happening even on an object plugin with no new code added to it. Just an empty skeleton.
I am not sure why this is happening but any time I try to open any of my object plugins they crash c4d.
Is this a bug in the API? or am I doing something wrong?
Here is the skeleton object code:
#include "c4d.h"
#include "c4d_symbols.h"
#include "myplugin.h"
//PLUGIN ID
//=====================================//
"INTENTIONALLY REMOVED"
//CLASS
//=====================================//
class MyPlugin : public ObjectData{
public:
//Inherited Methods
//=====================================//
virtual Bool Init(GeListNode *node);
virtual Bool Message(GeListNode *node, LONG type, void *t_data);
static NodeData *Alloc(void) { return gNew MyPlugin; }
virtual DRAWRESULT Draw(BaseObject* op, DRAWPASS drawpass, BaseDraw* bd, BaseDrawHelp* bh);
virtual BaseObject *GetVirtualObjects(BaseObject* op, HierarchyHelp* hh);
};
//Initialize Default Settings
//=====================================//
Bool MyPlugin::Init(GeListNode *node){
GePrint("INIT");
return TRUE;
}
//Draw Visual Aides
//=====================================//
DRAWRESULT MyPlugin::Draw(BaseObject* op, DRAWPASS drawpass, BaseDraw* bd, BaseDrawHelp* bh)
{
GePrint("DRAW");
return DRAWRESULT_OK;
}
//Generate Virtual Objects
//=====================================//
BaseObject *MyPlugin::GetVirtualObjects(BaseObject* op, HierarchyHelp* hh){
GePrint("GVO");
return NULL;
}
//Checks messages from the plugin
//=====================================//
Bool MyPlugin::Message(GeListNode *node, LONG type, void *t_data){
GePrint("MSG");
return TRUE;
}
//REGISTER THE PLUGIN
//=====================================//
Bool RegisterMyPlugin(void){
String name=GeLoadString(IDS_MYPLUGIN); if (!name.Content()) return TRUE;
return RegisterObjectPlugin(ID_MYPLUGIN, name, OBJECT_GENERATOR, MyPlugin::Alloc,"my_plugin",AutoBitmap("my_plugin.tif"),0);
}
Any thoughts as to why this is happening. It doesn't seem to matter which of my object plugins I try to run , it still crashes in R14.
Thanks,
Shawn