none
Stack Overflow occured in System.Data.dll

    Question

  • Greetings,

    I have a Simple  SQL Compact  application (VB .net 3.5, on VS 2008) . When i try to start an debug instance of the project it immediately gets this error:

    An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.dll

    No calls/functions/methods or anything are made to the database until a user clicks a button.  In fact putting a breakpoint on the Form_Load event, doesnt help, the error comes the form is initialized.  Compiling the project and moving it to a different pc doesnt work either.  Googling the problem turned up nothing.  Again, the database isnt even used until the user clicks a single button to save 1 number. Its a very simple app.

    I have rebooted, several times. What would cause this exception? None of my code is even executed. This program worked fine until today.

    NO stack information is available:

    {Cannot evaluate expression because the current thread is in a stack overflow state.}

    Please help!
    Thursday, June 19, 2008 5:09 PM

Answers

  • Thanks for your post!

    Again, in the call stack, all i see, is the error message that says "No stack information available" . The stack is in an overflow state.

    However, for the good of the forum, after stepping through, and going to the designer code, (allthough the sequence of code execution aludes me)  I was able to determine that a DataTableAdapater in my DataSet Object was at fault. In the designer code for the DataSet, a fill command was executed, however, somehow, the command Text for the Fill command was blank.

    Thi may not fix it all the time, but it fixed my error 20 minutes before a demo of the product. The actual cause of the problem is still a mystery, as you can not manually delete the fill method of a table adpater with out getting a ton of error dialogs, so this would have been something I noticed.

    I can not recreate this error, as it gives you different error messages, and the flow of the program executes correctly, and fails when it is supposed to, when i try to fill a grid on the form.

    TY
    Friday, June 20, 2008 12:28 PM

All replies

  • After trying to step though...
    (sequense of step)

    Public Class Form1
        ' Globals
      step1  Public bool_paused As Boolean = False
      step 2  Public bool_error As Boolean = False
      step 3 Public bool_copy As Boolean = False
      last step  Public strCurActivity As String = "Ready"
        Public strCurError As String = "No Errors"
        Public strCurrentUser As String

    step 4 is below:

    the following block seems to be failing:

    NOTE: this is from the dataset designer vb (dslocal.designer.vb) this is not code that was written by hand, but by Visual studio.


     
    Code Snippet

       <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
         Global.System.ComponentModel.BrowsableAttribute(true),  _
         Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)>  _
        Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
            Get
                Return Me._schemaSerializationMode
            End Get
            Set
                Me._schemaSerializationMode = value  <-- dies here (??????)
            End Set
        End Property


    Thursday, June 19, 2008 5:23 PM
  • To see the stack, use the VS Call Stack window. Run the program under VS debugging (F5) and when it fails, open the Call Stack window from windows menu: Debug => Windows => Call Stack (or by key sequence CTRL-D, C)

     

    Once you have it, post the stack here.

     

    Friday, June 20, 2008 2:25 AM
    Moderator
  • Thanks for your post!

    Again, in the call stack, all i see, is the error message that says "No stack information available" . The stack is in an overflow state.

    However, for the good of the forum, after stepping through, and going to the designer code, (allthough the sequence of code execution aludes me)  I was able to determine that a DataTableAdapater in my DataSet Object was at fault. In the designer code for the DataSet, a fill command was executed, however, somehow, the command Text for the Fill command was blank.

    Thi may not fix it all the time, but it fixed my error 20 minutes before a demo of the product. The actual cause of the problem is still a mystery, as you can not manually delete the fill method of a table adpater with out getting a ton of error dialogs, so this would have been something I noticed.

    I can not recreate this error, as it gives you different error messages, and the flow of the program executes correctly, and fails when it is supposed to, when i try to fill a grid on the form.

    TY
    Friday, June 20, 2008 12:28 PM