From bd3eb4990afa6f0e78b2773a1531d10251cd0f89 Mon Sep 17 00:00:00 2001 From: Alexandre Neuwald CTW Date: Thu, 6 Jun 2024 15:08:41 +0100 Subject: [PATCH 1/3] BUGFIX: State transitions panel crashing --- packages/studio-base/src/components/Chart/index.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/studio-base/src/components/Chart/index.tsx b/packages/studio-base/src/components/Chart/index.tsx index 268537fea0..204586ff71 100644 --- a/packages/studio-base/src/components/Chart/index.tsx +++ b/packages/studio-base/src/components/Chart/index.tsx @@ -351,10 +351,15 @@ function Chart(props: Props): JSX.Element { return; } + // Temporarily remove setUpdateError to avoid displaying the error caused by re-rendering, + // which results in the component crashing. The crash happens because a message is sent to a + // closed RPC, causing some panels to become unusable. This approach ignores the error to + // keep the component functional. Revisit this once the underlying issue is resolved. updateChart(newUpdate).catch((err: Error) => { - if (isMounted()) { - setUpdateError(err); - } + // if (isMounted()) { + // setUpdateError(err); + // } + console.error(err); }); }, [getNewUpdateMessage, isMounted, updateChart]); From 826cb661f53490a1de2c968a30f11096b54f8d02 Mon Sep 17 00:00:00 2001 From: Alexandre Neuwald CTW Date: Thu, 6 Jun 2024 15:09:43 +0100 Subject: [PATCH 2/3] increment version --- package.json | 2 +- packages/studio/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d04d7cf604..d3dea08601 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foxbox", - "version": "1.0.4", + "version": "1.0.5", "license": "MPL-2.0", "private": true, "productName": "Foxbox", diff --git a/packages/studio/package.json b/packages/studio/package.json index 06aab62f9f..770eadf15a 100644 --- a/packages/studio/package.json +++ b/packages/studio/package.json @@ -1,6 +1,6 @@ { "name": "@foxglove/studio", - "version": "1.0.4", + "version": "1.0.5", "license": "MPL-2.0", "repository": { "type": "git", From 0c888a93d25c3e08688ec438f307152521844749 Mon Sep 17 00:00:00 2001 From: Alexandre Neuwald CTW Date: Thu, 6 Jun 2024 16:16:47 +0100 Subject: [PATCH 3/3] remove commented code --- packages/studio-base/src/components/Chart/index.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/studio-base/src/components/Chart/index.tsx b/packages/studio-base/src/components/Chart/index.tsx index 204586ff71..40cc66750d 100644 --- a/packages/studio-base/src/components/Chart/index.tsx +++ b/packages/studio-base/src/components/Chart/index.tsx @@ -356,9 +356,6 @@ function Chart(props: Props): JSX.Element { // closed RPC, causing some panels to become unusable. This approach ignores the error to // keep the component functional. Revisit this once the underlying issue is resolved. updateChart(newUpdate).catch((err: Error) => { - // if (isMounted()) { - // setUpdateError(err); - // } console.error(err); }); }, [getNewUpdateMessage, isMounted, updateChart]);