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

RadSearchBox memory leak in IE8

8 Answers 120 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 30 Jan 2014, 04:23 PM
Hi,

We are using RadSearchBox on one of our ASP.NET WebForms application pages and have noticed browser memory leaks running in IE8 (using
sIEve to detect the memory leaks).

It appears that leaks occur when SearchContextItems are added to the RadSearchBox.

I have created a sample app that demonstrates the leaks. The sample app is built in VS2012 .NET 4.0 using Telerik RadControls for Ajax Q3 2013 v 2013.3.1114.40.

Attached is screenshot of sIEve results. Memory usage in red is when I reloaded the page (ie, click Go button). Memory usage in green is when I unloaded the page (ie, clicking about:blank).

It is likely that upgrading to a newer browser would correct the leaks, but unfortunately, we're mandated by corporate IT to use IE8 and have no choice for upgrading the browser (Chrome and Firefox are not an option either).

Thanks in advance for any assistance you can provide.

Source Code:

default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="WebApplication4._default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>RadSearchBox Leak</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
        </Scripts>
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server" UpdatePanelsRenderMode="Inline"/>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
    <telerik:RadSearchBox ID="uxRadSearchBox" runat="server"  DropDownSettings-Width="80px" DropDownSettings-Height="50px" Width="360px" EnableAutoComplete="false">
        <SearchContext ShowDefaultItem="false">
        </SearchContext>
    </telerik:RadSearchBox>
    </form>
</body>
</html>

default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication4
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                Telerik.Web.UI.SearchContextItem item = null;
                string context = String.Empty;
                for (int i = 0; i < 3; i++)
                {
                    context = "Context" + i.ToString();
                    item = new Telerik.Web.UI.SearchContextItem(context, context);

                    // LEAK: Browser leak on the following line
                    this.uxRadSearchBox.SearchContext.Items.Add(item);
                }
            }
        }
    }
}

-ScottP

8 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 05 Feb 2014, 08:24 AM
Hello Scott,

I have tested the provided configuration with the latest version of our controls (2013.3.1324), but there seems to be no memory leaks at my end. Attached is a screenshot of the sIEve tool, showing the memory consumption. Could you specify the version of the controls that you are using?

Regards,
Dimitar Terziev
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Scott
Top achievements
Rank 1
answered on 05 Feb 2014, 02:43 PM
Hello Dimitar,

Thank you for looking into this.

My sample app was built using .NET 4.0 and Telerik version 2013.3.1114.40.

I have since downloaded the latest Telerik version 2013.3.1324.40 and rebuilt my sample app. I am still seeing memory leaks.

I have attached screenshots of my sIEve results.

RadSearchBoxLeakIE8-Telerik-2013.3.1324.40-sIEveResults-AutoRefresh.png was taken after clicking Auto-Refresh. The memory leaks occur after the page is refreshed.

RadSearchBoxLeakIE8-Telerik-2013.3.1324.40-sIEveResults-Go-AboutBlank.png was taken after click Go, then about:blank several times.

My sample app source code was unchanged (see original post for code). The leak appears to occur when adding items to search context list in Page_Load:

 this.uxRadSearchBox.SearchContext.Items.Add(item);

I can send you my sample project files if you can provide directions (forum will only let me post images).

Thank you,
Scott

0
Scott
Top achievements
Rank 1
answered on 05 Feb 2014, 02:46 PM
Dimitar,

Also note that this occurs in IE8. If you are using a later version (9/10/11), you may not see the leak as Microsoft improved memory leak issues in later browsers. Unfortunately, we do not have an option to upgrade browsers any time soon.

-Scott
0
Dimitar Terziev
Telerik team
answered on 11 Feb 2014, 08:56 AM
Hello Scott,

It seems quite odd that memory leaks appear even when testing with blank page. I have retested with the latest version 2013.3.1324.40 and there are no leaks shown at my side in the sIEve tool. I have extended the sample and added a button which updates the RadSearchBox control via Ajax request (which is a common scenario when memory leaks occur) and again no leaks appeared in the tool. Here is a video of my tests. Could you verify that there are no client-side logic in your sample, also could you specify the version of the sIEve tool that you are testing with?

Regards,
Dimitar Terziev
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Scott
Top achievements
Rank 1
answered on 11 Feb 2014, 02:17 PM
Hi Dimitar,

My sample app has only one page, default.aspx with code behind default.aspx.cs - contents of those 2 files are in my original post.

My version of sIEve is 0.0.8.

My version of IE is 8.0.7601.17514.

For me, the leak happens on this line in the code behind: this.uxRadSearchBox.SearchContext.Items.Add(item);

If I comment out that line, there is no more leak.

I can also see memory leak of 50-100k after each page refresh when viewing the IE process in Task Manager. Granted, this is not much, but our users will run this application all day and the search box is in several main pages of the application.

I'm not sure what else to provide unless I can send you all my project files.

-Scott
0
Scott
Top achievements
Rank 1
answered on 11 Feb 2014, 08:32 PM
Hi,
I've been able to simplify my example further with no code behind involved. Refreshing the page below results in memory leaks if there are SearchContextItems specified.

default2.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default2.aspx.cs" Inherits="WebApplication4._default2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>RadSearchBox Leak</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
</Scripts>
</asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" UpdatePanelsRenderMode="Inline"/>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" />
<telerik:RadSearchBox ID="uxRadSearchBox" runat="server" DropDownSettings-Width="80px" DropDownSettings-Height="50px" Width="360px" EnableAutoComplete="false">
<SearchContext ShowDefaultItem="false">
<Items>
<telerik:SearchContextItem Key="Key1" Text="Text1" />
<telerik:SearchContextItem Key="Key2" Text="Text2" />
<telerik:SearchContextItem Key="Key3" Text="Text3" />
</Items>
</SearchContext>
</telerik:RadSearchBox>
</form>
</body>
</html>

-Scott
0
Dimitar Terziev
Telerik team
answered on 16 Feb 2014, 05:50 PM
Hi Scott,

We will continue testing the provided sample since such memory issue is not presented on our side. Once I have more information on the matter I will post it in this forum thread.

Regards,
Dimitar Terziev
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Dimitar Terziev
Telerik team
answered on 19 Feb 2014, 12:23 PM
Hi Scott,

We have managed to reproduce the memory leak and we are working to resolve it. As a token of gratitude for reporting this problem your Telerik points are update.

Regards,
Dimitar Terziev
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Scott
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Scott
Top achievements
Rank 1
Share this question
or