Closed Bug 446678 Opened 16 years ago Closed 16 years ago

chrome mochitest crashes [@NS_NewAtom] on running test_autocomplete2.xul

Categories

(SeaMonkey :: Autocomplete, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.0a1

People

(Reporter: standard8, Assigned: neil)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(2 files)

Start SeaMonkey in _tests/testing/mochitest with python runtest.py --chrome, then click on the test_autocomplete2.xul test. Looks like it gets to the first part of the test (r), and the autocomplete popup displayed.

Seemed to happen after moving to 1.9.1. Crashes on Mac and Linux, times out on Windows.

Stack:

#0  NS_NewAtom (aUTF16String=0x0) at nsCharTraits.h:384
#1  0x00219c51 in nsAtomService::GetAtom (this=0x1a9dd3f0, aString=0x0, aResult=0x2d0454) at /Users/moztest/comm/main/src/mozilla/xpcom/ds/nsAtomService.cpp:51
#2  0x00295b18 in NS_InvokeByIndex_P (that=0x1a9dd3f0, methodIndex=3, paramCount=2, params=0xbfffbb2c) at /Users/moztest/comm/main/src/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp:179
#3  0x13f93710 in XPCWrappedNative::CallMethod (ccx=@0xbfffb914, mode=XPCWrappedNative::CALL_METHOD) at /Users/moztest/comm/main/src/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:2393
#4  0x13f9c66a in XPC_WN_CallMethod (cx=0x1c56cd20, obj=0x0, argc=0, argv=0xbebb68, vp=0x0) at /Users/moztest/comm/main/src/mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp:1473
#5  0x0014b899 in js_Invoke (cx=0x1c56cd20, argc=1, vp=0xbebb60, flags=0) at jsinterp.cpp:1314
#6  0x001372ef in js_Interpret (cx=0x1c56cd20) at /Users/moztest/comm/main/src/mozilla/js/src/jsinterp.cpp:4945
#7  0x0014b913 in js_Invoke (cx=0x1c56cd20, argc=3, vp=0xbebac0, flags=0) at jsinterp.cpp:1331
#8  0x13f8a211 in nsXPCWrappedJSClass::CallMethod (this=0x1c5b0a40, wrapper=0x1c7b46e0, methodIndex=7, info=0x91e068, nativeParams=0xbfffc66c) at /Users/moztest/comm/main/src/mozilla/js/src/xpconnect/src/xpcwrappedjsclass.cpp:1523
#9  0x13f80cc3 in nsXPCWrappedJS::CallMethod (this=0x1c7b46e0, methodIndex=7, info=0x91e068, params=0xbfffc66c) at /Users/moztest/comm/main/src/mozilla/js/src/xpconnect/src/xpcwrappedjs.cpp:565
#10 0x0029aa97 in PrepareAndDispatch (self=0x1c7b4720, methodIndex=<value temporarily unavailable, due to optimizations>, args=0xbfffc754) at /Users/moztest/comm/main/src/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp:93
#11 0x00295ca6 in nsXPTCStubBase::Stub7 (this=0x1c7b4720) at xptcstubsdef.inc:5
#12 0x11ad4793 in nsTreeBodyFrame::PaintCell (this=0xca2b48, aRowIndex=0, aColumn=0x1d315860, aCellRect=@0xbfffc734, aPresContext=0x1c56c530, aRenderingContext=@0x1d3f4e20, aDirtyRect=@0xbfffcf80, aCurrX=@0x0, aPt=@0xbfffc9c4) at /Users/moztest/comm/main/src/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp:3090
#13 0x11ad5d5c in nsTreeBodyFrame::PaintRow (this=0xca2b48, aRowIndex=0, aRowRect=@0xbfffcacc, aPresContext=0x1c56c530, aRenderingContext=@0x1d3f4e20, aDirtyRect=@0xbfffcf80, aPt=@0xbfffcb04) at /Users/moztest/comm/main/src/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp:3018
#14 0x11ad718a in nsTreeBodyFrame::PaintTreeBody (this=0xca2b48, aRenderingContext=@0x1d3f4e20, aDirtyRect=@0xbfffcf80, aPt=@0xbfffcb48) at /Users/moztest/comm/main/src/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp:2821
#15 0x11ad7314 in PaintTreeBody (aFrame=0x0, aCtx=0x0, aDirtyRect=@0x0, aPt=@0x2d0454) at /Users/moztest/comm/main/src/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp:2749
#16 0x11471f30 in nsDisplayGeneric::Paint (this=0xc54a20, aBuilder=0x0, aCtx=0x0, aDirtyRect=@0x0) at ../base/nsDisplayList.h:862
#17 0x113e9f1a in nsDisplayList::Paint (this=0xbfffceb8, aBuilder=0xbfffcc18, aCtx=0x1d3f4e20, aDirtyRect=@0xbfffcb78) at /Users/moztest/comm/main/src/mozilla/layout/base/nsDisplayList.cpp:297
#18 0x11415a5c in nsLayoutUtils::PaintFrame (aRenderingContext=0x1d3f4e20, aFrame=0xbd5bdc, aDirtyRegion=@0xbfffcf60, aBackground=4294967295) at /Users/moztest/comm/main/src/mozilla/layout/base/nsLayoutUtils.cpp:988
#19 0x11424217 in PresShell::Paint (this=0xbbf400, aView=0x1d3e0390, aRenderingContext=0x1d3f4e20, aDirtyRegion=@0xbfffcf60) at /Users/moztest/comm/main/src/mozilla/layout/base/nsPresShell.cpp:5425
#20 0x119a63d2 in nsViewManager::RenderViews (this=0x1c7b3780, aView=0x1d34ec50, aRC=@0x1d3f4e20, aRegion=@0xbfffd018) at /Users/moztest/comm/main/src/mozilla/view/src/nsViewManager.cpp:616
#21 0x119aa1a2 in nsViewManager::Refresh (this=0x1c7b3780, aView=0x1d34ec50, aContext=0x1d3f4e20, aRegion=0x1d3bcad0, aUpdateFlags=1) at /Users/moztest/comm/main/src/mozilla/view/src/nsViewManager.cpp:502
#22 0x119ab51f in nsViewManager::DispatchEvent (this=0x1c7b3780, aEvent=0xbfffd3c4, aStatus=0xbfffd20c) at /Users/moztest/comm/main/src/mozilla/view/src/nsViewManager.cpp:1136
#23 0x1199ea16 in HandleEvent (aEvent=0xbfffd3c4) at /Users/moztest/comm/main/src/mozilla/view/src/nsView.cpp:168
#24 0x13e7f154 in nsChildView::DispatchEvent (this=0x1d34ecc0, event=0xbfffd3c4, aStatus=@0xbfffd2fc) at /Users/moztest/comm/main/src/mozilla/widget/src/cocoa/nsChildView.mm:1787
#25 0x13e79a82 in nsChildView::DispatchWindowEvent (this=0x2d0454, event=@0x0) at /Users/moztest/comm/main/src/mozilla/widget/src/cocoa/nsChildView.mm:1800
#26 0x13e8008b in -[ChildView drawRect:] (self=0x1d34da80, _cmd=0x956cb630, aRect={origin = {x = 0, y = 0}, size = {width = 1250, height = 18}}) at /Users/moztest/comm/main/src/mozilla/widget/src/cocoa/nsChildView.mm:2799
#27 0x960f2984 in -[NSView _drawRect:clip:] ()
#28 0x960f147b in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#29 0x960f1812 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#30 0x960f1812 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#31 0x960efdd1 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] ()
#32 0x961d7ed1 in -[NSNextStepFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] ()
#33 0x960ec237 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] ()
#34 0x9602cc8f in -[NSView displayIfNeeded] ()
#35 0x9602c83d in -[NSWindow displayIfNeeded] ()
#36 0x9602c660 in _handleWindowNeedsDisplay ()
#37 0x95aa19c2 in __CFRunLoopDoObservers ()
#38 0x95aa2d1c in CFRunLoopRunSpecific ()
#39 0x95aa3cf8 in CFRunLoopRunInMode ()
#40 0x93c70da4 in RunCurrentEventLoopInMode ()
#41 0x93c70af6 in ReceiveNextEventCommon ()
#42 0x93c70a31 in BlockUntilNextEventMatchingListInMode ()
#43 0x9602a505 in _DPSNextEvent ()
#44 0x96029db8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#45 0x96022df3 in -[NSApplication run] ()
#46 0x13e634aa in nsAppShell::Run (this=0x14348840) at /Users/moztest/comm/main/src/mozilla/widget/src/cocoa/nsAppShell.mm:591
#47 0x13c4b92e in nsAppStartup::Run (this=0x454020) at /Users/moztest/comm/main/src/mozilla/toolkit/components/startup/src/nsAppStartup.cpp:181
#48 0x000883d2 in XRE_main (argc=6, argv=0xbffff3a4, aAppData=0x40ea00) at /Users/moztest/comm/main/src/mozilla/toolkit/xre/nsAppRunner.cpp:3180
#49 0x00002b6c in main (argc=6, argv=0xbffff3a4) at /Users/moztest/comm/main/src/suite/app/nsSuiteApp.cpp:103
If this fixes it can you push it for me please?

Ideally the atom service wouldn't crash if you passed it a null pointer.
Components.classes["@mozilla.org/atom-service;1"].getService(Components.interfaces.nsIAtomService).getAtom(null)
Maybe someone can create a crashtest and file a bug? Thanks!
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #330820 - Flags: review?
Comment on attachment 330820 [details] [diff] [review]
Possible patch
[Checked in: Comment 7]

Bah, how many KaiRos do we have? Answer: two, and also a kairouz...
Attachment #330820 - Flags: review? → review?(kairo)
This fixes the crash, but the test still hangs (like I think its doing on Windows).
Comment on attachment 330820 [details] [diff] [review]
Possible patch
[Checked in: Comment 7]

I've just tried this again today, and its not crashing, and it is also not hanging.

Therefore I'm going to take the review and say this is ok.
Attachment #330820 - Flags: review?(kairo) → review+
(In reply to comment #4)
> (From update of attachment 330820 [details] [diff] [review])
> I've just tried this again today, and its not crashing, and it is also not
> hanging.
> 
> Therefore I'm going to take the review and say this is ok.
> 
So I wasn't quite right - unfortunately I was running FF not SM.
Additional fixes for this test:

1) fire a "searchcomplete" event in postSearchCleanup
2) when setting nomatch, set it to true not 1 - this is a change I've already proposed in bug 441526 (and got reviewed) but not committed as I am still working on that patch. We don't need any css changes, because they use noMatchesFound at the moment.

Both of these are syncing with what toolkit do.
Attachment #330906 - Flags: superreview?(neil)
Attachment #330906 - Flags: review?(neil)
Attachment #330906 - Flags: superreview?(neil)
Attachment #330906 - Flags: superreview+
Attachment #330906 - Flags: review?(neil)
Attachment #330906 - Flags: review+
I checked this into mozilla-central changeset id: e59d28853906, all platforms are now passing this test -> fixed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Crash Signature: [@NS_NewAtom]
Attachment #330820 - Attachment description: Possible patch → Possible patch [Checked in: Comment 7]
Attachment #330906 - Attachment description: Additional fix → Additional fix [Checked in: Comment 7]
Blocks: 747668
Flags: in-testsuite-
QA Contact: autocomplete
Target Milestone: --- → seamonkey2.0a1
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/0efdaf0f86db
Fix test_autocomplete2.xul crashing on SeaMonkey, and fix the test by implementing the searchcomplete event. crash patch by Neil,r=me,other changes by me,r/sr=Neil.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: