Closed
Bug 711602
Opened 13 years ago
Closed 13 years ago
"ASSERTION: bad size recorded" with mozVibrate
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: jruderman, Assigned: justin.lebar+bug)
References
Details
(Keywords: assertion, testcase)
Attachments
(3 files)
###!!! ASSERTION: bad size recorded: 'aInstanceSize == 0 || entry->GetClassSize() == aInstanceSize', file /builds/slave/m-cen-osx64-dbg/build/xpcom/base/nsTraceRefcntImpl.cpp, line 473
NS_LogAddRef_P [xpcom/base/nsTraceRefcntImpl.cpp:998]
mozilla::ClearOnShutdown_Internal::ShutdownObserver<nsAutoPtr<InfallibleTArray<long long unsigned int> > >::AddRef [down.h:79]
nsObserverList::AddObserver [nsCOMPtr.h:889]
mozilla::ClearOnShutdown<nsAutoPtr<InfallibleTArray<long long unsigned int> > > [:519]
mozilla::hal::Vibrate [hal/Hal.cpp:115]
mozilla::dom::Navigator::MozVibrate [nsCOMPtr.h:519]
NS_InvokeByIndex_P [xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_unix.cpp:197]
###!!! ASSERTION: bad size recorded: 'aInstanceSize == 0 || entry->GetClassSize() == aInstanceSize', file /builds/slave/m-cen-osx64-dbg/build/xpcom/base/nsTraceRefcntImpl.cpp, line 473
NS_LogAddRef_P [xpcom/base/nsTraceRefcntImpl.cpp:998]
mozilla::ClearOnShutdown_Internal::ShutdownObserver<nsRefPtr<mozilla::dom::<unnamed>::VibrateWindowListener> >::AddRef [ClearOnShutdown.h:79]
nsObserverList::FillObserverArray [nsCOMPtr.h:880]
nsObserverList::NotifyObservers [xpcom/ds/nsObserverList.cpp:127]
nsObserverService::NotifyObservers [nsTHashtable.h:163]
mozilla::ShutdownXPCOM [xpcom/glue/nsCOMPtr.h:519]
ScopedXPCOMStartup::~ScopedXPCOMStartup [toolkit/xre/nsAppRunner.cpp:1115]
XRE_main [nsCOMPtr.h:807]
main [browser/app/nsBrowserApp.cpp:201]
Tested with http://hg.mozilla.org/mozilla-central/rev/7cc472108eb4
Assignee | ||
Updated•13 years ago
|
Assignee | ||
Comment 1•13 years ago
|
||
This is almost surely a result of the NS_ISUPPORTS implementation hack I have for ClearOnShutdown<T>. Sigh.
Updated•13 years ago
|
Assignee: nobody → justin.lebar+bug
Assignee | ||
Comment 2•13 years ago
|
||
Hm, I can't reproduce with a local debug, trace-malloc build, rev 7ccc472. I verified that ClearOnShutdown is being called.
Assignee | ||
Comment 3•13 years ago
|
||
I do see this in the mochitest-3 logs, however.
Assignee | ||
Comment 5•13 years ago
|
||
Maybe the trace refcnt assertions just aren't on when I run dist/bin/firefox? I see the assertions when I run the vibrator mochitest locally.
Assignee | ||
Comment 6•13 years ago
|
||
Reading through the implementation of INLINE_REFCOUNTING and DECL_{ADDREF,RELEASE}, it's not entirely clear to me why this works. But it does seem to work.
Attachment #582902 -
Flags: review?(benjamin)
Comment 7•13 years ago
|
||
Comment on attachment 582902 [details] [diff] [review]
Patch v1
This turns out to just be a name collision with the other ShutdownObserver in gfx-land.
Attachment #582902 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 8•13 years ago
|
||
I'll fully qualify the class name in the NS_IMPL macros.
Assignee | ||
Comment 9•13 years ago
|
||
Assignee | ||
Comment 10•13 years ago
|
||
Verified that there's no assertion in https://tbpl.mozilla.org/php/getParsedLog.php?id=8039971&tree=Mozilla-Inbound
Comment 11•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Reporter | ||
Comment 12•13 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #5)
> Maybe the trace refcnt assertions just aren't on when I run
> dist/bin/firefox? I see the assertions when I run the vibrator mochitest
> locally.
I see the assertion (in an old build) if I run with XPCOM_MEM_LEAK_LOG=2.
Comment 13•13 years ago
|
||
Yes, refcnt logging isn't enabled by default, you have to set an environment variable to enable it. Mochitest does this by default:
http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/runtests.py#543
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•