Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    R23 usd/tbb version

    Cinema 4D SDK
    r23
    4
    12
    2.9k
    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.
    • kbarK
      kbar
      last edited by

      Use this version of TBB on OSX: https://github.com/wjakob/tbb

      It has been updated to allow you to create statically compiled libraries using CMake.

      https://www.gamelogicdesign.com
      https://www.plugins4d.com

      rsodreR 1 Reply Last reply Reply Quote 0
      • rsodreR
        rsodre @kbar
        last edited by

        Thanks @kbar ,

        We use tbb for a long time and never had problems, only now with usd. I'll try what you say.

        I'm not even sure if tbb is the problem, but would be helpful to know which version is used bt Maxon's usd.

        Roger

        kbarK 1 Reply Last reply Reply Quote 0
        • kbarK
          kbar @rsodre
          last edited by

          @rsodre do you still have problems if you statically compile TBB? I can see how you would have problems if you tried to load a dylib, since it may try to use the one used by USD and not be compatible. But statically compiling and linking it directly to your own plugin should avoid those problems. It did for me.

          https://www.gamelogicdesign.com
          https://www.plugins4d.com

          1 Reply Last reply Reply Quote 1
          • r_giganteR
            r_gigante
            last edited by

            Hi Roger, I've checked with our developers and I've been confirmed that our USD uses TBB 2019 u3.

            Best, R

            1 Reply Last reply Reply Quote 1
            • ferdinandF
              ferdinand
              last edited by

              Hi,

              without further feedback, we will consider this thread as solved by Monday and flag it accordingly.

              Cheers,
              Ferdinand

              MAXON SDK Specialist
              developers.maxon.net

              1 Reply Last reply Reply Quote 0
              • rsodreR
                rsodre
                last edited by

                This issue is not solved yet.
                I'm just disabling customo USD features on R23 for the moment.

                I have not tried @kbar suggestion. The TBB team does not recommended to link statically, and my team agrees.

                r_giganteR 1 Reply Last reply Reply Quote 0
                • ferdinandF
                  ferdinand
                  last edited by

                  Hi @rsodre,

                  no worries, I leave the thread open. But I would like to remind you politely, that we would prefer it if separate questions would have separate threads, rather than piling multiple questions all regarding one broader topic in one thread. When there are any questions left about Cinema's TBB version, we would have to ask you to clarify them for us.

                  Cheers,
                  Ferdinand

                  MAXON SDK Specialist
                  developers.maxon.net

                  1 Reply Last reply Reply Quote 0
                  • r_giganteR
                    r_gigante @rsodre
                    last edited by

                    @rsodre can you confirm that even using 2019u3 you still have issue? Have you had any feedback from USD guys?

                    Cheers, R

                    rsodreR 1 Reply Last reply Reply Quote 0
                    • rsodreR
                      rsodre @r_gigante
                      last edited by rsodre

                      @r_gigante yes, I tried that version and no luck as well, but it looks like a USD issue to me.
                      The USD team didn't give much hope for helping with this.

                      I've built my usd static library using pxr_Custom as internal namespace to identify on the call stack. This screenshot shows the call stack, looks like it's trying to load C4D's dynamic lib instead of the included static. Thats why I don't think it's tbb issue.

                      I have the issue isolated on a simple plugin, and if I link to C4D's dynamic usd, instead of our built monolithic static, the simple plugin seems to load and work. I will try to do the same on our environment...

                      But this will be a super specific ugly exception on the build pipeline. If we could fix and make the plugin use its own included static version of USD would be much easier. The simple plugin is here, if you could check.
                      To test the project, just run C4D from Xcode and it will freeze loading the plugins.
                      You can add ../install.sh as a Run Script Phase to fix library paths and deploy. (I wish I could add the Run Script Phase from project tool...😉 )

                      1 Reply Last reply Reply Quote 0
                      • r_giganteR
                        r_gigante
                        last edited by

                        Hi @rsodre, a quick update from Pixar that hopefully shall address your issue

                        From: Ivan Kolev [email protected]
                        Subject: Re: [PixarAnimationStudios/USD] Deadlock loading usd (#1341)
                        Date: 22 March 2021 at 11:53:37 CET

                        We resolved this by switching our plugin to refer to the copy of libtbb.dylib included with C4D's USD module, using install_name_tool -change

                        As our plugin runs on 3 platforms and on 3 hosts (3dsMax/Maya/C4D), our approach to TBB usage is to rely on its full backward compatibility: we compile/link against the oldest version that does the job for us (4.4) and expect that the hosts provide newer versions.
                        In case of C4D we didn't do that because C4D doesn't include TBB in its main application, though some of its external modules do include their own copy of TBB. Similar to the other modules, we included our (old 4.4) copy of TBB.

                        But this was no problem until now, the copies of TBB carried by C4D's modules haven't interfered in any harmful way. And the new USD module in R23 didn't change that.

                        The source of the problem here is probably the fact that our plugin links to our own static copy of USD, which causes USD to be loaded twice, along with two different copies of TBB (and maybe the version mismatch is not important).
                        So, linking against C4D's copy of TBB resolved the TBB deadlock problem, but we have now a new duplicate symbol problem, which I opened a new issue about: #1479

                        Cheers, R

                        1 Reply Last reply Reply Quote 1
                        • lleallooL llealloo referenced this topic on
                        • First post
                          Last post