System.StackOverflowException in KryptonWorkspace

Topics related to the Krypton Ribbon.

Moderators: Phil Wright, Chris Porter

System.StackOverflowException in KryptonWorkspace

Postby decoder » Thu Aug 25, 2011 10:54 pm

We got an ugly problem that happens when we dock some specific Windows Forms controls (Microsoft Chart and ReportViewer) into a KryptonPage from Workspace.

Please respond ASAP to this with a hint or help since this looks like a show-stopper for us.

We are loading the workspace from disk when the application is started and this happens only with the specified controls provided by Microsoft.
We are running on Win7 64 bit

For example the application stops with System.StackOverflowException in WindowsForms when adding a ReportViewer.
Since we got the sources also the debugger stops into KryptonWorkspace.cs at Line 3340

Code: Select all
                        // Note that this control is still needed
                        controls.Add(control);

                        // Only position visible children
                        if (info[i].WorkspaceVisible)
                        {
                            // Position the child control
>>>> Here <<<<<                     control.SetBounds(info[i].DisplayRect.X,
                                              info[i].DisplayRect.Y,
                                              info[i].DisplayRect.Width,
                                              info[i].DisplayRect.Height);
                        }


Here is the stack trace:
Code: Select all

>ComponentFactory.Krypton.Workspace.dll!ComponentFactory.Krypton.Workspace.KryptonWorkspace.LayoutSequenceNonMaximized(ComponentFactory.Krypton.Workspace.KryptonWorkspaceSequence seq = {ComponentFactory.Krypton.Workspace.KryptonWorkspaceSequence}, System.Drawing.Rectangle client = {X = 0x00000000 Y = 0x00000000 Width = 0x000005bd Height = 0x0000042e}, ComponentFactory.Krypton.Workspace.KryptonWorkspace.ControlList controls = Count = Cannot evaluate expression because the current thread is in a stack overflow state., ComponentFactory.Krypton.Workspace.KryptonWorkspace.SeparatorList separators = Count = Cannot evaluate expression because the current thread is in a stack overflow state., ComponentFactory.Krypton.Toolkit.ViewLayoutContext layoutContext = {ComponentFactory.Krypton.Toolkit.ViewLayoutContext}) Line 3340 + 0xc2 bytes   C#
    ComponentFactory.Krypton.Workspace.dll!ComponentFactory.Krypton.Workspace.KryptonWorkspace.LayoutSequenceNonMaximized(ComponentFactory.Krypton.Workspace.KryptonWorkspaceSequence seq = {ComponentFactory.Krypton.Workspace.KryptonWorkspaceSequence}, System.Drawing.Rectangle client = {X = 0x00000000 Y = 0x00000000 Width = 0x000005bd Height = 0x0000042e}, ComponentFactory.Krypton.Workspace.KryptonWorkspace.ControlList controls = Count = Cannot evaluate expression because the current thread is in a stack overflow state., ComponentFactory.Krypton.Workspace.KryptonWorkspace.SeparatorList separators = Count = Cannot evaluate expression because the current thread is in a stack overflow state., ComponentFactory.Krypton.Toolkit.ViewLayoutContext layoutContext = {ComponentFactory.Krypton.Toolkit.ViewLayoutContext}) Line 3353 + 0x91 bytes   C#
    ComponentFactory.Krypton.Workspace.dll!ComponentFactory.Krypton.Workspace.KryptonWorkspace.OnLayout(System.Windows.Forms.LayoutEventArgs levent = {System.Windows.Forms.LayoutEventArgs}) Line 2552 + 0x5c bytes   C#
    System.Windows.Forms.dll!System.Windows.Forms.Control.PerformLayout(System.Windows.Forms.LayoutEventArgs args) + 0xbd bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(System.Windows.Forms.Layout.IArrangedElement affectedElement, string affectedProperty) + 0x2e bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.OnResize(System.EventArgs e = {System.EventArgs}) + 0x55 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.OnSizeChanged(System.EventArgs e = {System.EventArgs}) + 0x27 bytes   
    System.Windows.Forms.dll!System.Windows.Forms.Control.UpdateBounds(int x, int y, int width, int height, int clientWidth, int clientHeight) + 0xa3 bytes   



The exception happens on:
reportViewer1.RefreshReport();
decoder
 
Posts: 11
Joined: Wed May 04, 2011 5:23 pm

Re: System.StackOverflowException in KryptonWorkspace

Postby decoder » Thu Aug 25, 2011 11:10 pm

When adding the Microsfot Chart we get the StackOverflo inside the main form
Code: Select all
   XXXX.XXX.Products.dll!XXXX.XXX.Products.Product.Run() Line 216 + 0x8 bytes   C#
    XXXX.XXX.XXXXX.exe!XXXX.XXX.XXXXXX.Program.Main() Line 39 + 0x9 bytes   C#     
    [Native to Managed Transition]   
    [Managed to Native Transition]   
    mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) + 0x6d bytes   
    Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() + 0x2a bytes   
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x63 bytes   
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0xb0 bytes   
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes   
    mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x44 bytes   
    [Native to Managed Transition]   


We are using the Ribbon on the main form and a dockable workspace.
FormIntegration is False.
decoder
 
Posts: 11
Joined: Wed May 04, 2011 5:23 pm


Return to Krypton Ribbon

Who is online

Users browsing this forum: No registered users and 1 guest

cron