-
Notifications
You must be signed in to change notification settings - Fork 26
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
App crashes with "Object has been destroyed" error #156
Comments
Hey @thecodrr, can you provide more information about when the error occurs? I'm confident I have a fix, but I want to be sure I understand the root cause before I patch it. |
@jsonnull this occurs on closing the window. |
Did you figure out a solution? Running into this as well.
|
For us, this was happening because our app explicitly calls ReproductionYou can reproduce it by calling
For example: setTimeout(() => {
win.destroy()
}, 5000) I haven't found a workaround other than to avoid calling Root Cause
It also accesses Apparently the Potential FixThe easiest would probably be to capture electron-trpc/packages/electron-trpc/src/main/createIPCHandler.ts Lines 81 to 98 in cfdb2e5
I'll put up a PR with this fix, but I'm definitely open to alternatives! |
I believe it is coming from here due to
win
being destroyed:electron-trpc/packages/electron-trpc/src/main/createIPCHandler.ts
Line 57 in 8c2de95
Here's the full error:
The text was updated successfully, but these errors were encountered: