Why does this error come up when i try to add a new button in?

Hi i tried adding in a new button however when i ran the program, this error pops up:
the error is specifically in “auto layout = lf.getSliderLayout (owner);”

void resized (LookAndFeel& lf)
    {
        auto layout = lf.getSliderLayout (owner);
        sliderRect = layout.sliderBounds;

        if (valueBox != nullptr)
            valueBox->setBounds (layout.textBoxBounds);

        if (isHorizontal())
        {
            sliderRegionStart = layout.sliderBounds.getX();
            sliderRegionSize = layout.sliderBounds.getWidth();
        }
        else if (isVertical())
        {
            sliderRegionStart = layout.sliderBounds.getY();
            sliderRegionSize = layout.sliderBounds.getHeight();
        }
        else if (style == IncDecButtons)
        {
            resizeIncDecButtons();
        }
    }

this is my code:
specifically when i added in loopButton, the program crashes

#include <JuceHeader.h>
#include "DeckGUI.h"


//==============================================================================
DeckGUI::DeckGUI(DJAudioPlayer* _player, juce::AudioFormatManager& formatManagerToUse, juce::AudioThumbnailCache& cacheToUse) : player(_player), waveformDisplay(formatManagerToUse, cacheToUse)
{
    addAndMakeVisible(playButton);
    addAndMakeVisible(stopButton);
    addAndMakeVisible(loadButton);
    addAndMakeVisible(loopButton);
   

    addAndMakeVisible(volSlider);
    addAndMakeVisible(speedSlider);
    addAndMakeVisible(posSlider);

    addAndMakeVisible(waveformDisplay);

    playButton.addListener(this);
    stopButton.addListener(this);
    loadButton.addListener(this);
    loopButton.addListener(this);
    

    volSlider.addListener(this);
    speedSlider.addListener(this);
    posSlider.addListener(this);

    volSlider.setRange(0.0, 1.0);
    speedSlider.setRange(0.0, 100.0);
    posSlider.setRange(0.0, 1.0);

    //sets slider to vertical style
    /*volSlider.setSliderStyle(juce::Slider::SliderStyle::LinearVertical);
    speedSlider.setSliderStyle(juce::Slider::SliderStyle::LinearVertical);
    posSlider.setSliderStyle(juce::Slider::SliderStyle::LinearVertical);

    volSlider.setTextBoxStyle(juce::Slider::TextBoxBelow, false, 30, 15);*/
   


    startTimer(500);

    
    
}

DeckGUI::~DeckGUI()
{
    stopTimer();
}

void DeckGUI::paint (juce::Graphics& g)
{
    /* This demo code just fills the component's background and
       draws some placeholder text to get you started.

       You should replace everything in this method with your own
       drawing code..
    */

    g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));   // clear the background
 
    g.setColour (juce::Colours::grey);
    g.drawRect (getLocalBounds(), 1);   // draw an outline around the component

    g.setColour (juce::Colours::white);
    g.setFont (14.0f);

    
    

    // Draw the text under the sliders
    /*g.drawText("Volume", volSlider.getX() - 10, volSlider.getBottom() + 5, volSlider.getWidth() + 20, 20, juce::Justification::centred);
    g.drawText("Speed", speedSlider.getX() - 10, speedSlider.getBottom() + 5, speedSlider.getWidth() + 20, 20, juce::Justification::centred);
    g.drawText("Position", posSlider.getX() - 10, posSlider.getBottom() + 5, posSlider.getWidth() + 20, 20, juce::Justification::centred);*/

}

void DeckGUI::resized()
{
    double rowH = getHeight() / 8;

    playButton.setBounds(getWidth() / 2, 0, getWidth() / 4, rowH * 2);
    stopButton.setBounds(getWidth() / 4, 0, getWidth() / 4, rowH * 2);
    loopButton.setBounds(0, 0, getWidth() / 4, rowH * 2);
    loadButton.setBounds(0, rowH * 7, getWidth(), rowH);

    

    volSlider.setBounds(0, rowH * 2, rowH, rowH);
    speedSlider.setBounds(0, rowH * 3, rowH, rowH);
    posSlider.setBounds(0, rowH * 4, rowH, rowH);

    waveformDisplay.setBounds(0, rowH * 5, getWidth(), rowH * 2);


}

Can you include a call stack from the crash?

hi there, i’ve managed to solve the issue already! For some reason even though i was saving my work in Visual Studios, in the actual source folder, my files weren’t being saved.

Yay! And very strange! :thinking: