Problem with the textButton


#1

Hi,

I am facing a starbge problem witht the text buttons. I had already 4 text buttons(statically created buttons) in a component and all were working properly. Now, I wanted one more and I just added one more entry to the button list. Its throwing an exception. I couldnt even imagine what might be the problem. Below is the code,

 

class MenuComponent    : public Component,
                            public ButtonListener,
                            public ChangeListener
{

public:
    MenuComponent();
    ~MenuComponent();

private:
    homeButton, settingsButton, recordButton, playButton;

    void buttonClicked(Button*) override;
    
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuComponent)
};

 

In this, if I add an entry to the button list like " homeButton, settingsButton, recordButton, playButton, mybutton;"(I didnt add any code for the newly added button), It is throwing the below exception,

 

"Unhandled exception at 0x668FBC48 in FormalAudioApp.exe: 0xC0000005: Access violation executing location 0x668FBC48."

 

 


#2

This is why the debugger was invented. Try using one!


#3

Hi,

Thanks!!!! I will use the debugger and will try to solve it. I am trying to implement a stand-alone windows application.

 

Could you please suggest a good debugger for this?? I am new to this.... 


#4

All modern IDEs (Visual Studio, Xcode, etc.) have an integrated debugger. See for example https://msdn.microsoft.com/en-us/library/y740d9d3.aspx