Help needed with c4d_network.cpp
On 12/06/2015 at 02:10, xxxxxxxx wrote:
Cinema 4D Version: 16
Platform: Windows ;
Language(s) : C++ ;
we have a plugin here running fine with C4D 15 (Mac/Win) and C4D 16 (Mac).
It uses IpAddrPort tadr; from c4D_network.cpp
Compiling any subroutine with this command under C4D 15 runs fine in C4D 15 (Mac/Win) but crashes in C4D 16 (Win). The same plugin runs without problems under Mac (C4D 15 and 16).
On 12/06/2015 at 06:35, xxxxxxxx wrote:
could you please share some code that shows what exactly are you doing and that would help us to reproduce the issue?
On 12/06/2015 at 09:05, xxxxxxxx wrote:
we could track it down to a simple line of code:
use this in Main for instance, compile it with C4D 15 (Windows) and let it runs with C4D 16.
It crashes C4D here on Windows. The same code on a Mac (also compiled with C4D 15) runs without problems.
On 12/06/2015 at 09:12, xxxxxxxx wrote:
Do you declare it as a global variable (or as part of a structure which is declared as a global variable)
or in a function?
On 12/06/2015 at 11:19, xxxxxxxx wrote:
this line explains it "compile it with C4D 15 (Windows) and let it runs with C4D 16."
may be internally on windows it got changes, and on Mac it is the same.
On 13/06/2015 at 07:50, xxxxxxxx wrote:
It is declared inside a function.
Here is the code example.
#include "c4d_network.h" // R15
TcpConnection* winOpenListener(UInt32 ipAddr, int port, BaseThread* thread, Int32 timeout, Bool dontwait, Int32* ferr)
IpAddrPort tadr; // <-- Crash
The same is happened when I want to create an instance of IpAddrPort with the Standard constructor in PluginStart() as shown below.
Note, the problem comes with Windows only, MAC OS seems to be ok.
Code was compiled on R15 but crashes on R16.
On 17/06/2015 at 09:50, xxxxxxxx wrote:
in R16 IpAddrPort was replaced with NetworkIpAddrPort. So you have to update your code and recompile your plugin with R16.
On 03/07/2015 at 09:29, xxxxxxxx wrote:
was your question answered?