This is a migrated thread and some comments may be shown as answers.

Bug: Treelist crashes w3wp.exe

3 Answers 89 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Ed Lance
Top achievements
Rank 1
Ed Lance asked on 08 Nov 2011, 02:55 AM
I have a pag with the TreeList on it.  I added the following code to the code behind:
Protected Sub RadTreeList1_DataBound(sender As Object, e As System.EventArgs) Handles RadTreeList1.DataBound
    RadTreeList1.ExpandAllItems()
 
End Sub

And when I ran the page from VS 2010, I got an error message:

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2

Faulting module name: nlssorting.dll, version: 4.0.30319.239, time stamp: 0x4e182039

Exception code: 0xc00000fd

Fault offset: 0x0000000000001e4e

Faulting process id: 0x1900

Faulting application start time: 0x01cc9db854916354

Faulting application path: c:\windows\system32\inetsrv\w3wp.exe

Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll

Report Id: 93fd70b4-09ab-11e1-8d6d-1cc1de54a95b


Took the code back out and the error went away.  Put the code back in, error msg.
I realize that the Databound event might not be the right place for that code but it should never crash w3wp.exe

3 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 10 Nov 2011, 09:30 AM
Hi Ed,

Please try using the following code snippet and let me know if the issue still persists:
protected void Page_Load(object sender, EventArgs e)
  {
      if (!Page.IsPostBack)
      {
          RadTreeList1.ExpandAllItems();
      }
  }

Looking forward for your reply.

Greetings,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ed Lance
Top achievements
Rank 1
answered on 10 Nov 2011, 07:28 PM
That stops the crash from happening, thanks.

Still, this is a pretty serious bug.  The user should never be able to put code in a page that crashes w3wp.exe.
0
Radoslav
Telerik team
answered on 15 Nov 2011, 08:10 AM
Hello Ed,

The described behavior is not a bug, it is expected when you call ExpandAllItems() method on RadTreeList1_DataBound event. The ExpandAllItems explicitly calls DataBind() of the RadTreeList in order to populate its child items' data. So with calling ExpandAllItems on RadTreeList1_DataBound you make an infinite loop and this crashes the w3wp.exe.

All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeList
Asked by
Ed Lance
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Ed Lance
Top achievements
Rank 1
Share this question
or