Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not unmounting WebViews; heavy memory and computation leaks when closing a webview #578

Closed
tjcouch-sil opened this issue Oct 19, 2023 · 0 comments · Fixed by #638
Closed
Assignees
Labels
bug Something isn't working

Comments

@tjcouch-sil
Copy link
Member

tjcouch-sil commented Oct 19, 2023

Describe the bug
When you close a webview, all of that webview code continues running until you shut down or reload the renderer.

To Reproduce
Steps to reproduce the behavior:

  1. Open the Resource Viewer (only have one open for this test)
  2. Change the verse ref
  3. Notice the latest console log Resource Viewer project ID: ... was added when you changed the verse ref
  4. Close the Resource Viewer tab
  5. Change the verse ref
  6. Unexpectedly, notice that there's at least one more log Resource Viewer project ID: .... This should not happen anymore if this is fixed.
  7. Reload (Ctrl+R)
  8. Notice there are no more Resource Viewer project ID: ... logs
  9. Change the verse ref
  10. Again, notice there are no Resource Viewer project ID: ... logs

Note: this issue is not present in built-in tabs that do not use webviews.

Expected behavior
WebView React roots should be unmounted with root.unmount() when they are destroyed. We may be able to use the onbeforeunload event inside the iframe somewhere.

Fixing this may fix #270!

@tjcouch-sil tjcouch-sil added the bug Something isn't working label Oct 19, 2023
@tjcouch-sil tjcouch-sil moved this to Open in Paranext Oct 19, 2023
@GlennPruitt GlennPruitt moved this from Open to Product Backlog in Paranext Oct 23, 2023
@tjcouch-sil tjcouch-sil moved this from Product Backlog to Open in Paranext Nov 1, 2023
@tjcouch-sil tjcouch-sil moved this from Open to 🔖 ToDo in Paranext Nov 1, 2023
@rolfheij-sil rolfheij-sil self-assigned this Nov 8, 2023
@rolfheij-sil rolfheij-sil moved this from 🔖 ToDo to 🏗 In progress in Paranext Nov 9, 2023
@rolfheij-sil rolfheij-sil moved this from 🏗 In progress to 👀 In review in Paranext Nov 10, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Paranext Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants