visgl / visgl/deck.gl

[Bug] TypedArrayManager may not allocate properly even though the `initialize` option is specified. This causes PathLayer rendering glitches occasionally.

Open
#8,273 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Description

https://github.com/visgl/deck.gl/blob/aaac65726a8080506ed5b96126e49f8759b1d01d/modules/core/src/utils/typed-array-manager.ts#L51

In this line the TypedArray is expaned. But the expaned part is not initialized.

https://github.com/visgl/deck.gl/blob/aaac65726a8080506ed5b96126e49f8759b1d01d/modules/layers/src/path-layer/path-tesselator.ts#L51

While in PathLayer it expects positions buffer initialized. Since it will use the end padding part of positions buffer.

We may fix this bug simply by filling padding to 0 in path-tesselator.
Or we can do something to let TypedArrayManager behave correcttly.

image

Flavors
  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS
Expected Behavior

No response

Steps to Reproduce

It's hard to reproduce.

Environment
  • Framework version: 8.9.7
  • Browser: Google Chrome Version 114.0.5735.106 (Official Build) (64-bit)
  • OS: Ubuntu 20
Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading modules/core/src/utils/typed-array-manager.ts at the linked allocation line and modules/layers/src/path-layer/path-tesselator.ts at the linked positions usage. Compare the initialize option with the expanded buffer's padding behavior, then investigate the PathLayer rendering path. Done means the padding is reliably initialized and the occasional PathLayer rendering glitch is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.