Hello! During the execution the program stumble in a StackOverflow Exception.
What is and how can I solve?
Printable View
Hello! During the execution the program stumble in a StackOverflow Exception.
What is and how can I solve?
Try putting some debugger messages into your code to see where things are going wrong
Actually the exception revealed in some code generated by Windows form project, at the execution of this instruction:
# Region
Public Sub New()
MyBase.New() <-- !!
Umm I doubt this.
A StackOverflow Exception means that you have created an infinate loop somewhere.
Faulty or unterminated recursive algorithms are generally the main culprit for this error.
Are you inheriting from a custom class?Quote:
Originally Posted by Akix
Only System.Windows.Forms.Form in both the forms
And you haven't edited the stock Form constructor or anything?
Nope.
Can you show us the whole of your New subroutine?
Imports System.Net
Imports System.Security.Cryptography.X509Certificates
Imports System.StackOverflowException
Module Variabili
Public percorso_loc As String = ""
Public Class Form1
Inherits System.Windows.Forms.Form
Public F1 As New Form1
Public Sub Main()
Application.Run(F1)
End Sub
#Region
Public Sub New()
MyBase.New() <-- the exception is here!
[...]
#end region
Public Class MyPolicy[...]
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click[...]
Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Dim f2 As New Form2
Application.Run(f2)
end sub
End Class
End Module
Can we see the bit after
#Region
Public Sub New()
MyBase.New() <-- the exception is here!
[...]
I am not convinced that the exception is in MyBase.New :)
Hi,
Use a Tyr.... Catch block and get a full error message