Freeze on iOS Safari when removing meshes

yup I do but still not frozen

My iPhone is currently frozen and Iā€™m trying to see if I can break into the JS when it comes back.

1 Like

Could it be related to OS or Safari version used? My iPhone is running iOS 14.6.

I didnā€™t touch the device for more than an hour and it never came back. I guess I will have to try a different approach.

We have now tested this for almost 2 weeks actively, and there is no dead-lock:

freecamera.ts: line 243

    public attachControl(ignored?: any, noPreventDefault?: boolean): void {
        noPreventDefault = Tools.BackCompatCameraNoPreventDefault(arguments);
        //this.inputs.attachElement(noPreventDefault); // Comment out any input code
    }

in scene.ts: line 1482

        if (DomManagement.IsWindowObjectExist()) {
            //this.attachControl(); // Comment out any input code
        }

I am wondering if this could give any clues to go forward?

Instead of trying to reproduce, should one maybe look at the input code line by line and maybe even try to reimplement them? (this happens to be the way how we solved thisā€¦ it was not possible to reprocude consistently - I am afraid this is a tricky apple & webgl level bugā€¦)

On our side we have already reimplemented all touch-gestures and it seems to work fine. We use the above mentioned commenting and our own input-handling => this way we can even remove models arbitrarily and it does not get stuck.

1 Like

I have a repro and will investigate. It shouldnā€™t take too long to figure out what the issue is. Stay tuned.

2 Likes

You are the best @bghgary !!!

I no longer think this is input related. Moving the camera is just changing the timing such that this problem repros. Itā€™s getting stuck calling scene.removeMesh(m, true);

Wait, but itā€™s getting stuck in scene.removeMesh in this._inputManager._invalidateMesh(toRemove), so maybe it is input related. This is quite weird.

Ok, I figured it out. Fix will be in PR shortly.

2 Likes

Wow, impressive work :slight_smile: Very interesting to see what the fix is.

1 Like

PR: Use object map instead of array for meshUnderPointerId by bghgary Ā· Pull Request #10573 Ā· BabylonJS/Babylon.js Ā· GitHub

5 Likes

We tested this for about 4 hours and we can confirm the bug has not reproduced. :+1:

3 Likes