HISE Logo Forum
    • Categories
    • Register
    • Login

    Compiling Just an Empty Clone Container Fails

    Scheduled Pinned Locked Moved Bug Reports
    23 Posts 6 Posters 454 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.
    • clevername27C
      clevername27 @d.healey
      last edited by

      @d-healey Did I answer your question about which versions well enough? I didn't mean to sound flippant—just that I really have tried them all (including the version you mentioned).

      d.healeyD 1 Reply Last reply Reply Quote 1
      • hujackusH
        hujackus @d.healey
        last edited by

        @d-healey said in Compiling Just an Empty Clone Container Fails:

        /HISE/hi_dsp_library/node_api/nodes/Containers.h:116:49: error: ‘const struct scriptnode::wrap::clone_base<scriptnode::wrap::clone_data<scriptnode::container::chain<scriptnode::parameter::empty, scriptnode::wrap::fix<2, scriptnode::core::empty> >, 0, 1>, scriptnode::CloneProcessType::Copy>’ has no member named ‘isPolyphonic’
        >   116 |     bool isPolyphonic() const { return get<0>().isPolyphonic(); }
        

        I'm trying to parse this error. Basically, some code tried calling isPolyphonic() on a clone_base struct when isPolyphonic() is not defined for that struct. This is probably a runtime error only seen when compiling clone containers. The location of that code seems to be in the Containers.h file within the container_base struct.

        The container_base struct has a protected member std::tuple<Processors...> called elements. This is relevant because the error is referring to get<0>().isPolyphonic() and get<0>() is defined further up in the Containers.h file
        as (i'm not sure which one)

        template <int arg> constexpr auto& get() noexcept { return std::get<arg>(elements).getObject(); }
        template <int arg> constexpr const auto& get() const noexcept { return std::get<arg>(elements).getObject(); }
        

        so get<0>().isPolyphonic() is kind of equivalent to std::get<0>(elements).getObject().isPolyphonic() which breaks down in English to get the first object in the elements tuple and ask if it's polyphonic. The error leads me to believe that there is a clone_base struct in that elements tuple of Processors and clone_base doesn't have function isPolyphonic().

        clone_base is a struct defined in duplicate.h and does not seem to have a polyphonic anything related, so I'm guessing there shouldn't be a clone_base struct in that elements tuple. So I'm thinking where does it get in there? So I'm looking for where clone_base is referenced and I stumble on this alias definition in processors.h

        template <typename T, int NumDuplicates>
        using fix_clonecopy = clone_base<clone_data<T, options::no, NumDuplicates>, CloneProcessType::Copy>;
        

        which means I can cut down the size of the error message to this

        /HISE/hi_dsp_library/node_api/nodes/Containers.h:116:49: error: ‘const struct fix_clonecopy’ has no member named ‘isPolyphonic’
        >   116 |     bool isPolyphonic() const { return get<0>().isPolyphonic(); }
        

        I don't know how all this helps anyone. Does anyone else have a different error message related to this problem that I could look at to look for clues?

        Check out the music of Conway's Game of Life - https://www.youtube.com/@hujackus
        ConwayMatrix - http://hujackus.altervista.org/conwaymatrix/

        clevername27C 3 Replies Last reply Reply Quote 1
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey
          Im using

          c808118776c8f41f5f718faa4f9af3ea5313ba72

          from 17th feb.

          Im also doing this form a completely fresh, new and empty project...

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 1
          • d.healeyD
            d.healey @clevername27
            last edited by

            @clevername27 said in Compiling Just an Empty Clone Container Fails:

            @d-healey Did I answer your question about which versions well enough? I didn't mean to sound flippant—just that I really have tried them all (including the version you mentioned).

            I was only asking Lindon because he said it worked for him.

            @Lindon said in Compiling Just an Empty Clone Container Fails:

            form a completely fresh, new and empty project...

            But you're using the snippet Bill posted?

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            LindonL 1 Reply Last reply Reply Quote 1
            • HISEnbergH
              HISEnberg @clevername27
              last edited by

              @clevername27 I was curious about your issue here so I tinkered around with it, and I managed to get this to compile (based off of your example):

              HiseSnippet 1111.3oc6V0saaaCElzNLoIKccEn.a2MeY5PQfkiShC1EsINwqFaNwXJKn2EPSQGSDIRAIpj5Mr2s8HrGk8FrcnnrkTpbRlQ61tXx.Fh7bN57wuyebXjhwiiUQH7FmOMjivaRbmJ0S5NgJjn9GivqRNmGqQGMMjFGy8PXb8uyHCu9Jnzm+30GQ8oRFOeKD5Bkfw+AQf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9c8WqR9aYopiTpqCnoU8K2MB+QUhVHuZ.UGIdOfKfsbg.MaVoc7rp5r0Mmk65B00oK9S3ISniYMNSnyLg+i3i.JKRcIy1o0PfOIcGHwPllQuNYfYcCGzMVxKeNV.bSgKYrxepOvvVKqg6rrF1dYMb2k0v8VVC2eYMryCan4hbGlnUA1gOHzfgmjlniwmHovTxzIun+Bk4oc+B
              
              

              I couldn't make any sense of the debug console but it seems to me that the clone container is looking for the number of clones to be specified or it will fail to compile. I also had to add some type of processing in the container or else it would fail. I've used the clone container successfully in the past.

              General rule of thumb I follow is make sure the NumClones is the first macro control (and the ranges match for each node it controls), and to precompile all of your processing in a separate scriptnode and load that into the clone container (less error prone, plus it keeps the network more organized).

              Screenshot 2025-02-21 at 8.54.35 AM.png

              clevername27C 1 Reply Last reply Reply Quote 1
              • clevername27C
                clevername27 @hujackus
                last edited by clevername27

                @hujackus As @d-healey mentioned, we may be looking at different issues. That said, here are some links to error messages and possibly-useful information I've received in and around this issue. (@d-healey suggested running the compile directly from inside Xcode, which indeed provided more verbosity in error reporting.)

                • Link 1

                • Link 2

                • Link 3

                • Link 4

                1 Reply Last reply Reply Quote 0
                • clevername27C
                  clevername27 @HISEnberg
                  last edited by clevername27

                  @HISEnberg Interesting and thank you - especially about the parameter ordering. I eventually stopped making the number of clones dynamic, and I think my snippets are all such—but maybe if I don't change the number of active clones during execution, the dynamic process is still happening - in which case, maybe it makes sense to always set the number of clones, manually?

                  I also don't think any of us have stopped to realise the moral and ethical implications of cloning, but I guess one thing at a time.

                  1 Reply Last reply Reply Quote 0
                  • clevername27C
                    clevername27 @hujackus
                    last edited by clevername27

                    @hujackus I am feeling like a proper lazy slug looking at all the sleuthing you're doing. (I'm taking a look, now.)

                    And…you may be on to something. I tried compiling my snippet with that function always returning TRUE, and it compiled. 🚀

                    When you say struct, do you mean class? (Structs don't have methods, although I guess you could use a function pointer.)

                    I'm assuming that the function is returning whether Clone nodes can be used in polyphonic networks. So, I changed the return value from FALSE to TRUE. Seems to work. Cheers for your detective work, @hujackus.

                    Update: Didn't work for my original snippet.

                    df454456-5612-42f3-a5b2-35e799c2e18b-image.png

                    @d-healey If this works for others, do you want to submit this?

                    d.healeyD hujackusH 2 Replies Last reply Reply Quote 0
                    • clevername27C
                      clevername27 @hujackus
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @d.healey
                        last edited by Lindon

                        @d-healey said in Compiling Just an Empty Clone Container Fails:

                        @Lindon said in Compiling Just an Empty Clone Container Fails:

                        form a completely fresh, new and empty project...

                        But you're using the snippet Bill posted?

                        Yes

                        HISE Development for hire.
                        www.channelrobot.com

                        1 Reply Last reply Reply Quote 1
                        • d.healeyD
                          d.healey @clevername27
                          last edited by

                          @clevername27 said in Compiling Just an Empty Clone Container Fails:

                          Structs don't have methods

                          They can in C++ and do in the HISE codebase.

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          clevername27C 1 Reply Last reply Reply Quote 1
                          • clevername27C
                            clevername27 @d.healey
                            last edited by

                            @d-healey You're absolutely right.

                            1 Reply Last reply Reply Quote 0
                            • hujackusH
                              hujackus @clevername27
                              last edited by hujackus

                              @clevername27 said in Compiling Just an Empty Clone Container Fails:

                              When you say struct, do you mean class?

                              Yeah clone_base is a struct. It has a few methods, but no member named ‘isPolyphonic’. I'm assuming there is a wrapper class somewhere trying to cast a clone_base into a class that has a isPolyphonic() function.

                              Setting the default return value of NodeBase::isPolyphonic() from false to true is an interesting lead. Looking for subclasses of NodeBase now to see how it relates to the clone_base struct.

                              Check out the music of Conway's Game of Life - https://www.youtube.com/@hujackus
                              ConwayMatrix - http://hujackus.altervista.org/conwaymatrix/

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

                              50

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              101.8k

                              Posts