Skip to content

[BUG] Track.setFeature should reject keyframe=false #520

@subdavis

Description

@subdavis

Describe the bug

I believe there's a bug in Track.setFeature() where, if the feature.frame doesn't already exist and feature.keyframe is false, the keyframe will be persisted into the track feature arrays as if it were a real keyframe.

In practice, this never happens in the code. However, I'm pretty sure that all features in track.features and track.featureIndex should be keyframes. In other words, any data exists about a frame (geometry, attrs, etc) it should be a keyframe. Any mutation operation where keyframe=false should throw an error.

Working on a unit test to describe this better.

If the track internal state got polluted with a keyframe=false frame, it would serialize it out to json, and there should never be keyframe=false in the json. The only place a non-keyframe should exist is in the return value to getFeature() for an interpolated frame.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions