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

Glyph bitmap overflow, disappearing labels on rotation #1681

Closed

Description

@1ec5

With #1666 in iOS 8.3 on an iPhone 6, when rotating the map, I’m seeing CJK labels disappear instead of flipping vertically:

img_0291
img_0292
img_0293

Doesn’t reproduce in mapbox-gl-js (Emerald style) in Firefox 40.0a2 (2015-06-02).

/cc @ansis

Activity

  1. added
    iOS
    on Jun 3, 2015
  2. 1ec5 commented on Jun 3, 2015

    @1ec5
    ContributorAuthor

    Although I wouldn’t discount the possibility that it has something to do with the corrupted glyph in that POI label in the center of the map.

  3. changed the title [-][new labeling] CJK labels disappear instead of flipping on rotation[/-] [+][new labeling] Labels disappear instead of flipping on rotation[/+] on Jun 3, 2015
  4. 1ec5 commented on Jun 3, 2015

    @1ec5
    ContributorAuthor

    I was also seeing the issue on Vietnamese labels (Latin with diacritics). But after restarting the app, I’m no longer seeing either the glyph corruption (completely misdrawn and flashing on every redraw) or the labels disappearing – the labels flip as expected. So it probably is related to the glyph corruption.

  5. changed the title [-][new labeling] Labels disappear instead of flipping on rotation[/-] [+][new labeling] Glyph corruption causes labels to disappear instead of flipping on rotation[/+] on Jun 3, 2015
  6. 1ec5 commented on Jun 3, 2015

    @1ec5
    ContributorAuthor

    When I do return to the problematic POI, I get lots of this in the console:

    2015-06-03 11:09:20.093 TeaPod[10815:1731778] [ERROR] [OpenGL]: glyph bitmap overflow
    
  7. changed the title [-][new labeling] Glyph corruption causes labels to disappear instead of flipping on rotation[/-] [+][new labeling] Glyph bitmap overflow, disappearing labels on rotation[/+] on Jun 3, 2015
  8. mikemorris commented on Jun 3, 2015

    @mikemorris
    Contributor

    We've seen this with Chinese labels before (can't find the issue though), but we're essentially overstuffing the glyph atlas, because so many unique glyphs are needed and the glyphs are spread across so many "glyph tiles" (blocks of 256 codepoints). I think we're attempting to add all the bitmaps for a requested glyph tile to the atlas, even if only one or two glyphs in that block are actually needed for rendering at the moment (not happening this way anymore).

    The sparse placement and long tail of less common glyphs across the Unicode range makes this a pretty difficult problem. Another possible compounding issue is that we're storing glyphs in the atlas by fontstack and codepoint, so there may be multiple copies of a glyph stored if multiple fontstacks share a common fallback.

    I believe bin.allocate returns a zero-width Rect if it fails to allocate space in the atlas.

    Refs mapbox/mapbox-gl-js#141

  9. jfirebaugh commented on Jun 3, 2015

    @jfirebaugh
    Contributor

    We have several issues about sprite atlas overflow, but maybe not one about glyph atlas overflow specifically. However there is #1444, which is likely compounding the issue.

  10. changed the title [-][new labeling] Glyph bitmap overflow, disappearing labels on rotation[/-] [+]Glyph bitmap overflow, disappearing labels on rotation[/+] on Jun 4, 2015
  11. added
    Core
    and removed
    iOS
    on Jul 12, 2016
  12. 1ec5 commented on Jul 13, 2016

    @1ec5
    ContributorAuthor

    In case it wasn’t clear from the screenshots I took in #1681 (comment), this is what glyph overflow currently looks like:

    glitch

    It’s easy to reproduce this issue by panning around a city such as Tapei, in which many street names and POIs have Chinese names but not English names.

    mapbox/mapbox-gl-js#141 is the equivalent bug in Mapbox GL JS.

  13. 1ec5 commented on Aug 17, 2016

    @1ec5
    ContributorAuthor

    What’s the state of this issue now that #5908 has landed? I’m unable to reproduce the issue anymore, though I haven’t tried very thoroughly. Do we still need this ticket around?

    /cc @amyleew @xrwang

  14. amyleew commented on Aug 22, 2016

    @amyleew
    Contributor

    Haven't noticed it again @1ec5. Let's close for now, we can reopen if this becomes an issue in the future

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Corebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions