Extremely long freeze on iOS ( bare playground example )

( i’m sorry I accidentally clicked delete on this thread checking in AM and there is no confirm D: )

Hello, I have been loosing my marbles trying to track this down in my app. It will freeze up to one minute or more at times. I am fairly certain this has to do with touches on the screen, perhaps more specifically touches on elements overlaying the canvas. The browser tab is completely locked during this freeze and cannot be navigated away from or anything used except a new tab or close the browser.

This happens far more commonly in our app but once I started to realize what it was, I thought it should be possible to happen in a PG. See attached video:


(if you don’t want to wait for the thrilling conclusion, it snaps back to life at the very end)

This is on iPhone 12 Max Pro running 14.5

Also had verified on iPhone 11 and 10

It takes about 10 tries on average for me to cause it on empty PG

1 Like

Adding @Cedric

1 Like

Random programmer here:

If I was investigating this, I would fork the possible problem into two very separate buckets.
a) The processor is consumed with some loop
b) Input is blocked but the processor is idle

I have dealt with a whole tonne of mobile Safari touch problems but none of my experience seemed enlightening here. So this is my “booby prize” contribution. :wink:

I think it isn’t the one, considering it hard locks and cannot scroll or navigate away either. I would expect this situation to not block the main thread like happens.

Interesting. Are all your devices running 14.5? I have just checked on 14.4.3 and have no issue. You wouldn’t have a pending update? This can sometimes cause issues. Do you have the same problem with i.e. chrome?…

They were all 14.5 yes. To test, you need to make a new tab, load the page, move the camera around some and hit run. You might have to do this up to 15 times.

No pending updates

Do you have the same problem with i.e. chrome?…

Good question, yes I just tested and got it on the 5th try on iOS chrome

Could it be related to that one ? Scene freezes completely upon mouse button up (Desktop Safari only) TypeError

I have been thinking the same thing since that was posted.

We did have one tester on the highest end macbook who got the full freeze like he describes in that thread. It was the only tester who did though and happened so rarely/just to them that I am not sure it’s connected.

I tried rolling back in my app to see when the issue appears, made it to 5.0.0-alpha.1 with it still happening. I don’t know how to switch versions when PG is in mobile or else I would verify there as well.

No worries, it seems @PolygonalSun fixed it yesterday so it should be available in the next nightly :slight_smile:

Looking a little closer, that fix seemed specific to mouse input. I am not sure that would cause anything on a touchscreen ?

pointers might be redirected to it as they are not supported the same way on safari cause why would it be consitent on Safari :slight_smile: “Think different”

1 Like

Also suspicious it only happens maybe 10% of attempts and only on the run button (I think elements overlaying the canvas in general), not the canvas itself. We’ll see :pray:

Oh and goes back to 5.0.0-alpha.1

1 Like

I am experiencing the same thing on iPhone Safari. Very interested in trying the possible solution.

1 Like

On Firefox for iOS my freeze-problem does not occur.

1 Like

Yep can confirm, does not happen in iOS FF either Playground or my app.

I continued investigating this and in my scenario it is related to removing meshes or disposing meshes somehow. But the lock-up requires the 2 touch gesture to happen as well! :slight_smile: So, if I stop disposing meshes -or- stop touching using 2 touch gesture, the bug does not occur…

Also, when the bug locks iOS Safari, you cannot even refresh the page anymore. Also, nothing is shown in the Mac Safari’s mobile web inspector log. And when I wait for about 1-2 minutes the lock situation gets one frame rendered and then locks again…

Now I am running master b7648f02b1adbb8be348f98bfe1364561daad87f and cannot reproduce the bug anymore :open_mouth:

(I think this version includes the @PolygonalSun’s fix)

2 Likes

@sebavan @PolygonalSun This is fixed thanks so much.

Yep @JSa I was able to test that commit as well and it seems fixed :pray:

3 Likes