Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> #769

Open
Arcanemagus opened this issue May 9, 2017 · 16 comments

Comments

@Arcanemagus
Copy link

Arcanemagus commented May 9, 2017

Description

When Atom is closed an error is printed to the CLI it was launched from about an attempt to call to a renderer window that has been closed.

Steps to Reproduce

  1. Open Atom
  2. Close Atom

Expected behavior:

No errors printed to the terminal.

Actual behavior:

The following error stack is printed to the terminal:

Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:65:20.
Error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:65:20.
    at WebContents.callIntoRenderer (C:\Temp\atom\out\Atom x64\resources\electron.asar\browser\rpc-server.js:190:19)
    at emitOne (events.js:101:20)
    at WebContents.emit (events.js:188:7)

Reproduces how often:

100% of the time, whether in safe mode or not.

Versions

Windows 10 x64

Build from atom/atom@4cbff30.

Atom : 1.18.0-dev-4cbff3044 x64
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0

[email protected] (bundled in the build)

Additional Information

Whether the github panel is opened or not doesn't seem to matter. The project that was open had 2 changed files.

@BinaryMuse
Copy link
Contributor

This is only when you quit Atom, not when only closing a single window, correct?

@Arcanemagus
Copy link
Author

Correct.

@BinaryMuse
Copy link
Contributor

Okay. This is a race down in Electron's RPC code. I'll provide some more context tomorrow but I'm not sure of an easy fix yet.

@BinaryMuse
Copy link
Contributor

@Arcanemagus Just confirming — you said that this was fixed for you, right?

@Arcanemagus
Copy link
Author

I wasn't seeing it on a build based on atom/atom@30ee14b, although you pointed out seeing a similar message in the build from that commit here.

@Arcanemagus
Copy link
Author

Hmmm, this is actually back on a build of atom/atom@fb9fd2f.

@Arcanemagus
Copy link
Author

Stack trace has changed slightly:

Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:70:22.
Error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:70:22.
    at WebContents.callIntoRenderer (C:\Temp\atom\out\Atom x64\resources\electron.asar\browser\rpc-server.js:190:19)
    at emitOne (events.js:101:20)
    at WebContents.emit (events.js:188:7)

@Arcanemagus
Copy link
Author

Here's a stack trace from a build based on merging the Electron 1.6 and Node.js 7 branches into master:

Attempting to call a function in a renderer window that has been closed or released.
Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:70:22
Remote event names: destroyed, crashed

Looks like it might have a tad more information, likely due to the Electron update.

@Arcanemagus
Copy link
Author

Interestingly on the released Atom v1.18.0-beta0 I don't see a message from this, but if I build the same commit I see the stack trace from #769 (comment) so there must be some sort of wrapper in the installer version that is hiding that message.

@eicksl
Copy link

eicksl commented Jun 26, 2017

Having the same issue.. Did you ever resolve it?

@pachevalier
Copy link

I had the same error. My trick is to change the rights for the ~/.atom/nohub.out file.

$ sudo chown username ~/username/.atom/nohup.out

Hope it helps.

@zonggen
Copy link

zonggen commented Oct 19, 2017

In the settings, there's an option "Restore Previous Windows on Start". If you set it to "no", it will fix the problem, at least for me. Hope this would help.

@lamikk
Copy link

lamikk commented Mar 3, 2018

@pachevalier Hi, I'm getting same error message and I'm not able to solve it.
@anonymousrice solution didn't work for me.
Could you explain it in more detail please?
I'm sorry to bother with a (probably) newbie question but I'm jut starting with all of this.
Thank you

@popod
Copy link

popod commented Dec 14, 2018

Exactly same error for me with electron 3.0.10 on macOS Mojave.

electron  Attempting to call a function in a renderer window that has been closed or released.
          Function provided here: makePdf.js:150:13
          Remote event names: closed

@aleon1220
Copy link

aleon1220 commented Dec 19, 2018

I had the same error. My trick is to change the rights for the ~/.atom/nohub.out file.

$ sudo chown username ~/username/.atom/nohup.out

Hope it helps.

yes that is the solution. Although you are being redundant ~/username/.atom/nohup.out
best to give whole path and recursive to clean up stuff

sudo chown -R USERNAME /home/USERNAME/.atom

@icecream17
Copy link
Contributor

Linking to a bunch of places

Issues with the same name:
atom/atom#19161
electron/electron#24772
#954

Screenshot of failed and passed tests displaying this error

In the wild:
atom/atom#22872
https://github.com/search?p=1&q=Attempting+to+call+a+function+in+a+renderer+window+that+has+been+closed+or+released&type=Code

There's also two versions of this error, not windows...

Attempting to call a function in a renderer window that has been closed or released.
Function provided here: worker.js:60:22
Remote event names: crashed, destroyed

and windows

Attempting to call a function in a renderer window that has been closed or released.
Function provided here: Object.<anonymous> (D:\a\github\github\lib\worker.js:60:22
Remote event names: crashed, destroyed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants