Scene.dispose() hangs


just found one case when Scene.dispose() enters infinite loop, have to kill either script of browser - when scene contains a transform node that contains an instance!

Here’s what happens then in Scene.dispose():

    while (this.transformNodes.length) {

That node becomes disposed, but is not removed from the transformNodes array, and this loop never ends.

I actually dispose() source to implement workaround:

  var i = 0;
  while (i < scene.transformNodes.length) {
    console.log("Disposing transformNode "+i+"/"+scene.transformNodes.length);
    if ( scene.transformNodes[i].isDisposed() ) {

To see the output, go to, choose avatar, choose the portal, look at javascript console.
The source is here: vrspace/avatar-selection.js at master · jalmasi/vrspace · GitHub

Hey can you repro in the PG? for some reasons I cannot repro this issue

Will try, may take some time though.

1 Like

Can’t repro that either. Been quite a while now, I suppose many things are different now.
Either way I did in PG exactly what I was doing locally, and everything seems fine.

Good news I guess :wink:

PG link -