Closed Bug 314027 Opened 19 years ago Closed 19 years ago

Search messages only searches the first message

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bertramf, Assigned: hyc)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050715 Firefox/1.0.6 SUSE/1.0.6-4.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051027 SeaMonkey/1.1a

When searching messages (either quick search, or Tools->Search Messages), the search criteria are applied only to the first message per folder, and the search results will show zero or one message per searched folder (depending on if the first message matched).

For example, searching for "Sender contains @" in all your folders will return the first message of each folder, but I would expect to see all messages.

Reproducible: Always

Steps to Reproduce:
Type @ in the quick search field
Actual Results:  
Only the first message will remain

Expected Results:  
All messages remain

Self-compiled seamonkey, 20051027 trunk, SuSE9.2, gtk2-2.4.9-10.1, glib2-2.4.6-5, glibc-2.3.3-118, kernel-smp-2.6.8-24.17
I'm only seeing this in a CVS build.  valgrind sees this:

Conditional jump or move depends on uninitialised value(s)
 nsMsgSearchOfflineMail::MatchTerms(nsIMsgDBHdr*, nsISupportsArray*, char const*, nsIMsgSearch
ScopeTerm*, nsIMsgDatabase*, char const*, unsigned, int, nsMsgSearchBoolExpression**, int*) (nsMsgLocalSearch.cpp:616)
 nsMsgSearchOfflineMail::MatchTermsForSearch(nsIMsgDBHdr*, nsISupportsArray*, char const*, nsI
MsgSearchScopeTerm*, nsIMsgDatabase*, nsMsgSearchBoolExpression**, int*) (nsMsgLocalSearch.cpp:363)
 sMsgSearchOfflineMail::Search(int*) (nsMsgLocalSearch.cpp:668)
 nsMsgSearchScopeTerm::TimeSlice(int*) (nsMsgSearchTerm.cpp:1502)
 nsMsgSearchSession::TimeSliceSerial(int*) (nsMsgSearchSession.cpp:700)
 nsMsgSearchSession::TimeSlice(int*) (nsMsgSearchSession.cpp:664)

this is bustage from bug 295088.  http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/search/src/nsMsgLocalSearch.cpp&rv=1.70#616
err is being used uninitialized.
Assignee: mail → hyc
Status: UNCONFIRMED → NEW
Depends on: 295088
Ever confirmed: true
Doh... Probably a cut'n'paste error. Try this.
Attachment #201091 - Flags: review?(bienvenu)
Status: NEW → ASSIGNED
> Doh... Probably a cut'n'paste error. Try this.

Thanks a lot, problem is fixed.

Comment on attachment 201091 [details] [diff] [review]
Fix stupid use of err

I'll check this in, though I think I'll keep the if (NS_FAILED(err) part the way it is.
Attachment #201091 - Flags: review?(bienvenu) → review+
fix checked in, slightly tweaked.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I assume that this bug was not only PC/Linux, but All/All. If so, please change it.
OS: Linux → All
Hardware: PC → All
bug 295088 fix was checked into 1.8.1 branch, so I checked this one in too.
Keywords: fixed1.8.1
Component: MailNews: Search → MailNews: Message Display
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: