On 10/10/2014 at 04:13, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 16
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Hi,
I have massive problems in R16. All my code runs fine in R13-15 but in R16 I get some crashes that make no sense. Also during debugging I a lot of times get "Cinema4D.exe hat einen Haltepunkt ausgelöst". This happens for GetInputState for example, but also for GetVector of a basecontainer.
This happens in a scene hook btw. At first I thought this would be up to my code somehow but then I tried it directly with an unmodified version of the Cinema 4D sdk and the same happens there. Here is my test code added to main.cpp of the C4D sdk:
class TestHook : public SceneHookData
{
public:
static NodeData *Alloc(void) { return NewObj(TestHook); }
virtual EXECUTIONRESULT Execute(BaseSceneHook* node, BaseDocument* doc, BaseThread* bt, Int32 priority, EXECUTIONFLAGS flags)
{
if(bt->TestBreak()) return EXECUTIONRESULT_OK;
BaseContainer res;
GetInputState(BFM_INPUT_MOUSE,BFM_INPUT_MOUSELEFT, res);
return EXECUTIONRESULT_OK;
}
};
Bool PluginStart(void)
{
RegisterSceneHookPlugin(104929053,"Testhook",0,TestHook::Alloc,0,0);
GetInputState ALWAYS triggers a break with the above mentioned message window. And bt->TestBreak() randomly crashes (sometimes it does and sometimes it doesn't). I have no other plugins installed, just built the c4d sdk with the above addition of code.
As mentioned before, compiling with R13 API does not trigger any crashes (also running that version in R16.027 does NOT result in any crashes) and my code runs fine. Compiling with R16.027 brought up these problems (beside others).
What is this?
Best
Samir