HISE Logo Forum
    • Categories
    • Register
    • Login

    C++ API: SliderBase cannot find Constant Modulator (SIGSEV)

    Scheduled Pinned Locked Moved C++ Development
    3 Posts 1 Posters 188 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.
    • F
      fellhouseaudio
      last edited by fellhouseaudio

      Hi,

      I am trying to connect a juce::Slider in my custom c++ floating panel to a Constant Modulator in my hise project. I'm following along with info I found in an old forum post from 2021 (C++ API: How to connect Intensity to Slider). The code is crashing. After debugging I find that the SliderBase is unable to find the Constant Modulator by looking it up by ID. I have double checked that the IDs match. I don't really know how to proceed from here.

      Here is the gist of my code:

      class ExternalWaveformDisplayPlaybackControlComponent
          : public hise::FloatingTileContent,
            public FileDragAndDropTarget,
            public Component {
      public:
        SET_PANEL_NAME("ExternalWaveformDisplayPlaybackControlComponent");
        ExternalWaveformDisplayPlaybackControlComponent(FloatingTile *parent)
            : mc(getMainController()), FloatingTileContent(parent),
              testSlide(juce::Slider("Test2")),
              sampleStartConnection(&testSlide, mc, "SampleStartConstantMod")
        {
          sampleStartConnection.setData<raw::Data<float>::Intensity>();
        }
      ...
        hise::MainController *mc;
        juce::Slider testSlide;
        hise::raw::UIConnection::SliderBase sampleStartConnection;
      };
      

      The segfault happens on the call to setData as it was unable to find any node for id "SampleStartConstantMod". The output from the debug window makes it look like it was looking for a node by the id "Constant1" which is weird...

      Constant1 was not found. 
      Modulator Invalid Modulator does not exist.
      JUCE Assertion failure in raw_misc.h:346
      

      The actual nullptr access happens in hise::raw::Data<float>::Intensity::save (p=0x0) at raw_misc.h:346

      Has anyone done something like this recently? Am I on the right track?

      Thanks,

      David

      EDIT:

      I am beginning to think this is a bug in the API... If I name my Constant Modulator "Constant1" I get further but still eventually reach a SIGSEV in RootObject.h:61. While I don't know why we are getting a nullptr access in that class the fact that SliderBase is looking for "Constant1" instead of the id provided in the constructor seems to be an issue.

      F 1 Reply Last reply Reply Quote 0
      • F
        fellhouseaudio @fellhouseaudio
        last edited by

        @fellhouseaudio Anyone have any thoughts on this? Should i open up a github issue?

        1 Reply Last reply Reply Quote 0
        • F
          fellhouseaudio
          last edited by

          @fellhouseaudio said in C++ API: SliderBase cannot find Constant Modulator (SIGSEV):

          reach a SIGSEV in RootObject.h:61

          I opened a github issue

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

          31

          Online

          1.7k

          Users

          11.8k

          Topics

          102.7k

          Posts