[BUG]: WebGL debugging: unclear origin of regl.clear() warnings in scattergl rendering
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Description
While working on issue #7387 and the associated fix (#7390), I noticed that debugging WebGL-related warnings (specifically those related to regl.clear()) can be difficult due to a lack of contextual information about where the call originates.
In strict or debug environments, warnings such as:
"clear() called with no buffers in bitmask"
may appear without clearly indicating which rendering path or trace triggered them.
This makes it harder for contributors and developers to trace the source of the issue, especially when working with scattergl or other WebGL-based traces.
Steps to Reproduce
- Use a WebGL-based trace (e.g.,
scattergl) - Run in a development or strict/debug environment
- Trigger a render/update cycle
- Observe WebGL warnings in console
Expected Behavior
Warnings should provide enough context to help identify:
- which trace type triggered the call
- where in the rendering pipeline it originated
Actual Behavior
Warnings appear without clear contextual linkage to the rendering path, making debugging less efficient.
Suggested Improvement
Consider improving developer experience by:
- adding contextual debug information (e.g., trace type or module)
- documenting expected
regl.clear()usage more explicitly - optionally enhancing debug logging in development mode
Additional Context
This observation is based on my contribution to fix issue #7387:
https://github.com/plotly/plotly.js/issues/7387
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing issue #7387 and its associated fix #7390, then trace the scattergl rendering path that can call regl.clear(). The issue names no files or tests; done would require an agreed implementation that makes warnings identify the triggering trace or rendering location and verifies the resulting debug output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, data-visualization
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100