System.StackOverflowException

Imaad Isaacs 1 Reputation point
2021-06-13T22:01:01.3+00:00

Im not sure why im getting this error

105120-screenshot-26.png

Developer technologies Windows Forms
Developer technologies C#
{count} votes

2 answers

Sort by: Most helpful
  1. Sam of Simple Samples 5,546 Reputation points
    2021-06-13T23:45:44.007+00:00

    Without additional information I can only guess. The only possible explanation based on the information available is that the InitializeComponent method is being called recursively. Perhaps it would help if you update the question and show how (and everywhere) the InitializeComponent method is being called.

    In your image look in the toolbar for Stack Frame:. It is at the second row under the search box. While debugging click on the stack frame to open the drop-down. If you can post an image of that then that will help. It might show the InitializeComponent method being called multiple times.


  2. WayneAKing 4,931 Reputation points
    2021-06-14T00:12:25.513+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.