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

Virtual scrolling causes Chrome to crash

1 Answer 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 05 Nov 2013, 08:44 PM
I've run into an odd issue with the latest version of Kendo UI for MVC (2013.2.918.340) where grids with virtual scrolling will intermittently crash Chrome if the data is re-requested.

Example jsfiddle below based on one of the Kendo demos:

http://jsfiddle.net/M6rKC/2/

Opening this page immediately locks up (and then crashes a few minutes later) Chrome 30.0.1599.101 for me.

The second call to grid._dataSource() is what kills it. This is not precisely what I'm doing in my real application -- instead I have a "Search" button that calls grid.dataSource.read(). You can see in my jsfiddle code that I have this as well, but for some reason this will only crash if the first set of data retrieved from the server (when the grid auto binds) is empty, but the second set (after clicking on Search) is not. Since the demo data URL is not empty I couldn't reproduce this exactly, but the second call to _dataSource() in the jsfiddle causes what appears to be the exact same bug.

I looked at the timeline in Chrome's dev tools and noticed the memory usage spikes from 10MB to 680MB when the XHR completes:

http://i.imgur.com/OU8h6uT.jpg

Shortly after that the memory usage drops again and Chrome becomes unresponsive.

Any ideas what might be causing this? I should mention that none of this happens if virtual scrolling is disabled -- the search button works fine in that case. Is this a known issue or am I doing something wrong?

Thanks!


1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 07 Nov 2013, 02:49 PM
Hi Nicholas,

 
After revving the provided example it seems that the issue is caused by incorrect change of the dataSource of the grid (to change the dataSource you should use the setDataSource method). Also after modifying the project to use the correct way of changing the dataSource I tried to reproduce the issue by setting the initial dataSource to receive empty data. Please check the results below:

  • If no data is returned unhandled exception is thrown - this behavior is expected and in that case is expected for the grid to stop working. Please check the example here
  • If empty object is returned from the server the grid works as expected. Please check the example here

In order to investigate further what is the exact reason for this behavior on your side we will need runable example that reproduced the issue - could you please provide it in current thread?
Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or