Skip to content

Fix stale ViewerAsset capability URL in LLViewerAssetStorage on region teleports - #6169

Open
Shadowolf7 wants to merge 1 commit into
secondlife:mainfrom
Shadowolf7:ll-fix/viewer-asset-storage-stale-url
Open

Shadowolf7 wants to merge 1 commit into
secondlife:mainfrom
Shadowolf7:ll-fix/viewer-asset-storage-stale-url

Conversation

@Shadowolf7

Copy link
Copy Markdown
Contributor

Summary

  • In LLViewerAssetStorage, mViewerAssetUrl was cached as a member variable with an if (mViewerAssetUrl.empty()) check.
  • When an agent teleports between simulator regions, mViewerAssetUrl remained populated with the previous region's capability URL and was not updated to the new region's ViewerAsset capability.
  • Consequently, initial GLTF material downloads (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 with 403 Forbidden / missing asset errors.
  • This patch removes the stale mViewerAssetUrl member and dynamically queries gAgent.getRegion()->getViewerAssetUrl() for every request in assetRequestCoro, matching the behavior of LLMeshRepository and LLTextureFetch.

@github-actions github-actions Bot added the c/cpp label Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@akleshchev

akleshchev commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@Shadowolf7 Please, check contribution guidelines above ^^.

@Shadowolf7

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mViewerAssetUrl member from LLViewerAssetStorage.
  • Updated assetRequestCoro to fetch the current region’s ViewerAsset capability 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.

Comment on lines +535 to 539
std::string viewerAssetUrl;
if (gAgent.getRegion())
{
mViewerAssetUrl = gAgent.getRegion()->getViewerAssetUrl();
viewerAssetUrl = gAgent.getRegion()->getViewerAssetUrl();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is fair. This does a capabilitiesReceived() check, but then waits on uspendUntilEventOnWithTimeout, so agent's region might have changed during the wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants