Skip to content

fix(release-bubbles): guard against disposed ECharts instance in mouse handlers#119454

Draft
billyvg wants to merge 1 commit into
masterfrom
claude/serene-cannon-dahwe9
Draft

fix(release-bubbles): guard against disposed ECharts instance in mouse handlers#119454
billyvg wants to merge 1 commit into
masterfrom
claude/serene-cannon-dahwe9

Conversation

@billyvg

@billyvg billyvg commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary

Fixes a crash (JAVASCRIPT-3AP8) affecting 192 users on the /issues/:groupId/events/ page where hovering over a release bubble then mousing out causes a TypeError: Cannot read properties of undefined (reading 'get').

Root cause: When handleMouseOut (and handleMouseOver, handleLegendSelectChanged) call echartsInstance.setOption(), ECharts internally iterates over its series models. If the chart is being destroyed or re-rendered during the mouse event (a timing race), the model referenced by MarkerModel.mergeOptionecModel.eachSeries can be undefined, causing the crash.

Fix:

  • Add isDisposed() guard before each setOption call — ECharts' public API for checking if the instance has been destroyed
  • Wrap each setOption in a try/catch to handle any transitional state that isDisposed() might miss

Evidence from Sentry:

handleMouseOut → echartsInstance.setOption() →
  MarkerModel.prototype.mergeOption →
  ecModel.eachSeries → seriesModel.get(this.mainType, true)
  // seriesModel is undefined → TypeError

Seer analysis confirmed: "Wrap setOption calls in mouse handlers with a try/catch and add an isDisposed guard to prevent crashes during chart state transitions."

Session: https://claude.ai/code/session_01J4LcBkJp5FmPYfxmFcq6ZV


Generated by Claude Code

…e handlers

When a user mouses over a release bubble and the chart is destroyed or
re-rendered during the event, setOption() throws because the internal
model is in an inconsistent state. Add isDisposed() checks and
try/catch guards around all setOption calls in handleMouseOver,
handleMouseOut, and handleLegendSelectChanged to prevent the crash.

Fixes JAVASCRIPT-3AP8

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 11, 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