Help needed with c4d_network.cpp



  • On 12/06/2015 at 02:10, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   16 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello,

    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).
    Any ideas?



  • On 12/06/2015 at 06:35, xxxxxxxx wrote:

    Hello,

    could you please share some code that shows what exactly are you doing and that would help us to reproduce the issue?

    Best wishes,
    Sebastian



  • On 12/06/2015 at 09:05, xxxxxxxx wrote:

    Hi Sebastian,

    we could track it down to a simple line of code:

    IpAddrPort tadr;

    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)
    {
         Int error=0;
         UChar a,b,c,d;

    IpAddrPort tadr; // <-- Crash

    return NULL;
    }

    The same is happened when I want to create an instance of IpAddrPort with the Standard constructor in PluginStart() as shown below.

    Bool PluginStart(void)
    {
            IpAddrPort tadr;
            ...
    }

    Note, the problem comes with Windows only, MAC OS seems to be ok.
    Code was compiled on R15 but crashes on R16.

    Andre



  • On 17/06/2015 at 09:50, xxxxxxxx wrote:

    Hello,

    in R16 IpAddrPort was replaced with NetworkIpAddrPort. So you have to update your code and recompile your plugin with R16.

    Best wishes,
    Sebastian



  • On 03/07/2015 at 09:29, xxxxxxxx wrote:

    Hello Arndt,

    was your question answered?

    Best wishes,
    Sebastian


Log in to reply