Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Help needed with c4d_network.cpp

    SDK Help
    0
    8
    602
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

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

                    Hello Arndt,

                    was your question answered?

                    Best wishes,
                    Sebastian

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post