Skip to content

NaN point causes document not to deserialize #4432

Description

@0HyperCube

When a document is saved with a value as NaN, the serde_json encodes it as null however it is then unable to decode it per serde-rs/json#202. This is not ideal as users have to manually edit the JSON to recover their document.

Apparently we can get NaN values in the handle_end field of SegmentModification. It is not clear how this occurs. Some asserts when updating these values should allow for better debugging if this occurs again.

It may also be prudent to consider checking the document for NaN values before saving. Furthermore, a better data format (not JSON) might allow roundtripping all data values. This could be considered as part of #1742.

As reported by ananas_tya on discord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions