Closed Bug 1142599 Opened 9 years ago Closed 9 years ago

"TypeError: can't access dead object" due to "sdk/tabs" component when disabling addon

Categories

(Add-on SDK Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1086163

People

(Reporter: mabahas, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150306140254

Steps to reproduce:

I created a new minimal testcase addon using "cfx init". 
My "main.js" contains only: 
   require('sdk/tabs');
Then I tested the addon with "cfx run", disabled it, and opened a new tab.

I tested with Firefox 36.0.1 / addon-sdk 1.17, Firefox Aurora 38.0a2, and the current master branch of the addon-sdk (#3394ad5d1d). 


Actual results:

When opening a new tab after the addon was disabled once, this error showed up in the shell multiple times: 
JavaScript error: resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///tmp/tmp_Ex0TB.mozrunner/extensions/jid1-JlnBuUjfvbAEKg@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/tabs/tab-firefox.js, line 98: TypeError: can't access dead object

When using Firefox Aurora, the error messaged changed a little bit: 
JavaScript error: resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///tmp/tmpY_9BDV.mozrunner/extensions/jid1-JlnBuUjfvbAEKg@jetpack.xpi!/bootstrap.js, line 290: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXPCComponents_Utils.nukeSandbox]
JavaScript error: resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/tabs/tab-firefox.js, line 98: TypeError: can't access dead object

about:memory showed that the addon still consumes memory, even after it has been uninstalled (not just disabled), and heap-minimize was runned several times. 
So for me, it looks like this is also a memory leak.


Expected results:

When disabling or uninstalling an addon, no references should be kept to the sdk/tabs component, so this error should not occur.
OS: All → Linux
Hardware: All → x86_64
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: