Results 1 to 3 of 3

Thread: System.StackOverflowException occured in Windows.Forms.dll

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2014
    Posts
    4

    System.StackOverflowException occured in Windows.Forms.dll

    Hello
    I am getting an exception that occurs when i close my tabbed webbrowser. I am doing a session restore feature that i got from another forum. Here is my code that has the exception
    Code:
    With TabControl1
                If Not .TabPages.Count = 0 Then
                    Dim sTemp As String = ""
                    For Each myTab As TabPage In .TabPages
                        If Not sTemp = "" Then sTemp &= vbNewLine & wb(myTab).Url.AbsoluteUri Else sTemp = wb(myTab).Url.AbsoluteUri
                    Next
                    File.WriteAllText(myCoolWebBrowserSessionFile, sTemp)
                    Me.Close()
                End If
            End With
    If anyone has some answers, i will mark this as resolved.

    vbdotnetfan

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: System.StackOverflowException occured in Windows.Forms.dll

    The stack overflow will tell you the trace of what is going on. It may be obvious once you see the full trace, and to note always post your exception details, the type of exception is not enough for us to give you a clear answer.

    Likely your close event does something that calls close, that calls close that calls close.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: System.StackOverflowException occured in Windows.Forms.dll

    Where is that code located? If it's executed when the form is closing then why is it calling Close?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width