-
Notifications
You must be signed in to change notification settings - Fork 85
Fix gray background tiles in the Minimap #4815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
This resolves the issue with the Minimap showing a gray tile and never updating after this until the Worldmap is opened too
There was a problem hiding this 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()
andcreateSTexture()
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.
…he conditional logic a little more
…life_viewer into bugfix/graytiles
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