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

    Custom Member Crashes

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 264 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 15/11/2012 at 07:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   14 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hallo,
      I have a problem with a Tag Plugin, which is crashing if I delete an unnecessary Variable from the Header. So I came to thinking that I might be doing something that is forbidden anyway. My header looks like this:

      class TransferTag : public TagData
      {
          private:
              BaseContainer ChangesBC; //unnecessary BaseContainer
              CTransfer * CTrans; //custom class
              Real AreaRadius;
          
          public:
              virtual Bool Init(GeListNode *node);
              virtual void Free(GeListNode* node);
              static NodeData *Alloc(void) { return gNew  TransferTag; }
          
              CTransfer * GetTransfer(BaseObject * Asker, Real Radius); //custom member function
      };

      The function "GetTransfer" is called by other Plugin Objects and returns *CTrans from private. Is it allowed to do so?
      Thanks
      Jonnz

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 15/11/2012 at 10:00, xxxxxxxx wrote:

        Hi Jonnz,

        yes it is allowed. Have you recompiled all other files that reference your plugin? The relative
        memory location of the *CTrans has changed and object files that were
        compiled with previous version reference it from the wrong position. Although you are not
        accessing the attribute directly, but through a function call, there may be the possibility the
        compiler has inlined the function (depending on your compiler options).

        I currently can't think of another reason.

        Best,
        Niklas

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 15/11/2012 at 13:16, xxxxxxxx wrote:

          Hi Niklas,
          thanks for your help. I'm happy to know that it's allowed to do that, so I can keep working. 
          Since I have cleaned the project several times and checked if the compiler is inlineing the function, I guess the problem must lie somewhere else.

          Regards
          Jonnz

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