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
    • Recent
    • Tags
    • Users
    • Login

    tag addition = Fail... why?

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 293 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 01/05/2010 at 16:19, xxxxxxxx wrote:

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

      ---------
      Ok, so this problem has presented itself a couple of times.  One time it just solved itself after cleaning up all the code in my plugin.  The second time it popped up, I found the problem and was able to fix it.  Those were both on mac (both 32 and 64bit).  I sent out my code for windows compiles and now the problem has appeared again, more malicious than ever, but only in an R11.5 64bit build.  It doesn't show up in a 32bit build built in R11 (that's all I can test with vc++ express).

      In previous occurrences, it was certain types of objects that wouldn't accept the tag (that was the problem that "fixed itself" after cleaning up all my code).  The second time, it was tags within a hierarchy (some would accept it, others wouldn't).  The problem code for the second occurrence was the following, from the Message member of my tag class:

        
        
        SplineData *spline1, *spline2, *spline3, *spline4, *spline5, *spline6, *spline7, *spline8, *spline9, *spline10 = NULL;  
        if (!spline1) return FALSE;  
        if (!spline2) return FALSE;  
        if (!spline3) return FALSE;  
        if (!spline4) return FALSE;  
        if (!spline5) return FALSE;  
        if (!spline6) return FALSE;  
        if (!spline7) return FALSE;  
        if (!spline8) return FALSE;  
        if (!spline9) return FALSE;  
        if (!spline10) return FALSE;  
        
      

      I commented out those checks and everything works fine.  Which is really wierd, because I always thought constant checking was supposed to be a good thing (and I suspect... though can't confirm... that the first occurrence may have been related to a check like the ones above).

      The only difference between the sources used in the working R11 32bit build and the non-working Win 64bit build are 2 lines of code that have no impact until a button is pressed in the AM (which doesn't happen when tags are added so I don't see that as being a problem).  It's only a change from AnimateDocument() to ExecutePasses() for 11.5 compatibility.

      The current problem is only in R11.5 64bit on Windows.  No object of any kind anywhere in the scene will accept my plugin tag.  The plugin does work if I load a scene that already had a tag in it, but no new tags can be added via the tag menu.

      I need to figure out what just about all the root causes of this type of problem might be.  Because it doesn't happen anywhere on mac (whether I build in R10, R11 or R11.5), or on windows with R11 32bit (don't know about 64bit in R11 or 32bit in R11.5).

      ...it sucks not having Visual Studio, but a forum post for advice is better than asking someone who's doing me a favor to sort through all my code (like I had to do previously) to track this down.

      Think of it like an episode of House... the only hitch is you can't perform any tests;)
      ...and yes, that gives you the right to reply in a House-esque manner:)

      thanks,
      kvb

      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 01/05/2010 at 17:39, xxxxxxxx wrote:

        Howdy,

        Shouldn't you be setting the spline1 through spline9 pointers to NULL as you've done with the spline10 pointer?

        Adios,
        Cactus Dan

        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 01/05/2010 at 18:30, xxxxxxxx wrote:

          I thought declaring them in one line like that would do just that... but I bow to your greater experience, I'll put that on the list of possibles:)

          thanks Dan:)

          -kvb

          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 01/05/2010 at 18:54, xxxxxxxx wrote:

            Howdy,

            To double check it, set a breakpoint just after that line and look at the variable values in the debugger. If they don't all equal 0, then you'll know you have to set each one equal to NULL.

            Adios,
            Cactus Dan

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