Fix stale ViewerAsset capability URL in LLViewerAssetStorage on region teleports - #6169
Shadowolf7 wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
@Shadowolf7 Please, check contribution guidelines above ^^. |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Pull request overview
This PR fixes asset download failures after region teleports by ensuring LLViewerAssetStorage does not reuse a stale ViewerAsset capability URL from a previous simulator region.
Changes:
- Removed the cached
mViewerAssetUrlmember fromLLViewerAssetStorage. - Updated
assetRequestCoroto fetch the current region’sViewerAssetcapability URL for each request instead of reusing a cached value.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| indra/newview/llviewerassetstorage.h | Removes the cached mViewerAssetUrl member to prevent stale capability reuse. |
| indra/newview/llviewerassetstorage.cpp | Stops populating the removed member and dynamically queries getViewerAssetUrl() when building request URLs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| std::string viewerAssetUrl; | ||
| if (gAgent.getRegion()) | ||
| { | ||
| mViewerAssetUrl = gAgent.getRegion()->getViewerAssetUrl(); | ||
| viewerAssetUrl = gAgent.getRegion()->getViewerAssetUrl(); | ||
| } |
There was a problem hiding this comment.
That is fair. This does a capabilitiesReceived() check, but then waits on uspendUntilEventOnWithTimeout, so agent's region might have changed during the wait.
Summary
LLViewerAssetStorage,mViewerAssetUrlwas cached as a member variable with anif (mViewerAssetUrl.empty())check.mViewerAssetUrlremained populated with the previous region's capability URL and was not updated to the new region'sViewerAssetcapability.AT_MATERIAL) and generic asset requests in the new region were sent using the old region's capability URL or direct unauthenticated CDN endpoints, failing with403 Forbidden/ missing asset errors.mViewerAssetUrlmember and dynamically queriesgAgent.getRegion()->getViewerAssetUrl()for every request inassetRequestCoro, matching the behavior ofLLMeshRepositoryandLLTextureFetch.