decentraland / decentraland/unity-explorer
[QA] Explorer | Avatars disappear after teleporting to a World and back to Genesis Plaza
- Dominant language
- C#
- Stars
- 23
- Forks
- 17
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 101
Description
### 🛠️ **Build version:**
v0.155.0-alpha-main (also seen on v0.154.0)
### 📔 **Issue Description:**
After teleporting from Genesis Plaza to any World and returning, other users' avatars disappear. The missing avatars are specifically those located in a certain area (around the pit), while avatars in other areas (e.g. near the clock tower) may still be visible. Users still appear on the minimap as red dots, and their chat messages are visible, but their avatars are not rendered and cannot be hovered over — as if they don't exist at all for the client.
This is distinct from:
- #9074 / PR #9301 (AB renderer visibility — already fixed and merged)
- #9110 (avatars disappearing after in-session account switch)
- #8827 (ghost GP avatars appearing in Worlds — the inverse problem)
### 👣 **STR:**
1. Launch the Explorer and log in
2. Spawn in Genesis Plaza and note the users visible around the pit area
3. Teleport to any World (e.g. `/goto vitsky.dcl.eth` or `/goto vitsky`)
4. Teleport back to Genesis Plaza
5. Observe that avatars around the pit area are no longer visible
### ✔️ **Expected Result:**
All avatars present in Genesis Plaza should be visible after returning from a World, same as before the teleport.
### ❌ **Actual Result with evidence:**
Avatars around the pit area in Genesis Plaza disappear after returning from a World. Users are still present on the minimap (red dots) and in chat, but their 3D avatars are not rendered and are not interactable (no hover).
Key observations from the QA thread:
- The bug is 100% reproducible for some users (Dawid, Dafne) but not others (Ani, Alejandro) — suggesting a timing/race condition
- Only avatars in a specific area (around the pit) disappear, not all avatars
- Clearing the cache does not resolve the issue
- Both v0.154.0 and v0.155.0 affected
- Windows confirmed; Mac status unknown for this specific repro
### 🔍 **Investigation Notes:**
**Possible root causes to investigate:**
1. **LiveKit/comms reconnection after realm change:** The logs show LiveKit is stopped and restarted during teleport (`LiveKitStopping` → `RealmChanging` → `LivekitRestarting`). There may be a race condition where the LiveKit room doesn't fully re-subscribe to all participants after returning from a World realm change. The fact that only _some_ avatars disappear (pit area vs clock tower) could indicate scene-scoped comms filtering not resetting properly.
2. **Scene-scoped avatar filtering:** The pit area and clock tower area are in different scenes/parcels within Genesis Plaza. The `comms-gatekeeper` scene adapter scopes comms per scene — after a realm change, if the scene-scoped avatar list isn't properly refreshed for all loaded scenes, avatars in certain scene parcels might not re-register.
3. **`ObjectDisposedException` in `LiveKitMovementMessageBus`:** Both Dawid's and Dafne's shutdown logs show `ObjectDisposedException: The CancellationTokenSource has been disposed` in `LiveKitMovementMessageBus.Dispose()`. While this occurs at shutdown, it hints at lifecycle issues with the multiplayer movement system that could also manifest during realm changes.
4. **`max_visible_peers` feature flag:** This feature flag is enabled and could interact with the re-population of avatars after a realm change, potentially capping which avatars get re-rendered based on stale priority/distance data.
**Relevant code paths:**
- `RealmController.SetRealmAsync` (`RealmController.cs:190`)
- `ChangeRealmTeleportOperation.InternalExecuteAsync` (`ChangeRealmTeleportOperation.cs:21-22`)
- `LiveKitMovementMessageBus` lifecycle
- `MultiplayerPlugin` — `archipelagoIslandRoom` / `gateKeeperSceneRoom` disposal and re-creation
### ➗ **Reproduction:**
🔁 Always for some users, intermittent for others — likely a race condition
### 🖥️ **Operative system and additional Notes:**
- Windows 11 confirmed
- Tested on RTX 4070 Ti (i9-14900K) and RTX 3060 (Ryzen 5 5600G)
- Quality settings: High, Windowed
- Logs attached in the [Slack QA thread](https://decentralandteam.slack.com/archives/C05T5G3E9SN/p1751922376734179)
Requested by Virginia Balducci via Slack
Contributor guide
Research direction
Start with RealmController.cs (SetRealmAsync) and ChangeRealmTeleportOperation.cs, then trace LiveKitMovementMessageBus and MultiplayerPlugin room disposal and recreation during the reported teleport sequence. Reproduce the issue using the listed steps and inspect the attached QA logs if available. Done means avatars around the Genesis Plaza pit are rendered and hoverable after returning from a World, while remaining present in chat and on the minimap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100