Skip to content

Commit

Permalink
[BUGFIX] State Transitions panel is crashing with "RPC Terminated" er…
Browse files Browse the repository at this point in the history
…ror (#31)

**User-Facing Changes**
The default layout of ADP was not functioning correctly. The "State
Transitions" panel was crashing due to a re-render problem, causing an
RPC to be created and closed twice with the same ID. This led to a
message being sent during the process, resulting in the exception "RPC
terminated."

**Description**
A complete solution for the problem was not identified, suggesting the
issue might stem from a deeper component such as the LayoutManager.
Instead of resolving the root cause, the error has been suppressed. A
lost message to a closed RPC is not critical since the new RPC operates
correctly. However, this issue should be revisited in the future for a
more thorough fix.

**Checklist**
- [x] The web version was tested and it is running ok
- [x] The desktop version was tested and it is running ok
- [ ] I've updated/created the storybook file(s)
- [x] The release version was updated on package.json files
  • Loading branch information
aneuwald-ctw authored Jun 7, 2024
1 parent 732c5a3 commit 0f83366
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "foxbox",
"version": "1.0.4",
"version": "1.0.5",
"license": "MPL-2.0",
"private": true,
"productName": "Foxbox",
Expand Down
8 changes: 5 additions & 3 deletions packages/studio-base/src/components/Chart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,12 @@ 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);
}
console.error(err);
});
}, [getNewUpdateMessage, isMounted, updateChart]);

Expand Down
2 changes: 1 addition & 1 deletion packages/studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@foxglove/studio",
"version": "1.0.4",
"version": "1.0.5",
"license": "MPL-2.0",
"repository": {
"type": "git",
Expand Down

0 comments on commit 0f83366

Please sign in to comment.