fix(release-bubbles): guard against disposed ECharts instance in mouse handlers#119454
Draft
billyvg wants to merge 1 commit into
Draft
fix(release-bubbles): guard against disposed ECharts instance in mouse handlers#119454billyvg wants to merge 1 commit into
billyvg wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 aTypeError: Cannot read properties of undefined (reading 'get').Root cause: When
handleMouseOut(andhandleMouseOver,handleLegendSelectChanged) callechartsInstance.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 byMarkerModel.mergeOption→ecModel.eachSeriescan be undefined, causing the crash.Fix:
isDisposed()guard before eachsetOptioncall — ECharts' public API for checking if the instance has been destroyedsetOptionin a try/catch to handle any transitional state thatisDisposed()might missEvidence from Sentry:
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