Results 1 to 4 of 4

Thread: Exception of type System.Stack

  1. #1

    Thread Starter
    Registered User LoNeR's Avatar
    Join Date
    Jun 2004
    Location
    Heliom Prime
    Posts
    20

    Exception of type System.Stack

    it gives me an error every time i close my app's.

    im very new in this thing..pls. help me..
    Attached Images Attached Images  

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You should post some code that you suspect it errors out(in closing or under that button event handler) . First , if you didn't use any try-catch block , then you should try so you can get more descriptive error messages .

  3. #3

    Thread Starter
    Registered User LoNeR's Avatar
    Join Date
    Jun 2004
    Location
    Heliom Prime
    Posts
    20
    thanks pirate for the reply.
    ok i got it.

    why it gives me an error?
    VB Code:
    1. Private Sub DepartmentEntry_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    2.         cn.Close()
    3.         me.close()-----> this gives me an error.
    4. error:[i]Exception of type System.StackOverflowException was thrown [/i]
    5.     End Sub

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Because Me.Close() fires the Closing event, which in turn calls Me.Close(), which fires the Closing event, and so on.

    And there's the perfect example of a stack overflow.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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