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.

Crash transitioning color with delay #7720

Closed

Description

@incanus

Discovered during #7711.

If you have a sufficiently dark color, say a fill like #333, and apply runtime styling changes to black with any significant delay, an assertion will fail because the RBGA values drop below zero.

Here is a core test proving the bug:

https://github.com/mapbox/mapbox-gl-native/compare/core-bug-transition-color

If you change the commented-out delay argument from 0 to 1000 milliseconds (this line), the bug is triggered in the course of running make run-test-Map.TransitionColor.

Note: Google Test filter = Map.TransitionColor
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from Map
[ RUN      ] Map.TransitionColor
Assertion failed: (r_ >= 0.0f), function Color, file include/mbgl/util/color.hpp, line 16.
^Cmake: *** [run-test-Map.TransitionColor] Error 129

/cc @1ec5 @jfirebaugh @kkaefer

Activity

  1. added
    Core
    on Jan 13, 2017
  2. added and removed on Jan 14, 2017
  3. changed the title [-]core bug in color transitions[/-] [+]Crash transitioning color with delay[/+] on Jan 14, 2017
  4. self-assigned this
    on Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Corecrashruntime styling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions