hubs icon indicating copy to clipboard operation
hubs copied to clipboard

Crash when going "back" using fast room switching

Open rawnsley opened this issue 3 years ago • 1 comments

When fast room switching is enabled and you transit to another room there is a period of several seconds before the next room loads. If you press the browser's back during this time there is an exception and the room effectively crashes out to show the "Refresh Page" dialog.

To reproduce the problem:

  1. Enable fast room switching
  2. Go to this room and enter
  3. Click on the "visit room" link
  4. Press back before the next room loads (when the background is black)

It's a little non-deterministic, so you might need to try it a few times with slightly different timings.

The main culprit seems to be overlapping invocations of the changeHub function. On my own Hubs Cloud I've implemented a temporary patch, but a real mutex would be more robust.

I'm happy to submit a PR, but I think a proper solution will require the addition of a mutex library and I wanted to canvas opinion before messing with dependencies.

rawnsley avatar Jul 04 '22 12:07 rawnsley

Fast room switching is still experimental and we will look into addressing this when we make it a default setting. thanks for the report

emclaren avatar Jul 12 '22 16:07 emclaren