Closed Bug 175324 Opened 22 years ago Closed 22 years ago

Hang in search (lxr)

Categories

(SeaMonkey :: Search, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: frb, Assigned: mozilla)

References

()

Details

(Keywords: hang)

Attachments

(3 files, 1 obsolete file)

User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20021016 Build Identifier: Mozilla/5.0 (X11; Linux i686; U;) Gecko/20021016 Mozilla hangs when trying to search for \*\*\* in lxr text search Reproducible: Always Steps to Reproduce: 1> Go to lxr.mozilla.org/Seamonkey 2> Enter \*\*\* into Text Search 3> Click search, or hit enter 4> Watch mozilla redirect to search URL, and hang Actual Results: Mozilla hangs Expected Results: Completed the search
confirming. seeing this as well, on a cvs build from today. no duplicates found.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: hang
Attached file stack
==> Search
Assignee: asa → sgehani
Component: Browser-General → Search
QA Contact: asa → claudius
http://lxr.mozilla.org/mozilla/source/xpfe/components/search/src/nsInternetSearchService.cpp#5326 resultItemStart is 1446 nsString_Find(resultItemEndStr...) returns -1, so gets reset to stopIndex (1391), which is less than resultItemStart bad things then happen when trying to create resultItem. probably uncovered by bug 120712
I believe this is a duplicate of bug 174661. What do you think?
Attached patch patch (obsolete) — Splinter Review
patch that fixes the hang. rjc: is this the right thing to do? end-start<2 would be simpler but less clear. do we still need to check resultItem for IsEmpty?
Keywords: patch
*** Bug 174661 has been marked as a duplicate of this bug. ***
can we get some action on this bug/fix? I see this hang a lot, and it can be on normal searches.
*** Bug 179994 has been marked as a duplicate of this bug. ***
*** Bug 148134 has been marked as a duplicate of this bug. ***
*** Bug 177674 has been marked as a duplicate of this bug. ***
Changing summary to reflect the actual problem. Old summary: "hang when searching for "\*\*\*" in lxr"
Summary: hang when searching for "\*\*\*" in lxr → Hang in search, duplicate Netscape search icon
For my Mozilla Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021103 the duplicate NETSCAPE button is caused by the files SBWeb_01.gif SBWeb_01.src Would be interesting to know what phshes these files into my searchplugins from time to time!
I always get the message ! You did not specify a file to attach" when I try to create my second att. So please have a look to http://home.t-online.de/home/Bielefeld__Buss_oHG/mozilla/SBWeb_01.src
Rainer: I don't know why you're getting two Netsacpe icons, but it's not this bug. resummarizing a bit
Summary: Hang in search, duplicate Netscape search icon → Hang in search (lxr)
Stack of hang from bug 179994: 271 nsAppShellService::Run() 271 nsAppShell::Run() 271 nsMacMessagePump::DoMessagePump() 271 nsMacMessagePump::DispatchEvent(int, EventRecord*) 271 Repeater::DoRepeaters(EventRecord const&) 271 nsMacNSPREventQueueHandler::RepeatAction(EventRecord const&) 271 nsMacNSPREventQueueHandler::ProcessPLEventQueue() 271 nsEventQueueImpl::ProcessPendingEvents() 271 PL_ProcessPendingEvents 271 PL_HandleEvent 271 nsARequestObserverEvent::HandlePLEvent(PLEvent*) 271 nsOnStopRequestEvent::HandleEvent() 271 nsHttpChannel::OnStopRequest(nsIRequest*, nsISupports*, unsigned) 271 InternetSearchDataSource::OnStopRequest(nsIRequest*, nsISupports*, unsigned) 271 InternetSearchDataSource::webSearchFinalize(nsIChannel*, nsIInternetSearchContext*) 271 InternetSearchDataSource::ParseHTML(nsIURI*, nsIRDFResource*, nsIRDFResource*, unsigned short const*, int) 271 nsAutoString::nsAutoString[in-charge](unsigned short const*, int) 271 nsAutoString::nsAutoString[unified](unsigned short const*, int) 271 nsAString::do_AppendFromElementPtrLength(unsigned short const*, unsigned) 271 nsAString::do_AppendFromReadable(nsAString const&) 271 nsAString::UncheckedAppendFromReadable(nsAString const&) 271 nsString::SetLength(unsigned) 271 nsString::SetCapacity(unsigned) 271 nsStrPrivate::GrowCapacity(nsStr&, unsigned) 271 nsStrPrivate::GrowCapacity(nsStr&, unsigned) [STACK TOP] I bet a debug build would assert here.
OS: Linux → All
Hardware: PC → All
271 InternetSearchDataSource::ParseHTML(nsIURI*, nsIRDFResource*, nsIRDFResource*, unsigned short const*, int) 271 nsAutoString::nsAutoString[in-charge](unsigned short const*, int) http://lxr.mozilla.org/seamonkey/source/xpfe/components/search/src/nsInternetSearchService.cpp#5353 nsAutoString resultItem(&htmlPage[resultItemStart], resultItemEnd - resultItemStart - 1); I suspect |resultItemEnd - resultItemStart - 1| is negative in this case, turning into a large number (the nsAutoString constructor takes PRInt32, and calls Append, inherited from nsAString, which takes a PRUInt32). I don't think we actually assert on this right now, I can add that. rjc, could |resultItemEnd - resultItemStart - 1| ever be negative? If so, would a simple guard against negative lengths suffice?
jag: see comment 4 and comment 6
Attachment #103484 - Flags: review+
Comment on attachment 103484 [details] [diff] [review] patch jag, could you sr=?
Attachment #103484 - Flags: superreview?(jaggernaut)
Comment on attachment 103484 [details] [diff] [review] patch Missed this patch completely :-) Yeah, that'd do the trick. What would you think about: if (resultItemEnd - resultItemStart - 1 <= 0) I think it's a little clearer than the < 1 test. sr=jag with and without this stylistic change.
Attachment #103484 - Flags: superreview?(jaggernaut) → superreview+
Attached patch patch using <=0Splinter Review
<=0 sounds good to me
Attachment #103484 - Attachment is obsolete: true
Comment on attachment 106424 [details] [diff] [review] patch using <=0 carrying forward r=rjc and sr=jag rjc: could you check this in? thanks.
Attachment #106424 - Flags: superreview+
Attachment #106424 - Flags: review+
Fix checked in.
Assignee: sgehani → rjc
.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: