Skip to content

Conversation

fmartian
Copy link
Contributor

@fmartian fmartian commented Oct 11, 2025

Description

This resolves the issue with the Minimap showing a gray tile and never updating after this until the Worldmap is opened too. It is based on Ansariel's suggestion in the report linked in #2531 but improved with a timer to avoid flooding the server with lots of requests since the Minimap is typically set to update several times per second. The logic to detect a valid texture is slightly reworked too.
During testing I found that in many places the background tile texture is seldom visible at all because it is covered with gray boxes from showing various objects unless zooming all the way in, where the background usually shows through in small areas. I could not find any option in the SL Viewer to disable that object drawing over the Minimap.

The actual problem was that after the initial request when initializing the surface, a pointer to an uninitialized texture was returned. Subsequent requests for the texture did properly check if the texture was valid and if not it called the createSTexture() method but inside that method, only the pointer itself was checked to be null, which it was of course not anymore.

While the request is http based and should not just fail, what likely happened is that the request timed out (probably because of heavy network traffic to update other things on sims with many avatars/objects) and returned a LLViewerTexture with uninitialized GLTexture inside. Because of the bad check in createSTexture() it never requested an updated texture. When opening the Worldmap, the texture was requested again and the reference to the LLViewerTexture in LLNetMap suddenly pointed to a valid texture too.

Related Issues

This resolves the issue with the Minimap showing a gray tile and never updating after this until the Worldmap is opened too
@github-actions github-actions bot added the c/cpp label Oct 11, 2025
Copy link

@Copilot Copilot AI left a comment

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 a bug where the Minimap displays gray background tiles that never update until the Worldmap is opened. The issue was caused by improper texture validation logic that failed to request new textures when the initial texture request returned an invalid texture.

Key changes:

  • Improved texture validation logic in getSTexture() and createSTexture() methods
  • Added timer-based throttling to prevent flooding the server with texture requests
  • Modernized code by replacing NULL pointers with nullptr throughout the codebase

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
indra/newview/llsurface.h Added timer member, cleaned up includes, modernized pointer initialization, changed visibility modifiers
indra/newview/llsurface.cpp Fixed texture validation logic, added request throttling, replaced NULL with nullptr throughout

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Netmap fails to fetch some map textures

4 participants