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

IE and "out of memory"

3 Answers 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carlin
Top achievements
Rank 2
Carlin asked on 30 Jun 2010, 08:41 PM
We have a page which is getting the results of a file system folder/file scan that will occasionally throw an ":out of memory" pop-up to the user (and the list of folders which is within a RadListBox, will actually flow over the box boundaries and down off the bottom of the page); close the browser, re-launch and log in and hit the same page again and it will work just fine.

Below is the sub that scans the file system & loads the list - it seems to all work ok every time - it is the rendering that seems to be taking the hit.

My dev team is not able to identify any specific causes for this - was wondering if anyone has seen this or has any suggestions for debugging or correction.  

    Private Sub LoadItems(Optional ByVal bolClearText As Boolean = True)  
        If bolClearText Then  
            lblFinished.Text = "" 
        End If  
        If txtIngestServerPath.Text.Trim = "" Then Exit Sub  
        Dim dir As IO.DirectoryInfo  
        Try  
            dir = New IO.DirectoryInfo(txtIngestServerPath.Text.Trim)  
        Catch  
            lstTemplateFiles.Items.Clear()  
            lstRadTemplateFiles.Items.Clear()  
            Dim intLanguageCode As Integer = SystemLanguages.SystemLanguages.GetInstance().LanguageCodeForID(userinfo.DefaultLanguage)  
            lblFinished.Text = Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("Invalidfolderpath", intLanguageCode)  
            Exit Sub  
        End Try  
        lstTemplateFiles.Items.Clear()  
        lstRadTemplateFiles.Items.Clear()  
        If dir.Exists Then  
            If Not dir.Parent Is Nothing Then  
                Dim item As New RadListBoxItem  
                item.Text = "..." 
                item.Value = "" 
                item.Attributes("itemtype") = "0"  
                item.ImageUrl = Resources.ImagePaths.ParentDirectoryIcon  
                lstRadTemplateFiles.Items.Add(item)  
            End If  
            'If Recurse.Checked() Then  
            'ParseDirectory(dir)  
            'Else  
            Dim folders As System.IO.DirectoryInfo = New System.IO.DirectoryInfo(txtIngestServerPath.Text.Trim)  
            For Each Folder As System.IO.DirectoryInfo In folders.GetDirectories  
                Dim item As New RadListBoxItem  
                'item.Text = Folder.FullName.Replace(txtIngestServerPath.Text.Trim, "")  
                item.Text = Folder.Name  
                item.Value = Folder.FullName  
                item.ImageUrl = Resources.ImagePaths.FolderIcon  
                item.Attributes("itemtype") = "1"  
                lstRadTemplateFiles.Items.Add(item)  
            Next  
 
            Dim files As IO.FileInfo() = dir.GetFiles("*.sca")  
            Dim fileName As IO.FileInfo  
            For Each fileName In files  
                'Dim li As New ListItem  
                'li.Text = fileName.FullName.Replace(txtIngestServerPath.Text.Trim, "")  
                'li.Value = fileName.FullName  
                'lstTemplateFiles.Items.Add(li)  
                Dim item As New RadListBoxItem  
                'item.Text = fileName.FullName.Replace(txtIngestServerPath.Text.Trim, "")  
                item.Text = fileName.Name  
                item.Value = fileName.FullName  
                item.ImageUrl = Resources.ImagePaths.TemplateIcon  
                item.Attributes("itemtype") = "2"  
                lstRadTemplateFiles.Items.Add(item)  
            Next  
            'End If  
            objContentPage.AjaxManager.ResponseScripts.Add("ScrollToTop();")  
        Else  
            Dim intLanguageCode As Integer = SystemLanguages.SystemLanguages.GetInstance().LanguageCodeForID(userinfo.DefaultLanguage)  
            lblFinished.Text = Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("Notemplatefilesexistsinselectedfolder", intLanguageCode)  
        End If  
    End Sub 

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 05 Jul 2010, 09:03 AM
Hello Carlin,

Thank you for the detailed description of the problem.

How many items do you add to the RadListBox when the problem occurs?

If you're loading lots of items you might consider using RadTreeView with load-on-demand as an alternative.

I hope this helps.

All the best,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Carlin
Top achievements
Rank 2
answered on 05 Jul 2010, 12:26 PM
Anywhere from 5 to 30; if we close the browser & start a new session, it will work that 2nd time 99 % of the time.    I believe we had considered a tree view, but from what I can recall, there was something that was more difficult or something that we needed to do that could not easily be done. 

0
T. Tsonev
Telerik team
answered on 08 Jul 2010, 09:30 AM
Hello Carlin,

The number of items is very low and shouldn't be a problem. An out of memory error is very rare and the cause is still unclear at this point.

Let's try working this out step by step. Start with running the browser from the "Internet Explorer (No Add-ons)" shortcut.

The next thing we should try is to remove everything else from the page. If that helps, start adding it back in small steps.

You might also want to run the page through an XHTML validator to check for malformed tags and such. You can use the online service at W3C or this excellent Firefox plugin.

I hope this helps.

Kind regards,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Carlin
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Carlin
Top achievements
Rank 2
Share this question
or