Thank you very much for your reply Riccardo!
Yes of course you are right - modifying the c4d sdk is a bad way.
I just did this to see what happens.
I will take a close look to the manual you have mentionend and will review
the memory handling in my code.
Hello Cinema Coders,
I am running into a crash when compiling and executing my plugins in Release Mode (Cinema4D R19)
C4D crashes with an application error and a bug report is being generated:
CINEMA 4D.exe: 0x000000014034BB33 (SP: 0x000000000E65F5B8, PC: 0x000000014034BB33)
CINEMA 4D.exe: 0x0000000140293409 (SP: 0x000000000E65F5C0, PC: 0x0000000140293409)
SHD_BaseResource.cdl64: _GeFree + 0x1e (SP: 0x000000000E65F5F0, PC: 0x000007FEB128439E)
SHD_BaseResource.cdl64: BaseData::Destructor + 0x23 (SP: 0x000000000E65F620, PC: 0x000007FEB126ED03)
c4dplugin.xdl64: 0x000007FEB7F1E702 (SP: 0x000000000E65F650, PC: 0x000007FEB7F1E702)
c4dplugin.xdl64: 0x000007FEB7F2B1E5 (SP: 0x000000000E65F6C0, PC: 0x000007FEB7F2B1E5)
c4dplugin.xdl64: 0x000007FEB7651993 (SP: 0x000000000E65F700, PC: 0x000007FEB7651993)
c4dplugin.xdl64: 0x000007FEB7940827 (SP: 0x000000000E65F740, PC: 0x000007FEB7940827)
c4dplugin.xdl64: 0x000007FEB99739FA (SP: 0x000000000E65F8B0, PC: 0x000007FEB99739FA)
CINEMA 4D.exe: 0x00000001403FA5EF (SP: 0x000000000E65F900, PC: 0x00000001403FA5EF)
CINEMA 4D.exe: 0x00000001404057CF (SP: 0x000000000E65F9A0, PC: 0x00000001404057CF)
ucrtbase.DLL: crt_at_quick_exit + 0xc6 (SP: 0x000000000E65FA30, PC: 0x000007FEE9610D76)
kernel32.dll: BaseThreadInitThunk + 0xd (SP: 0x000000000E65FA60, PC: 0x000000007717571D)
ntdll.dll: RtlUserThreadStart + 0x1d (SP: 0x000000000E65FA90, PC: 0x00000000773D385D)~~~~******~~~~
If I compile this plugin in Debug Mode no problem occurs.
As a dirty try-out I modified 2 functions in the cinema.framework:
In file c4d_memory.cpp:
void _GeFree(void** Daten)
*Daten = nullptr;
In file c4d_basplugin.cpp:
_this = this;
With the try and catch blocks in these two functions c4D works without crash in Relase mode.
Has maybe someone an idea where to look further regarding this issue?
Thanks a lot for your time!
Thank you very very much for your detailed explanation.
That helped me a lot and YEAHHHH....got it working
Thanx in advance for your time!
please excuse me me for interrupting your work.
I am completely new to the sdk development for Cinamea 4D.
In my company we use currently R 19 to develop plugins in C++
My task is to port our R 19 plugins to R 20.
As far as I could figure out there is a major change in the sdk with the introduction of R 20.
The R 20 cinema.framework compiles ok after running the project tool over it.
But now I have the same problem like viktor had: MAXON_MODULE_ID : undeclared identifier.
In a former post you mentioned to put this ID in the projectdefinition.txt file.
Do I have to create this file manually in all plugins folders?
Do I have to run the project tool over these folders once the projectdefinition.txt file is there?
As far as I have understood the project tool creates the project files for Visual Studio.
But in our R 19 plugin folders these files are already existing. Would it be enough to put an additional
projectdefinition.txt into these folders?
Thank you very much for your time!