Open MinaXenou opened 8 years ago
This is an example of two nodes ( 3 and 4) that receive a childrenchanged event but are not placeholded nor initilized yet (you can see the placeholding and initialization events happening later for both nodes, I have also printed timestamps of the events)
@MinaXenou hmm, does this happen in the code that emits the events as well?
This is a race condition issue. The problem is that,many times, the "childrenChanged" Event is received even before the node placeholding event. This has as a result that the node related to the childrenChanged Event is not yet stored in the nodemap and an "Error : could not find node" is thrown. As I can see the most of the errors are related to that kind of race conditions. Maybe one possible fix could be to use here also a queue with events related to a node which are not executed before the node initializations. Once the node is initialized (Registered in the nodemap) the execution of all the related events is fired.