Thanks to visit codestin.com
Credit goes to github.com

Skip to content

page will freeze when reading empty FGB file with the specified rect #430

@voknez

Description

@voknez

The page will freeze permanently if I deserialize an empty (or invalid) FGB file with the specified rect.
There are no errors in the console.
sample file

let iter = flatgeobuf.ol.deserialize(url, rect);
for await (let _feature of iter) {...}

If I deserialize this file without specifying rect, then there are no problems.

const response = await fetch(url);
for await (let _feature of flatgeobuf.ol.deserialize(response.body)) {...}

But in this case the whole file is downloaded. I don't like it.
Now I use additional API to determine the file size. If the file is small then I use deserialize without Rect otherwise with Rect.

Originally posted by @voknez in #429

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