Last Comment Bug 742669 - JS error after closing a selected IM conversation, breaking some parts of the Chat UI
: JS error after closing a selected IM conversation, breaking some parts of the...
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: Trunk
: All All
-- normal (vote)
: Thunderbird 16.0
Assigned To: Florian Quèze [:florian] [:flo]
: 740475 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2012-04-05 03:22 PDT by Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout)
Modified: 2012-06-15 04:02 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch (1.52 KB, patch)
2012-06-06 08:58 PDT, Florian Quèze [:florian] [:flo]
mconley: review+
standard8: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description User image Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout) 2012-04-05 03:22:21 PDT
Thunderbird Daily 2012-04-04, Windows XP SP 3 32-bit

After opening a chat with an IRC member by double-clicking his name and then moving the mouse over his name in the left sidebar and closing this chat, the IRC channel again gets focus, but the right column still shows "previous conversations" and not the lists of members of the IRC channel.
Comment 1 User image Florian Quèze [:florian] [:flo] 2012-04-05 05:05:42 PDT
In this case it seems only the top of the right pane (the conversation name and the channel topic) get updated. I'll need to investigate why this happens when closing a conversation (and the selection is moved automatically to the previous item in the list of conversations) and not when the user moves the selection.
Comment 2 User image Florian Quèze [:florian] [:flo] 2012-06-06 08:58:49 PDT
Created attachment 630585 [details] [diff] [review]

When this happens we have a JS strict warning:
components/imConversations.js, line 47: reference to undefined property this._purpleConv[this._currentTargetId]

This means that we are touching attributes of an imConversation that's already destroyed from the point of view of the imConversations service.

The attached patch contains a comment in the code explaining what was actually going wrong.
Comment 3 User image Florian Quèze [:florian] [:flo] 2012-06-06 10:26:00 PDT
*** Bug 740475 has been marked as a duplicate of this bug. ***
Comment 4 User image Mike Conley (:mconley) 2012-06-06 12:20:42 PDT
Comment on attachment 630585 [details] [diff] [review]

Review of attachment 630585 [details] [diff] [review]:

Fixed the problem, and looks good.

::: mail/components/im/content/imconv.xml
@@ +169,5 @@
>            this.convView.destroy();
>            this.convView.parentNode.removeChild(this.convView);
>          }
> +
> +        // If the conversation we are destroying was selected, we should

Nice, clear documentation.
Comment 5 User image Florian Quèze [:florian] [:flo] 2012-06-07 07:30:02 PDT
Comment 6 User image Florian Quèze [:florian] [:flo] 2012-06-12 02:23:23 PDT
Comment on attachment 630585 [details] [diff] [review]

[Approval Request Comment]
We want this fix for Tb15, as the bug causes some user visible issues in the UI.
Comment 7 User image Florian Quèze [:florian] [:flo] 2012-06-15 04:02:13 PDT

Note You need to log in before you can comment on or make changes to this bug.