The solution requires a fix to Ext.tree.View (we have attached a patch with this report). Bottom line, the initComponent method of Ext.tree.View registers listeners using the unmanaged on() call for both it's own store and the treepanel's store. It should instead using the addManagedListner version -- ie: mon().
What appears to be happening is that even AFTER the window containing the treepanel is closed, the 'beforefill' event handler is still registered. The second time the window is created, there are now two 'beforefill' event handlers, but the first registered handler refers to a view that is no longer valid. When the event fires, it try's to dereference a 'null' reference which causes the exception.
First -- I appreciate your taking the time to point out the DUPE to us. Much appreciated.
But I must say, this is quite frustrating. We've spent three days tracking down a bug Sencha knew about in October? Can anyone at Sencha explain why this was not patched already ?! Or at least a strong warning in the docs on Tree panels to make sure developers knew the issue existed ?!
Not to mention -- we posted to the forums yesterday reporting our problem and got back silence. We had to invest another day to find the source and post a patch -- and only then is the issue linked to a dupe !!
I downloaded the 220.127.116.118, did you find any issue moving from 4.1.3 to the latest?
I have not much time for validating the 4.2 with my app, end of this month the app has to be bug free and ready for heavy use...