mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

stencil mask overflow.

Open mb12 opened this issue 11 years ago • 22 comments

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

"stencil mask overflow"

mb12 avatar Mar 07 '15 03:03 mb12

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.

mb12 avatar Mar 13 '15 22:03 mb12

@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.

ljbade avatar Mar 17 '15 03:03 ljbade

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

friedbunny avatar Mar 22 '15 19:03 friedbunny

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.

friedbunny avatar Mar 22 '15 19:03 friedbunny

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.

jfirebaugh avatar Mar 23 '15 18:03 jfirebaugh

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

springmeyer avatar May 08 '15 17:05 springmeyer

@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.

friedbunny avatar May 08 '15 18:05 friedbunny

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 avatar Jul 08 '15 00:07 incanus

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.

incanus avatar Jul 08 '15 04:07 incanus

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

iceman201 avatar Dec 01 '15 00:12 iceman201

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

RomainQuidet avatar Jan 13 '16 15:01 RomainQuidet

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

nimrodgat avatar Feb 22 '16 18:02 nimrodgat

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)

brewin avatar Feb 23 '16 18:02 brewin

"[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.

andrewcar avatar Mar 08 '16 02:03 andrewcar

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.

HeyLookItsBrandon avatar Mar 25 '16 18:03 HeyLookItsBrandon

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.

mikemorris avatar Mar 25 '16 19:03 mikemorris

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.

brewin avatar Apr 07 '16 17:04 brewin

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.

picciano avatar May 11 '16 22:05 picciano

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

alinapaz avatar Oct 06 '16 18:10 alinapaz

May be related to https://github.com/mapbox/mapbox-gl-js/issues/3354

mollymerp avatar Oct 12 '16 14:10 mollymerp