Closed Bug 345022 Opened 20 years ago Closed 18 years ago

ASSERTION: XPConnect is being called on a scope without a 'Components' property! (using setUserData)

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

pure virtual method called, [@ nsContentUtils::CallUserDataHandler] STEPS TO REPRODUCE 1. load testcase in a trunk debug build 2. push the button -> crash The crash is in NS_DEBUG code here: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/base/src/nsContentUtils.cpp&rev=1.170&root=/cvsroot&mark=3187#3180 When I removed that NS_DEBUG block I got this instead (no crash though): ###!!! ASSERTION: XPConnect is being called on a scope without a 'Components' property! This is pretty much always bad. It usually means that native code is making a callback to an interface implemented in JavaScript, but the document where the JS object was created has already been cleared and the global properties of that document's window are *gone*. Generally this indicates a problem that should be addressed in the design and use of the callback code. : 'Error', file xpcwrappednativescope.cpp, line 587 An error occurred updating the cmd_copy command
Attached file stack —
Attached file Testcase —
*** Bug 345533 has been marked as a duplicate of this bug. ***
"Pure virtual method called" usually means code is incorrectly calling virtual functions from a destructor, perhaps indirectly. In particular, calling virtual methods on a derived class during a base class's destructor will not do what you want.
Keywords: crash
Summary: pure virtual method called, [@ nsContentUtils::CallUserDataHandler] → Debug-only crash: "pure virtual method called" [@ nsContentUtils::CallUserDataHandler]
It seems bug 330677 fixed the crash: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/content/base/src/nsContentUtils.cpp&rev=1.174&root=/cvsroot&mark=3211#3206 The assertion is still present. Not sure if that's a security issue though.
Severity: major → normal
Keywords: crash → assertion
Summary: Debug-only crash: "pure virtual method called" [@ nsContentUtils::CallUserDataHandler] → ASSERTION: XPConnect is being called on a scope without a 'Components' property! (using setUserData)
WFM on Mac trunk. The only problem I see is this warning: WARNING: Moving XPConnect wrappedNative to new scope, but can't fixup __proto__: file /Users/jruderman/trunk/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 1174
mats, still a problem?
No crash or assertion with the testcase, FF trunk Linux and Mac debug builds. We could probably make it into a crashtest. -> WORKSFORME
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Group: core-security → core-security-release
Group: core-security-release
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: