Closed Bug 470474 Opened 17 years ago Closed 16 years ago

gDBView.hdrForFirstSelectedMessage doesn't work for cross folder saved searches in the standalone msg window

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: mkmelin, Assigned: rain1)

References

Details

Attachments

(1 file)

As noted in bug 466925 gDBView.hdrForFirstSelectedMessage doesn't work for saved searches, when viewing msgs in the standalone msg window. This makes marking as read/starred/deleted cause errors. An error occurred updating the cmd_delete command; =[Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgDBView.hdrForFirstSelectedMessage]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: chrome://messenger/content/mailWindowOverlay.js :: SelectedMessagesAreDeleted :: line 726" data: no]
I can't seem to reproduce this with 20081230 trunk on Windows, IMAP/local saved searches, and the standalone message window (opened using a double click on the message). Is there an STR to follow?
Oh, and the cause of this bug (if there is one) looks identical to that of bug 395495 .
I just double click a message to open in standalone message window and this exception shows in the error console: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgDBView.hdrForFirstSelectedMessage]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: chrome://messenger/content/mailWindowOverlay.js :: UpdateJunkButton :: line 1647" data: no]
Putting this on the blocking radar, if we don't have time to fix it we should at least put back some try/catches in js, so the exception doesn't blow things up more than it needs to.
Flags: blocking-thunderbird3+
Whiteboard: [fix or put back som try/catch in js]
Target Milestone: --- → Thunderbird 3.0b3
This is probably caused by null mTreeSelection. I notice that nsMsgDBView has some specific code to look for this and react in a similar case, for example: // if we don't have an tree selection we must be in stand alone mode.... if (!mTreeSelection) { *key = m_currentlyDisplayedMsgKey; return NS_OK; } It should not be that hard to implement something similar in the search view. It might be willing to take this if I could reproduce, which I can't.
You're right, I can't reproduce this anymore. ->WFM
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Actually, I still see this, though you have to back out bug 476418 since that masks it. rkent: this is cross folder saved searches only - similar to bug 395495.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: gDBView.hdrForFirstSelectedMessage doesn't work for saved searches in the standalone msg window → gDBView.hdrForFirstSelectedMessage doesn't work for cross folder saved searches in the standalone msg window
Whiteboard: [fix or put back som try/catch in js]
sid, are you interested in taking this on?
Yes, I'll take this.
Assignee: bienvenu → sid.bugzilla
Status: REOPENED → ASSIGNED
Attached patch patchSplinter Review
This basically does what rkent says in comment 5, except it uses the currently displaying view index as we don't have an m_db to use the key with.
Attachment #375712 - Flags: superreview?(bienvenu)
Attachment #375712 - Flags: review?(bugzilla)
Attachment #375712 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 375712 [details] [diff] [review] patch Looks good: r=Standard8. I've pushed this already: http://hg.mozilla.org/comm-central/rev/110aa71394ef
Attachment #375712 - Flags: review?(bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: