iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
8 stars 2 forks source link

Popped out widget crashes viewport when exiting ConfigurableUiContent (Electron) #951

Open jsnaras opened 1 month ago

jsnaras commented 1 month ago

Describe the bug

In an Electron app, when a measurement widget is active and popped out and the user navigates away from a page that contains the ConfigurableUiContent component, the popped out widget is not deinitialized properly and causes a crash.

To Reproduce

Prerequisites: 2 separate "pages" in the app, one of them having the ConfigurableUiContent and another one without it; measurement tools available.

  1. Open the page with ConfigurableUiContent, activate a measurement tool, select target, observe docked measurement tool result viewport working correctly
  2. Pop out the newly opened measurement viewport
  3. Navigate away from the page (to the one not containing ConfigurableUiContent), the popped out widget closes (as expected)
  4. Navigate back to the page with ConfigurableUiContent, the app crashes with an assertion error

Expected Behavior

The popped out measurement widget window is closed correctly when unmounting ConfigurableUiContent and does not crash when re-entering ConfigurableUiContent

Screenshots

No response

Desktop (please complete the applicable information)

Additional context

No response