Bug: Treelist crashes w3wp.exe

4 posts, 0 answers
  1. Ed Lance
    Ed Lance avatar
    61 posts
    Member since:
    Jun 2012

    Posted 07 Nov 2011 Link to this post

    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
  2. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 10 Nov 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ed Lance
    Ed Lance avatar
    61 posts
    Member since:
    Jun 2012

    Posted 10 Nov 2011 Link to this post

    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.
  5. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 15 Nov 2011 Link to this post

    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
Back to Top