Ext.NET icon indicating copy to clipboard operation
Ext.NET copied to clipboard

Paging Toolbar crashes when creating and destroying Grids too fast.

Open fabriciomurta opened this issue 5 years ago • 0 comments

Found: 5.2.0 Ext.NET Forum thread: Strange error on component destroy

If repeatedly and quickly a grid panel, using a paging toolbar, is created+destroyed, a race condition may trigger where the paging toolbar tries to load its status when being destroyed.

This happens because, as the store's data is nullified during destruction, a "load" event is triggered in the Paging Toolbar, and it does not check whether the "load" stimulus was actually a null-data-load one.

Probably the best way to avoid this is, to make the paging toolbar load event not be triggered at all when the grid is being destroyed. That is, destroying the paging toolbar before the store is.

Alternatively by at least untying the events before the store is destroyed may allow the race condition not to trigger.

A quick workaround is just check whether the toolbar is destroyed or destroying at the time onLoad is called.

Sencha test case pending: the test case provided in forums is full of unrelated entities to the problem and it needs to be cleaned up before it can be made into a pure Ext JS test case. This issue may be Ext.NET specific as there is an Ext.toolbar.Paging.onLoad override.

fabriciomurta avatar Oct 29 '20 22:10 fabriciomurta