StackOverflowException



  • Hello,

    I have got a problem of An unhandled exception of type 'System.StackOverflowException'.

    I have read that it is possible that the reason is that I have too many method calls.

    I am working with a GUI and I didn't want that the code in Form() was too big so I thougth I could make a function, similar to C, in another .cpp and this way having there the code and making a call from Form().

    Form()
    void labelling ()
    {
        bwlabel(image,8);
    }
    

    bwlabel.h

    void order(void);
    void bubble(void);
    void bwlabel (System::Drawing::Bitmap^ image, int number);//inside bwlabel I use order() and bubble().
    

    Could be that the reason of the error? and if it is, what can I do to solve it?

    Thank you in advanced!!



  • Hi,
    the most common issue are recursive function calls. Check your code for selfcalling function calls.


Anmelden zum Antworten