473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

StackOverflowExceptionUnhandled

14
this.tableLayoutPanel1.ResumeLayout(false);

An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll occurred for the above line.. Please help me...
Dec 14 '11 #1
3 2860
adriancs
122 100+
for this problem, you need to post the whole code of the class.
Dec 14 '11 #2
StackOverflowException is thrown whenever your stack overflows, which usually happens due to recursive functions. This is almost always something like a property or method calling itself infinitely, etc, but there are other things that can cause the stack to overflow.

As adriancs has said, without seeing the code, it's not possible to diagnose properly.

What I'd look for is that you're not generating a massive loop somewhere that generates tables within tables within tables (from experience, this does it...)
Dec 16 '11 #3
bhagyap
14
namespace SplashScreen
{
public partial class SearchResults : DockContent
{

#region Initialize Component

public SearchResults()
{
InitializeComponent();
}

#endregion

#region Listview Items

private void listView1_DoubleClick(object sender, EventArgs e)
{
try
{
DummyDock dummyDoc = new DummyDock();
TreeView treeview = new TreeView();
FileStream fs = new FileStream(@"E:\zoomdocs\docs.xml", FileMode.Open, FileAccess.Read);
if (this.listView1.SelectedItems.Count != 1)
return;

string path = (string)this.listView1.SelectedItems[0].Tag;
dummyDoc.webBrowser1.Navigate(path);
dummyDoc.Show(DockPanel);
//string filename = treeview.treeView1.SelectedNode.Name.ToString();
dummyDoc.label1.Text = "Title of File:- " + listView1.SelectedItems[0].Tag;

DateTime filemod = File.GetLastAccessTime(fs.Name);
dummyDoc.label2.Text = "Date and Time of File Modified :- " + filemod.ToString();

dummyDoc.Text = (string)listView1.SelectedItems[0].Tag;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message,"Exception",MessageBoxB uttons.OK,MessageBoxIcon.Error);
}

#endregion

}

}
}

And the designer of this is as follows:-

namespace SplashScreen
{
partial class SearchResults
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// columnHeader1
//
this.columnHeader1.Text = "Folder";
//
// listView1
//
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader2,
this.columnHeader1,
this.columnHeader3});
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.Location = new System.Drawing.Point(3, 3);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(278, 256);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
// columnHeader2
//
this.columnHeader2.Text = "";
//
// columnHeader3
//
this.columnHeader3.Text = "Name";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Fo rms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.listView1 , 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms .SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms .SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(284, 262);
this.tableLayoutPanel1.TabIndex = 2;
//
// SearchResults
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.tableLayoutPanel1);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "SearchResults";
this.Text = "SearchResults";
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.ColumnHeader columnHeader1;
public System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
}
}namespace SplashScreen
{
partial class SearchResults
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// columnHeader1
//
this.columnHeader1.Text = "Folder";
//
// listView1
//
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader2,
this.columnHeader1,
this.columnHeader3});
this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listView1.Location = new System.Drawing.Point(3, 3);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(278, 256);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
// columnHeader2
//
this.columnHeader2.Text = "";
//
// columnHeader3
//
this.columnHeader3.Text = "Name";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Fo rms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.listView1 , 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms .SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms .SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(284, 262);
this.tableLayoutPanel1.TabIndex = 2;
//
// SearchResults
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.tableLayoutPanel1);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "SearchResults";
this.Text = "SearchResults";
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.ColumnHeader columnHeader1;
public System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
}
}
This is my code..Please help me..
Dec 21 '11 #4

Sign in to post your reply or Sign up for a free account.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.