Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

stencil mask overflow. #962

Closed
mb12 opened this issue Mar 7, 2015 · 22 comments
Closed

stencil mask overflow. #962

mb12 opened this issue Mar 7, 2015 · 22 comments
Labels
archived Archived because of inactivity bug Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS Node.js node-mapbox-gl-native rendering

Comments

@mb12
Copy link

mb12 commented Mar 7, 2015

I've seen this message in Xcode debugger spew sometimes. Not sure if this is a real issue or not.

"stencil mask overflow"

@ljbade ljbade added the macOS Mapbox Maps SDK for macOS label Mar 11, 2015
@mb12
Copy link
Author

mb12 commented Mar 13, 2015

Can you please retag it as iOS? I see this message at times in xcode debugger log when testing with on iPhone 4S running 7.x.

@incanus incanus added iOS Mapbox Maps SDK for iOS and removed macOS Mapbox Maps SDK for macOS labels Mar 14, 2015
@ljbade
Copy link
Contributor

ljbade commented Mar 17, 2015

@mb12 when creating an issue can you make sure you include info about exactly where/what platform you are seeing the problem on. This will make it easier for us to correctly tag the issue.

@friedbunny
Copy link
Contributor

I can get [ERROR] {0}{Map}[OpenGL]: stencil mask overflow on Hybrid style by zooming into hills (~z15-18) with significant contours.

@friedbunny
Copy link
Contributor

When this happens you'll see zoom levels stacking on top of each other like this:

ios-simulator-screen-shot-mar-22 -2015 -12 45 32-pm

And also sometimes long, straight contour-colored lines will flash or, rarely, stay on screen.

@jfirebaugh
Copy link
Contributor

The "zoom levels stacking" is expected behavior and not related to stencil mask overflow. It happens because both raster and vector tiles are being rendered and the VTs are twice as big.

@springmeyer
Copy link
Contributor

Seeing this loading satellite layers. The result I see is missing tiles:
screen shot 2015-05-08 at 10 43 12 am

@friedbunny
Copy link
Contributor

@springmeyer I think that satellite issue is #1423, introduced in the last week or so. The stencil overflow may very well be the underlying cause, I don't know, but it has seemed fairly harmless so far.

@1ec5 1ec5 mentioned this issue Jul 8, 2015
@incanus
Copy link
Contributor

incanus commented Jul 8, 2015

Well, the stencil mask (I believe) is only applicable for vector tiles anyway, since it's related to tessellated drawing. I think we could look higher up the chain and avoid calling into ClipIDGenerator::update() (where this log is found) for raster tiles at all.

@incanus
Copy link
Contributor

incanus commented Jul 8, 2015

I'm curious if something this simple will solve it:

diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp
index 742572a..58377c7 100644
--- a/src/mbgl/renderer/painter.cpp
+++ b/src/mbgl/renderer/painter.cpp
@@ -211,7 +211,9 @@ void Painter::render(const Style& style, TransformState state_, TimePoint time)
         // Update all clipping IDs.
         ClipIDGenerator generator;
         for (const auto& source : sources) {
-            generator.update(source->getLoadedTiles());
+            if (source->info.type != SourceType::Raster && source->info.type != SourceType::Video) {
+                generator.update(source->getLoadedTiles());
+            }
             source->updateMatrices(projMatrix, state);
         }

But I'm worried their might be issues when raster is combined with vector. Need to investigate and understand this more.

@iceman201
Copy link

I got this error as well in my swift coding
[ERROR] {Map}[OpenGL]: stencil mask overflow

@RomainQuidet
Copy link
Contributor

I'm still seeing this message when adding 2 raster layers.

@nimrodgat
Copy link

I'm seeing this error when setting a camera with pitch:85°, 45° seems to be fine.

@brewin
Copy link
Contributor

brewin commented Feb 23, 2016

I'm seeing this a lot on Android as well. Vector and raster layers above the basemap flash when interacting with the map. At the same time, I see a flood of stencil mask overflow errors. I assume there's some correlation there.

Edit:
Tilting the Satellite Streets map in the Android TestApp will produce this error. Roads flash and sometimes disappear while panning and there are many stencil mask overflow errors at the same time. (4.0.0-SNAPSHOT on a Nexus 7)

@andrewcar
Copy link

"[ERROR] {Map}[OpenGL]: stencil mask overflow"

I continually get these as I zoom in and out, regardless of whether I have any vector layers visible. I use Mapbox Studio, so I don't have any raster layers to my knowledge. For example, I will go to Europe and zoom in and out (where I have added nothing and removed several standard layers) and continually get the error logs.

@HeyLookItsBrandon
Copy link

I too am seeing these errors flooding in on Android, like @brewin. However, I'm not seeing any of rendering issues mentioned in this issue. We are using 3.x, not the 4.0 snapshot.

@mikemorris
Copy link
Contributor

We've seen intermittent stencil mask overflow errors when rendering in MapMode::Still through the Node.js bindings (v3.0.2) as well, but haven't been able to directly associate them with any specific requests or rendering errors.

@brewin
Copy link
Contributor

brewin commented Apr 7, 2016

I believe this was fixed with a recent commit (e7ac0f6, ea32ee7, or related). Using the latest 4.1.0-SNAPSHOT, I'm no longer seeing any stencil mask overflow errors.

@mikemorris mikemorris added the Node.js node-mapbox-gl-native label Apr 8, 2016
@mikemorris mikemorris added this to the node-v3.0.3 milestone Apr 8, 2016
@picciano
Copy link

We've started seeing this error in our app using ios-v3.1.0.

It's pretty devastating to our navigation app, when it occurs, the route line (polyline) disappears. I could redraw the route line, but the app does not get any notification that this occurred.

@alinapaz
Copy link

alinapaz commented Oct 6, 2016

@tobrun + @kkaefer clarifying we're seeing this issue with some custom styles as well.

@mollymerp
Copy link
Contributor

May be related to mapbox/mapbox-gl-js#3354

@andrewcar
Copy link

Is there some way to silence these logs until 4.0 is released in Xcode's settings? Maybe in the scheme environment variables like this?

@jfirebaugh jfirebaugh removed this from the node-v3.1.0 milestone Mar 15, 2017
@kkaefer kkaefer added Core The cross-platform C++ core, aka mbgl bug rendering labels May 30, 2017
@stale stale bot added the archived Archived because of inactivity label Nov 6, 2018
@stale
Copy link

stale bot commented Nov 30, 2018

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity bug Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS Node.js node-mapbox-gl-native rendering
Projects
None yet
Development

Successfully merging a pull request may close this issue.