This is a migrated thread and some comments may be shown as answers.
StackOverflow
9 Answers 101 Views
This is a migrated thread and some comments may be shown as answers.
Chris Kirkman
Top achievements
Rank 1
Chris Kirkman asked on 07 Jan 2011, 03:56 PM
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.

9 Answers, 1 is accepted

Sort by
0
Chris Kirkman
Top achievements
Rank 1
answered on 07 Jan 2011, 04:04 PM
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.
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 07 Jan 2011, 04:06 PM
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
0
Chris Kirkman
Top achievements
Rank 1
answered on 07 Jan 2011, 04:50 PM
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.
0
Richard Slade
Top achievements
Rank 2
answered on 07 Jan 2011, 04:53 PM
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
0
Ed
Top achievements
Rank 1
answered on 10 Jan 2011, 04:04 PM
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
0
Richard Slade
Top achievements
Rank 2
answered on 10 Jan 2011, 04:12 PM
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
0
Ed
Top achievements
Rank 1
answered on 10 Jan 2011, 04:20 PM
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
0
Richard Slade
Top achievements
Rank 2
answered on 10 Jan 2011, 04:28 PM
Ok. Apologies I couldn't help to solve your issue.
Richard
0
Ivan Todorov
Telerik team
answered on 12 Jan 2011, 10:33 AM
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.
Asked by
Chris Kirkman
Top achievements
Rank 1
Answers by
Chris Kirkman
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Ed
Top achievements
Rank 1
Ivan Todorov
Telerik team
Share this question
or