[SOLVED] Getting System.StackOverflowException
-
Hello. I am getting this stack overflow exception. I have tried different things like: - making the current class Shared - or using a counter to see if the class already has an instance? But none of them is working for me. Here is what I am trying ( read comments as well )
Imports SomeLibrary
Public Class ABC
Private WithEvents instance As New ClassName ' a class in imported dll
Public Sub New() 'break point here. getting executed again and again
End Sub
End Class
So how can I get better of this exception? Thanks.
This world is going to explode due to international politics, SOON.
-
Hello. I am getting this stack overflow exception. I have tried different things like: - making the current class Shared - or using a counter to see if the class already has an instance? But none of them is working for me. Here is what I am trying ( read comments as well )
Imports SomeLibrary
Public Class ABC
Private WithEvents instance As New ClassName ' a class in imported dll
Public Sub New() 'break point here. getting executed again and again
End Sub
End Class
So how can I get better of this exception? Thanks.
This world is going to explode due to international politics, SOON.
You have a circular reference somewhere; does the class 'ClassName' from imported DLL have a reference to class 'ABC'?