eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.82k stars 2.48k forks source link

Exception from Breadcrumbs when Closing all Editors #12415

Open tsmaeder opened 1 year ago

tsmaeder commented 1 year ago

Bug Description:

I get this exception in the browser log from the breadcrumbs component when I do "Close all" editors.

react-dom.development.js:29289 Uncaught (in promise) Error: Cannot update an unmounted root.
    at ReactDOMRoot.ReactDOMHydrationRoot.render.ReactDOMRoot.render (react-dom.development.js:29289)
    at BreadcrumbsRenderer.render (react-renderer.tsx:44)
    at BreadcrumbsRenderer.update (breadcrumbs-renderer.tsx:121)
    at BreadcrumbsRenderer.refresh (breadcrumbs-renderer.tsx:117)
    at async ToolbarAwareTabBar.updateBreadcrumbs (tab-bars.ts:724)

Steps to Reproduce:

  1. Open two editors
  2. Observe: the second opened editor is the active one
  3. Click on the first opened editor
  4. Select "Close All" from the editor tab context menu
  5. Observe: the above exception appears in the browser log.

Additional Information

tsmaeder commented 1 year ago

Note that this exception occurs before my recent changes to introduce dynamic tab resizing, i.e. already in https://github.com/eclipse-theia/theia/commit/c33553806b7dc3d17d4a820627104280bc84ab3a