Open
Bug 862529
Opened 12 years ago
Updated 2 years ago
no file or line number for TypeError: can't access dead object (from jswrapper.cpp)
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: cers, Unassigned)
References
(Blocks 1 open bug, )
Details
STR:
1) go to https://builder.addons.mozilla.org/package/183107/revision/2/
2) click Test 3 times (this loads, unloads, and finally loads the add-on again)
3) dispatch the custom event on a window.
Actual results:
Error: TypeError: can't access dead object.
Expected results:
I'm not sure what actually throws that error, but the file and line number should be listed in the error message.
Comment 1•12 years ago
|
||
What actually throws the error is C++ code, where there's no file/line number available.
You're trying to access an object from a window after that window's closed, which is generally a good way to "leak" lots of memory -- except that we interpose a wrapper between your code and the actual object from the other window, and when that window closes, it severs the link and makes any use of the wrapper throw the dead-object error. Probably some listener's not getting properly removed from the window when it's closed...or something.
Note that the exception probably has a "stack" property on it, that includes call stack information along with file/line numbers. The console could easily display this property if it wanted. (If the stack's empty, the dead object's probably being used as a listener of some sort, and the attempt to call it is what's bailing.)
Comment 2•12 years ago
|
||
Is there really no way for the C++ code to report a useful error (source/line)? When one of these shows up in someone's console, I'd hope there was a better way to find what was triggering it than to hook up a debugger...
Updated•12 years ago
|
Blocks: 435025
Summary: Errors thrown from jswrapper.cpp don't show file or line number → no file or line number for TypeError: can't access dead object (from jswrapper.cpp)
Comment 3•12 years ago
|
||
There's that stack property, right?
Comment 4•12 years ago
|
||
I didn't check, but even if it's there, getting it to the console through the nsIConsoleService and friends is far from trivial (bug 814497).
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•