Handler Stack Overflow?!?!?!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tomb

    Handler Stack Overflow?!?!?!

    Please help!

    I have a handler in a class that handles when a column in a table is
    modified, as such:

    dtWhatif = dsOp.Tables("wh atif")
    AddHandler dtWhatif.Column Changed, New
    DataColumnChang eEventHandler(A ddressOf Whatif_Changed)

    When testing this, I got an error: An unhandled exception of type
    'System.StackOv erflowException ' occurred in system.dll

    So I put a debug statement in to see why the stack is overflowing. This
    handler was called 4082 times! All I did was change the value in one
    cell of a datagrid!

    Why? Why?

    Tom


  • Slow Learner

    #2
    Re: Handler Stack Overflow?!?!?!

    What are you doing in the handler?




    "tomb" <tomb@technetce nter.com> wrote in message
    news:5pdWe.678$ 7u6.189@bignews 6.bellsouth.net ...
    Please help!

    I have a handler in a class that handles when a column in a table is
    modified, as such:

    dtWhatif = dsOp.Tables("wh atif")
    AddHandler dtWhatif.Column Changed, New
    DataColumnChang eEventHandler(A ddressOf Whatif_Changed)

    When testing this, I got an error: An unhandled exception of type
    'System.StackOv erflowException ' occurred in system.dll

    So I put a debug statement in to see why the stack is overflowing. This
    handler was called 4082 times! All I did was change the value in one cell
    of a datagrid!

    Why? Why?

    Tom


    Comment

    • Tom B

      #3
      Re: Handler Stack Overflow?!?!?!


      At the moment I'm not doing anything in the handler except calling an
      empty function. I just wanted to test the handler. Obviously it
      doesn't work as expected, which was to be called once.

      Tom


      *** Sent via Developersdex http://www.developersdex.com ***

      Comment

      • Jay B. Harlow [MVP - Outlook]

        #4
        Re: Handler Stack Overflow?!?!?!

        Tomb,
        Where is your AddHandler statement?

        It sounds like you are attempting to add a handler for every row in your
        DataTable or something similar.

        You only need to use AddHandler once, I normally use it when I create or
        "acquire" the DataTable.

        Can you post a complete but short (15 to 20 lines) of code that demonstrates
        the problem.

        Hope this helps
        Jay

        "tomb" <tomb@technetce nter.com> wrote in message
        news:5pdWe.678$ 7u6.189@bignews 6.bellsouth.net ...
        | Please help!
        |
        | I have a handler in a class that handles when a column in a table is
        | modified, as such:
        |
        | dtWhatif = dsOp.Tables("wh atif")
        | AddHandler dtWhatif.Column Changed, New
        | DataColumnChang eEventHandler(A ddressOf Whatif_Changed)
        |
        | When testing this, I got an error: An unhandled exception of type
        | 'System.StackOv erflowException ' occurred in system.dll
        |
        | So I put a debug statement in to see why the stack is overflowing. This
        | handler was called 4082 times! All I did was change the value in one
        | cell of a datagrid!
        |
        | Why? Why?
        |
        | Tom
        |
        |


        Comment

        Working...