View Full Version : [FIXED] [4.0.6] Ext.data.TreeStore.load - Async Concurrency Problem

22 Sep 2011, 10:08 AM
Ext version tested:
Ext 4.0.6

Browser versions tested against:
FF6.0.2 (firebug 1.8.1 installed)

DOCTYPE tested against:

If using Ext.data.TreeStore.load as documented against a remote DataSource in some situations (one particular documented below) the nodes get screwd up.

Steps to reproduce the problem:
see code and demo

The result that was expected:
stable behaviour ... no screwd up situation not matter which of the documented parameters are set (workaround situation: see demo)

The result that occurs instead:
see demo

Test Case:
see the attached demo app (as soon as I manage to upload my existing zip file :-)

Screenshot or Video:

See this URL for live test case: http://enpasos.com/extjsissue1/ (http://enpasos.com/extjsissue1/) (up until fixed or latest until end of Sept 2011)

Debugging already done:

Possible fix:
I suggest removing the following code from the load function in TreeStore:

// If there is not a node it means the user hasnt defined a rootnode yet. In this case lets just
// create one for them.
if (!node) {
node = me.setRootNode({
expanded: true
This would fix a race condition introduced inside the load function. In addition a stabilization against concurrent calls to the load method is needed - e.g. by an encapsulated locking like in AsyncTreeLoader in ExtJS3 or by defining a user contract that works (see workaround in demo and code).

Additional CSS used:

Operating System:

Please reopen the corresponding issue (http://www.sencha.com/forum/showthread.php?147689-4.0.6-TreePanel.initComponent-should-not-trigger-remote-load)

22 Sep 2011, 10:17 AM
here the code as in demo showing issue and workaround

21 Oct 2011, 10:19 AM
I have retested the bug in [4.0.7]: It is still there. See http://enpasos.com/extjsissue1/

I also can not find EXTJSIV-4124 in the release notes.

This is very strange to me. Could you please explain.

21 Oct 2011, 11:19 AM
the sources for my [4.0.7] testcase:


21 Oct 2011, 11:14 PM
Please reopen for [4.0.7].