Exceptions during room view changes cause infinite, unrecoverable, loops
See original GitHub issueSteps to reproduce
- Throw an error in a relatively sane place, such as an
undefinedevent that https://github.com/matrix-org/matrix-react-sdk/pull/6733 patched over. - Trigger the error
What happened?
What did you expect?
For the client to not spin out of control. We should have handling to ensure that rapid loops don’t happen, failing outright to an error page instead of reverting view_room dispatches. Ie: we should redirect to #/error or something to break loops.
What happened?
It spun out of control. The room view switch logic got caught in a predictable race with the space change handling: the user would navigate to an affected room which triggers the space change handling to try and navigate to the relevant space for that room, but before that space change dispatch could go off the room view errors and causes some code somewhere to revert the room view change. The reversion then gets caught by the space change handling again, so is now racing between two dispatches which have become out of phase with each other. Repeats infinitely.
Operating system
Windows 10
Application version
N/A - All platforms
How did you install the app?
No response
Homeserver
No response
Have you submitted a rageshake?
No
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)

Top Related StackOverflow Question
Because the issue mentions that it’s due to races that can happen with the spaces context switching mechanism - however it’s not super important
We think this is more a fundamental architecture issue than Spaces specific, so marking as such