Skip to content

fix(release-bubbles): guard against disposed echartsInstance in mouse handlers#119471

Closed
billyvg wants to merge 1 commit into
masterfrom
claude/serene-cannon-kc53xs
Closed

fix(release-bubbles): guard against disposed echartsInstance in mouse handlers#119471
billyvg wants to merge 1 commit into
masterfrom
claude/serene-cannon-kc53xs

Conversation

@billyvg

@billyvg billyvg commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

Fixes JAVASCRIPT-3AP8TypeError: Cannot read properties of undefined (reading 'get') in useReleaseBubbles.tsx, escalating with 195 users impacted.

Root cause: ECharts instances can be disposed during React component unmount/re-render while mouse events (mouseover, mouseout, globalout, mousemove) are still in-flight. When setOption, getOption, or dispatchAction are called on a disposed instance, ECharts' internal GlobalModel._mergeOption tries to call .get() on a series model that no longer exists, throwing the uncaught TypeError.

Evidence from Sentry issue JAVASCRIPT-3AP8:

  • Stack trace points to handleMouseOutechartsInstance.setOption(...) at line 552 of useReleaseBubbles.tsx
  • The error originates inside echarts/lib/component/marker/MarkerModel.js:98seriesModel.get(this.mainType, true) where seriesModel is undefined
  • All occurrences are triggered by mousemove events on the EventGraph-Grid > ChartContainer > BaseChart > ReactEchartsCore element
  • The existing !echartsInstance null check is insufficient — a disposed instance is still truthy

Fix: Add echartsInstance.isDisposed() guard to all four mouse event handlers (handleMouseMove, handleMouseOver, handleMouseOut, handleGlobalOut). The ECharts API exposes isDisposed(): boolean exactly for this purpose.

Analysis Session

https://claude.ai/code/session_01KEXsNpah4hsB8C56Uzb3RJ

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Generated by Claude Code

… handlers

ECharts instances can be disposed during React unmount while mouse events
are still in-flight, causing `setOption`/`dispatchAction` calls to crash
with "Cannot read properties of undefined (reading 'get')".

Add `isDisposed()` checks to all four mouse event handlers
(handleMouseMove, handleMouseOver, handleMouseOut, handleGlobalOut)
so they bail early when the instance is no longer valid.

Fixes JAVASCRIPT-3AP8
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 12, 2026
@billyvg billyvg closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants