-
Notifications
You must be signed in to change notification settings - Fork 195
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
[BUG] cannot completely destroy the viewer when switch the pages #745
Comments
The only issue is a warning in the console, correct? I assume there is a race condition between the canvas being destroyed by the browser and the animation stopping code. Do you have evidence that your clean up code is being run before the DOM tear down and you are still getting this error? You can check the value of |
Thank you for your feedback. Yes. It's only a warning in the console. |
We'd need to figure out what operation is trying to use the destroyed canvas. I had assumed it was the animation, but if it is disabled then it must be something else (not sure what). |
I don't know what operations or functions could be used. So I try methods like removeAllModels(), clear() and stopAnimate(); |
You need to break when the warning is generated and look at the call stack to see what is triggering the warning. |
I'm encountering a similar issue. While implementing the viewer in my React application, I'm facing a warning in the console during the component's unmounting phase. Despite spending hours debugging and attempting various solutions, I haven't been able to resolve the problem. |
If you can provide a reproducible, self-contained test case I can look at it. |
Describe the bug
I am using NextJS as frontend and want to render pdb files. The file could be rendered correctly, but when I switch to other page, the following error would occur:
I am not sure the correct way to dispose/destroy or clean up the viewer, not find any tutorial about that.
To Reproduce
I use the following code to visualize and clean the viewer, but not successful:
Expected behavior
No warning when switch pages. Namely the viewer could be destroyed.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: