StackOverflow

10 posts, 1 answers
  1. Chris Kirkman
    Chris Kirkman avatar
    37 posts
    Member since:
    Jul 2012

    Posted 07 Jan 2011 Link to this post

    For some reason, I get a StackOverflow exception when the command bar is on my dialog and from the parent form I call

    dlg.ShowDialog(this);

    I've created a base dialog from which other's are derived.  All of them behave fine; however this one fails every single time .ShowDialog() is called.
  2. Chris Kirkman
    Chris Kirkman avatar
    37 posts
    Member since:
    Jul 2012

    Posted 07 Jan 2011 Link to this post

    I should add that I've added event handlers within the dialog itself for the form and the command bar.

    It reaches radCommandBar1_Initialized() and then any other form event handler that I've added never occurs.  I believe that this unhandled exception is occuring somewhere within the drawing or displaying of the command bar.  If I remove the command bar from the UI, it works just fine.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 07 Jan 2011 Link to this post

    Hi Chris,

    I haven't been able to replicate your issue, but I suspect it has something to do with the event handlers that you have added. Please could you post a small sample to replicate this?
    Thanks
    Richard
  5. Chris Kirkman
    Chris Kirkman avatar
    37 posts
    Member since:
    Jul 2012

    Posted 07 Jan 2011 Link to this post

    It really didn't have anything to do with the events.  I had added them AFTER we started having the problem, trying to narrow down what could be failing.

    It turns out that it is probably related to a COM component that is referenced in the constructor of this particular derived form.  Still, it only happens with the command bar.  If we use the old toolstip, no problem.
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 07 Jan 2011 Link to this post

    Hi Chris,

    I'm glad you have this sorted, but if there is any thing I can do to help, then please let me know.
    thanks
    Richard
  7. Ed
    Ed avatar
    8 posts
    Member since:
    Apr 2010

    Posted 10 Jan 2011 Link to this post

    Richard,
    I work with Chris and I have been playing with the CommandBar and our COM component.  The error occurs if I create an instance of the COM component and then access the CommandBar.

    private void m_btnTest_Click(object sender, EventArgs e)
    {
        WaterTankCOM.WaterTankData wt = null;
        try
        {
            wt = new WaterTankCOM.WaterTankData();
        }
        catch(System.Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
        finally
        {
            Marshal.FinalReleaseComObject(wt);
            wt = null
        }

    After executing the above code, I simply click on the CommandBar option to Add / Remove the buttons.  I get the stack overflow as soon as I uncheck one of the buttons on the command bar.

    I have a small sample that I can send you - what is the best way to send it?

    Thanks,
    Ed
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Jan 2011 Link to this post

    Hi Ed,

    It's not possible to post zip files here (only in support tickets to Telerik) which may be best to do on this occaision. But if you can post the code here as you have done with the example above, then I'd be happy to take a look, but this is the first time I've heard of an error with any 3rd party component and Telerik controls. Could you also post the stack trace of your Stack Overflow Exception?
    Thanks
    Richard
  9. Ed
    Ed avatar
    8 posts
    Member since:
    Apr 2010

    Posted 10 Jan 2011 Link to this post

    Hi Richard,

    Thanks for the reply.  I cannot send you the call stack (when the exception is received) because it is not available. 
    The attachments below show the place where the exception is being raised to - it is not caught in my try / catch.  The debugger exception information doesn't show any stack trace information.

    At this time, I will submit a ticket to Telerik.  Hopefully this will be easily resolved!

    Thanks,
    Ed
  10. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Jan 2011 Link to this post

    Ok. Apologies I couldn't help to solve your issue.
    Richard
  11. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 12 Jan 2011 Link to this post

    Hello Ed,

    Please find the answer to your question in the support ticket that you have opened.

    Best wishes,
    Ivan Todorov
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top
UI for WinForms is Visual Studio 2017 Ready