Closed
Bug 473841
Opened 17 years ago
Closed 14 years ago
"ASSERTION: NULL mIconRequest! Multiple calls to OnStopRequest()?"
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: jruderman, Assigned: joe)
References
Details
(Keywords: assertion, intermittent-failure)
Attachments
(1 file)
791 bytes,
patch
|
jaas
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Every once in a while, I get:
###!!! ASSERTION: NULL mIconRequest! Multiple calls to OnStopRequest()?: 'mIconRequest', file /Users/jruderman/central/widget/src/cocoa/nsMenuItemIconX.mm, line 481
This is a continuation of bug 471101, which turned a null-dereference crash into an assertion (pending figuring out why it happens). It sounds like figuring out why it happens requires being able to reproduce this bug reliably :/
This just happened randomly on tinderbox:
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1260646724.1260651373.18170.gz
OS X 10.5.2 mozilla-central leak test build on 2009/12/12 11:38:44
s: moz2-darwin9-slave17
WARNING: NS_ENSURE_TRUE(mMutable) failed: file /builds/slave/mozilla-central-macosx-debug/build/netwerk/base/src/nsSimpleURI.cpp, line 224
###!!! ASSERTION: NULL mIconRequest! Multiple calls to OnStopRequest()?: 'mIconRequest', file /builds/slave/mozilla-central-macosx-debug/build/widget/src/cocoa/nsMenuItemIconX.mm, line 589
nsMenuItemIconX::OnStopRequest(imgIRequest*, int) (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
imgRequestProxy::OnStopRequest(nsIRequest*, nsISupports*, unsigned int, int) (respcmn.c:43)
imgRequest::OnStopRequest(nsIRequest*, nsISupports*, unsigned int) (respcmn.c:43)
ProxyListener::OnStopRequest(nsIRequest*, nsISupports*, unsigned int) (respcmn.c:43)
imgCacheValidator::OnStopRequest(nsIRequest*, nsISupports*, unsigned int) (respcmn.c:43)
nsJARChannel::OnStopRequest(nsIRequest*, nsISupports*, unsigned int) (respcmn.c:43)
nsInputStreamPump::OnStateStop() (respcmn.c:43)
nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) (respcmn.c:43)
nsInputStreamReadyEvent::Run() (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
nsThread::ProcessNextEvent(int, int*) (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
NS_ProcessPendingEvents_P(nsIThread*, unsigned int) (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
nsBaseAppShell::NativeEventCallback() (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
nsAppShell::ProcessGeckoEvents(void*) (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
CFRunLoopRunSpecific (/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
CFRunLoopRunInMode (/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
RunCurrentEventLoopInMode (/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox)
ReceiveNextEventCommon (/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox)
BlockUntilNextEventMatchingListInMode (/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox)
_DPSNextEvent (/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
-[NSApplication run] (/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit)
nsAppShell::Run() (/var/folders/TL/TLg3RrMbFAur2hBCXvCeqk+++TM/-Tmp-//ccP1qjs1.s:256)
nsAppStartup::Run() (respcmn.c:43)
XRE_main (respcmn.c:43)
main (/builds/slave/mozilla-central-macosx-debug/build/xpcom/glue/nsComponentManagerUtils.cpp:)
Blocks: 438871
Whiteboard: [orange]
Comment 2•15 years ago
|
||
Comment 3•15 years ago
|
||
Comment 4•15 years ago
|
||
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1286562276.1286562713.32024.gz&fulltext=1
OS X 10.5 comm-central-trunk debug test crashtest on 2010/10/08 11:24:36
{
REFTEST TEST-START | file:///builds/slave/comm-central-trunk-macosx-debug-unittest-crashtest/build/reftest/tests/content/base/crashtests/231475-1.html
###!!! ASSERTION: NULL mIconRequest! Multiple calls to OnStopRequest()?: 'mIconRequest', file /builds/slave/comm-central-trunk-macosx-debug/build/mozilla/widget/src/cocoa/nsMenuItemIconX.mm, line 549
nsMenuItemIconX::OnStopRequest [widget/src/cocoa/nsMenuItemIconX.mm:550]
imgRequestProxy::OnStopRequest [modules/libpr0n/src/imgRequestProxy.cpp:710]
imgStatusTracker::SendStopRequest [modules/libpr0n/src/imgStatusTracker.cpp:524]
imgRequest::OnStopRequest [modules/libpr0n/src/imgRequest.cpp:959]
ProxyListener::OnStopRequest [modules/libpr0n/src/imgLoader.cpp:2008]
imgCacheValidator::OnStopRequest [modules/libpr0n/src/imgLoader.cpp:2164]
nsJARChannel::OnStopRequest [modules/libjar/nsJARChannel.cpp:907]
nsInputStreamPump::OnStateStop [netwerk/base/src/nsInputStreamPump.cpp:579]
nsInputStreamPump::OnInputStreamReady [netwerk/base/src/nsInputStreamPump.cpp:403]
nsInputStreamReadyEvent::Run [xpcom/io/nsStreamUtils.cpp:113]
nsThread::ProcessNextEvent [xpcom/threads/nsThread.cpp:547]
NS_ProcessPendingEvents_P [nsThreadUtils.cpp:200]
nsBaseAppShell::NativeEventCallback [widget/src/xpwidgets/nsBaseAppShell.cpp:132]
nsAppShell::ProcessGeckoEvents [widget/src/cocoa/nsAppShell.mm:395]
CoreFoundation + 0x733c5
CoreFoundation + 0x73aa8
HIToolbox + 0x302ac
HIToolbox + 0x300c5
HIToolbox + 0x2ff39
AppKit + 0x406d5
AppKit + 0x3ff88
AppKit + 0x38f9f
nsAppShell::Run [widget/src/cocoa/nsAppShell.mm:747]
nsAppStartup::Run [toolkit/components/startup/src/nsAppStartup.cpp:191]
XRE_main [toolkit/xre/nsAppRunner.cpp:3670]
main [suite/app/nsSuiteApp.cpp:103]
seamonkey-bin + 0x170e
REFTEST TEST-PASS | file:///builds/slave/comm-central-trunk-macosx-debug-unittest-crashtest/build/reftest/tests/content/base/crashtests/231475-1.html | (LOAD ONLY)
...
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/comm-central-trunk-macosx-debug-unittest-crashtest/build/reftest/tests/content/base/crashtests/231475-1.html | assertion count 1 is more than expected 0 assertions
}
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1286987397.1286997533.24647.gz
OS X 10.5.2 mozilla-central leak test build on 2010/10/13 09:29:57
Comment 7•15 years ago
|
||
"blocking2.0=?":
Though intermittent, this seems to happen frequently enough that it should be reproducible to analyze.
blocking2.0: --- → ?
Assignee | ||
Comment 8•15 years ago
|
||
I agree we should investigate it, but doing so doesn't block 2.0.
blocking2.0: ? → -
Updated•15 years ago
|
Comment 9•15 years ago
|
||
Comment 10•15 years ago
|
||
Comment 11•15 years ago
|
||
Comment 12•15 years ago
|
||
Comment 13•15 years ago
|
||
Joe, I notice that nsMenuItemIconX::LoadIcon and nsMenuItemIconX::OnStopRequest both call mIconRequest->Cancel instead of the synchronous CancelAndForgetObserver in use elsewhere in the file. Since Cancel is asynchronous, presumably we would null out mIconRequest after calling it, and we could end up triggering the assertion when the final OnStopRequest comes through. I'm not sure what the stacks would look like in this case - does the one in comment 1 match up with my idea?
Comment 14•14 years ago
|
||
Comment 15•14 years ago
|
||
(In reply to comment #13)
> Joe, I notice that nsMenuItemIconX::LoadIcon and nsMenuItemIconX::OnStopRequest
> both call mIconRequest->Cancel instead of the synchronous
> CancelAndForgetObserver in use elsewhere in the file. Since Cancel is
> asynchronous, presumably we would null out mIconRequest after calling it, and
> we could end up triggering the assertion when the final OnStopRequest comes
> through. I'm not sure what the stacks would look like in this case - does the
> one in comment 1 match up with my idea?
Joe, any ideas?
Comment 16•14 years ago
|
||
Assignee | ||
Comment 17•14 years ago
|
||
(In reply to comment #13)
> Joe, I notice that nsMenuItemIconX::LoadIcon and nsMenuItemIconX::OnStopRequest
> both call mIconRequest->Cancel instead of the synchronous
> CancelAndForgetObserver in use elsewhere in the file. Since Cancel is
> asynchronous, presumably we would null out mIconRequest after calling it, and
> we could end up triggering the assertion when the final OnStopRequest comes
> through.
To be clear, are you asking whether OnStopRequest could come in after LoadIcon? Yes, that sounds likely. We can't just blindly switch to CancelAndForgetObserver, though, since that's synchronous and thus re-enters ourselves. In this case it might be OK, though - Boris, do you have any ideas?
The only way that I can see this happening is if we have a current request that hasn't started loading, then try to load a separate URI that doesn't load properly (because we know mIconRequest is null).
![]() |
||
Comment 18•14 years ago
|
||
> Boris, do you have any ideas?
How about we just fix the broken assertion?
Comment 19•14 years ago
|
||
Assignee | ||
Comment 20•14 years ago
|
||
Presuming the description in comment 13 and comment 17 is correct, this seems like the right solution. It will ensure that we only care about OnStopRequest calls from our current icon request.
Assignee: nobody → joe
Attachment #529211 -
Flags: review?(joshmoz)
Attachment #529211 -
Flags: review?(bzbarsky)
Comment 21•14 years ago
|
||
Attachment #529211 -
Flags: review?(joshmoz) → review+
Comment 22•14 years ago
|
||
Comment 23•14 years ago
|
||
Comment 24•14 years ago
|
||
Comment 25•14 years ago
|
||
Comment 26•14 years ago
|
||
Comment 27•14 years ago
|
||
Comment 28•14 years ago
|
||
Comment 29•14 years ago
|
||
Comment 30•14 years ago
|
||
Comment 31•14 years ago
|
||
![]() |
||
Comment 32•14 years ago
|
||
Comment on attachment 529211 [details] [diff] [review]
remove assert, add condition
r=me
Attachment #529211 -
Flags: review?(bzbarsky) → review+
Comment 33•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Updated•13 years ago
|
Keywords: intermittent-failure
Updated•13 years ago
|
Whiteboard: [orange]
You need to log in
before you can comment on or make changes to this bug.
Description
•