Closed Bug 955671 Opened 10 years ago Closed 10 years ago

Awesometab fails when you change the protocol being used in a conversation

Categories

(Instantbird Graveyard :: Conversation, defect)

x86
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nhnt11, Assigned: aleth)

References

Details

Attachments

(1 file, 2 obsolete files)

*** Original post on bio 2223 at 2013-10-16 13:48:00 UTC ***

STR:
1. Open a conversation with a contact that has multiple linked buddies
2. Change the protocol (or account) being used (using the protocol icon at the top right)
3. Open the awesometab - you'll see two items for the same conversation
4. Close the conversation.
5. Open another awesometab - it will not display any items, and the following error is shown in the console:

Timestamp: 16/10/13 7:15:47 PM
Error: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: '[JavaScript Error: "aUIConv.target is null" {file: "resource://gre/components/ibConvStatsService.js" line: 691}]' when calling method: [ibIConvStatsService::getFilteredConvs]
Source File: chrome://instantbird/content/newtab.xml
Line: 234
Blocks: 955013
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 2223 as attmnt 2990 at 2013-10-29 13:39:00 UTC ***

This is actually due to two bugs in imConversations:
1) A memory leak due to not deleting all _uiConv references to a given uiConv object.
2) Returning uiConv's multiple times when they have more than one prplConversation associated with them.
Attachment #8354771 - Flags: review?(florian)
Assignee: nobody → aleth
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 2223 as attmnt 2991 at 2013-10-29 13:49:00 UTC ***

Remove pointless Object.keys, sorry for the bugspam.
Attachment #8354772 - Flags: review?(florian)
Comment on attachment 8354771 [details] [diff] [review]
Patch

*** Original change on bio 2223 attmnt 2990 at 2013-10-29 13:49:33 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354771 - Attachment is obsolete: true
Attachment #8354771 - Flags: review?(florian)
Attached patch PatchSplinter Review
*** Original post on bio 2223 as attmnt 2992 at 2013-10-29 14:13:00 UTC ***

Improved comment, and makes the code a bit more careful about the existence of and iteration on _uiConv.
Attachment #8354773 - Flags: review?(florian)
Comment on attachment 8354772 [details] [diff] [review]
Patch

*** Original change on bio 2223 attmnt 2991 at 2013-10-29 14:13:16 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354772 - Attachment is obsolete: true
Attachment #8354772 - Flags: review?(florian)
Comment on attachment 8354773 [details] [diff] [review]
Patch

*** Original change on bio 2223 attmnt 2992 at 2013-10-31 19:55:25 UTC ***

This seems reasonable.

I think the intent of the original code was to remove the entry from _uiConv when a prpl conv was no longer the default target of the UI conversation; but that approach may have undesirable consequences.
Attachment #8354773 - Flags: review?(florian) → review+
Whiteboard: [checkin-needed]
*** Original post on bio 2223 at 2013-11-02 17:04:51 UTC ***

http://hg.instantbird.org/instantbird/rev/06a8cb02cdaf
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed]
Target Milestone: --- → 1.5
*** Original post on bio 2223 at 2013-11-03 13:23:44 UTC ***

Fix test-bustage: http://hg.instantbird.org/instantbird/rev/d703b4d23274
You need to log in before you can comment on or make changes to this bug.