Forum
    • Categories
    • Register
    • Login

    C++ External Node & XML Issues

    Scheduled Pinned Locked Moved Unsolved Bug Reports
    9 Posts 3 Posters 128 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.
    • HISEnbergH
      HISEnberg
      last edited by HISEnberg

      @Christoph-Hart

      Github issue: https://github.com/christophhart/HISE/issues/866

      I've been getting a lot of these errors lately (maybe since the last 3-4 weeks?)

      XML file is not valid. Loading aborted
      

      Usual context is having a hardcoded FX module with a custom C++ node (or Scriptnode Networking containing a C++ node). If I remove the reference in a text editor (.xml), the project will load and I can add my node back in. But resaving and opening again will reproduce this issue. Mind you it isn't a matter of updating HISE or recompiling the FX, this happens on any build from this year.

      Screenshot 2026-02-04 at 1.52.55 PM.png

      Sonic Architect && Software Mercenary

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @HISEnberg
        last edited by

        @HISEnberg Probably an issue with your parameter names. Note that using eg. "Type" is illegal because it clashes with the XML element for the module type (HISE!).

        HISEnbergH 1 Reply Last reply Reply Quote 0
        • HISEnbergH
          HISEnberg @Christoph Hart
          last edited by

          @Christoph-Hart Hmm that seems reasonable. Do any of these raise any flags? I'll try changing the parameter name but I can't imagine this causing issues (it's from one of the C++ modules causing me troubles).

                  void createParameters(ParameterDataList& data)
                  {
                      {
                          parameter::data p("PreGain (dB)", { -24.0, 24.0, 0.1 });
                          registerCallback<0>(p);
                          p.setDefaultValue(0.0);
                          data.add(std::move(p));
                      }
                      {
                          parameter::data p("Hold (ms)", { 0.0, 100.0, 1.0 });
                          registerCallback<1>(p);
                          p.setDefaultValue(5.0);
                          p.setSkewForCentre(30.0f);
                          data.add(std::move(p));
                      }
                      {
                          parameter::data p("Release (ms)", { 1.0, 2500.0, 1.0 });
                          registerCallback<2>(p);
                          p.setDefaultValue(80.0);
                          p.setSkewForCentre(800.0f);
                          data.add(std::move(p));
                      }
                      {
                          parameter::data p("Ceiling (dB)", { -60.0, 0.0, 0.1 });
                          registerCallback<3>(p);
                          p.setDefaultValue(0.0);
                          data.add(std::move(p));
                      }
                  }
          
          

          Sonic Architect && Software Mercenary

          Christoph HartC 1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart @HISEnberg
            last edited by

            @HISEnberg I see a parenthesis in a parameter Id, I get instant rash on my forehead.

            OrvillainO 1 Reply Last reply Reply Quote 3
            • OrvillainO
              Orvillain @Christoph Hart
              last edited by

              @Christoph-Hart Wouldn't cause a corruption in XML. So far as I know, it is perfectly legal to do so. I've used parenthesis in parameter id's for ages and not had any errors in xml files like what @HISEnberg is reporting.

              Musician - Instrument Designer - Sonic Architect - Creative Product Owner
              Crafting sound at every level. From strings to signal paths, samples to systems.

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

                @Orvillain Strange, I am inclined to agree with you since I've done this with other nodes, but removing them in this particular context seems to have solved the problem. Still I can't find the root issue here so I'll keep digging...

                Sonic Architect && Software Mercenary

                OrvillainO 1 Reply Last reply Reply Quote 0
                • OrvillainO
                  Orvillain @HISEnberg
                  last edited by Orvillain

                  @HISEnberg said in C++ External Node & XML Issues:

                  @Orvillain Strange, I am inclined to agree with you since I've done this with other nodes, but removing them in this particular context seems to have solved the problem. Still I can't find the root issue here so I'll keep digging...

                  That is very odd. There's nothing in the XML specification that says you shouldn't use parenthesis in an attribute name, so far as I know. The only character to definitely be wary of in my experience is an ampersand.

                  Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                  Crafting sound at every level. From strings to signal paths, samples to systems.

                  Christoph HartC 1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @Orvillain
                    last edited by

                    @Orvillain I think the problem is that HISE converts Parameter IDs into actual attributes. This is only the case with hardcoded modules, script processors or DSP networks properly escape that in the value string.

                    <Processor Type="Hardcoded Master FX" ID="HardcodedMasterFX1" Bypassed="0"
                               Network="No network" YourParameterGoesHere="0.5" TryValidating(That)="nope">
                      <EditorStates BodyShown="1" Visible="1" Solo="0"/>
                      <ChildProcessors/>
                      <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/>
                    </Processor>
                    

                    I do a bit of sanitizing at some place though (eg. remove white space for the XML attribute, so all my ramblings might be moot because I sprinkled a character sanitation in there too.

                    OrvillainO 1 Reply Last reply Reply Quote 0
                    • OrvillainO
                      Orvillain @Christoph Hart
                      last edited by

                      @Christoph-Hart said in C++ External Node & XML Issues:

                      @Orvillain I think the problem is that HISE converts Parameter IDs into actual attributes. This is only the case with hardcoded modules, script processors or DSP networks properly escape that in the value string.

                      <Processor Type="Hardcoded Master FX" ID="HardcodedMasterFX1" Bypassed="0"
                                 Network="No network" YourParameterGoesHere="0.5" TryValidating(That)="nope">
                        <EditorStates BodyShown="1" Visible="1" Solo="0"/>
                        <ChildProcessors/>
                        <RoutingMatrix NumSourceChannels="2" Channel0="0" Send0="-1" Channel1="1" Send1="-1"/>
                      </Processor>
                      

                      I do a bit of sanitizing at some place though (eg. remove white space for the XML attribute, so all my ramblings might be moot because I sprinkled a character sanitation in there too.

                      ahhhhhhhhhhhhh, gotcha. Yes, then that does make sense that parenthesis would possibly break things... and now I'm going to do a sweep through my code to see how many landmines I've invented. 😆

                      Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                      Crafting sound at every level. From strings to signal paths, samples to systems.

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

                      23

                      Online

                      2.2k

                      Users

                      13.4k

                      Topics

                      116.2k

                      Posts