Last Comment Bug 861454 - Instant Messaging broken in Thunderbird 21 Beta, by an extension
: Instant Messaging broken in Thunderbird 21 Beta, by an extension
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: 21 Branch
: All All
: -- normal (vote)
: Thunderbird 24.0
Assigned To: Florian Quèze [:florian] [:flo]
:
Mentors:
: 861627 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-12 17:29 PDT by Sören Hentzschel
Modified: 2013-06-25 05:18 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
+
fixed


Attachments
Patch (1.74 KB, patch)
2013-06-06 08:33 PDT, Florian Quèze [:florian] [:flo]
clokep: review+
Details | Diff | Review
Patch with test (5.08 KB, patch)
2013-06-22 14:18 PDT, Florian Quèze [:florian] [:flo]
clokep: review+
Details | Diff | Review

Description Sören Hentzschel 2013-04-12 17:29:05 PDT
Instant Messaging is broken in Thunderbird 21 Beta on OS X. The left sidebar is empty and nothing happens after connecting. Problem does not appear in Thunderbird 20 Beta, but in Thunderbird 21 Beta and higher (Earlybird, Daily). Thunderbird 21 Beta on Windows 8 works as expected.

In the error console there are a log of messages:

Fehler: null has no properties
Quelldatei: resource://gre/components/imContacts.js
Zeile: 1237

and:

Fehler: runnablePrompter:run: [Exception... "'[JavaScript Error: "incomingServer.wrappedJSObject.imAccount is null" {file: "resource://gre/modules/chatHandler.jsm" line: 50}]' when calling method: [nsIMsgAsyncPromptListener::onPromptStart]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/msgAsyncPrompter.js :: <TOP_LEVEL> :: line 26"  data: yes]

Quelldatei: resource://gre/components/msgAsyncPrompter.js
Zeile: 29
Comment 1 Florian Quèze [:florian] [:flo] 2013-04-13 00:24:43 PDT
Is it possible that you used to have the Additional Chat Protocols for Thunderbird add-on in this profile?
Comment 2 Sören Hentzschel 2013-04-13 03:59:28 PDT
yes, it's disabled, but I used the Additional Chat Protocols for Thunderbird add-on with a previous version of Thunderbird in this profile.
Comment 3 alta88 2013-04-30 11:53:15 PDT
*** Bug 861627 has been marked as a duplicate of this bug. ***
Comment 4 alta88 2013-04-30 11:55:15 PDT
chat should not be so fragile that an extension can leave not only chat, but all following folder account processing in a broken state.
Comment 5 Mark Banner (:standard8) 2013-05-07 01:09:25 PDT
(In reply to alta88 from comment #4)
> chat should not be so fragile that an extension can leave not only chat, but
> all following folder account processing in a broken state.

Unfortunately given that add-ons can pretty much do anything, it is entirely possible that an add-on can break our startup & folder account display.

However, in this situation, it does seem that we should be checking that value before hitting it.
Comment 6 Florian Quèze [:florian] [:flo] 2013-05-07 01:50:10 PDT
(In reply to Mark Banner (:standard8) from comment #5)

> Unfortunately given that add-ons can pretty much do anything, it is entirely
> possible that an add-on can break our startup & folder account display.

Mark, this is not really the add-on breaking startup; things work fine when the add-on is there. The problem here is that things are broken once the add-on is uninstalled.

> However, in this situation, it does seem that we should be checking that
> value before hitting it.

We likely just need a null check or a try/catch somewhere.

I'm sure I tested and fixed this specific case last year, so this seems to me like a regression.
Comment 7 Ludovic Hirlimann [:Usul] 2013-05-07 02:33:07 PDT
Can we add a test for this fix so we won't regress anymore ?
Comment 8 Christian Riechers 2013-05-08 12:48:52 PDT
Another effect which may be related:
Troubleshooting Information is empty.
Comment 9 Florian Quèze [:florian] [:flo] 2013-06-04 15:58:31 PDT
(In reply to Florian Quèze [:florian] [:flo] from comment #6)

> I'm sure I tested and fixed this specific case last year

I was referring to bug 736437.
Comment 10 Florian Quèze [:florian] [:flo] 2013-06-05 09:04:36 PDT
Dagger looked into this yesterday in #maildev. The regression seems to be caused by http://hg.mozilla.org/comm-central/diff/ed456f650deb/chat/components/src/imAccounts.js from bug 842183 / https://bugzilla.instantbird.org/show_bug.cgi?id=1855

The likely fix is to move the gAccountsService._keepAccount(this); line to right after this.numericId = parseInt(... as the only dependency _keepAccount has is that aAccount.numericId is set.
Comment 11 Florian Quèze [:florian] [:flo] 2013-06-06 08:33:53 PDT
Created attachment 759157 [details] [diff] [review]
Patch

Patch as described in comment 10.
Comment 12 Florian Quèze [:florian] [:flo] 2013-06-06 08:34:47 PDT
Comment on attachment 759157 [details] [diff] [review]
Patch

I forgot to mention: I haven't tested this at all! (yet)
Comment 13 Patrick Cloke [:clokep] 2013-06-06 08:40:53 PDT
Comment on attachment 759157 [details] [diff] [review]
Patch

This change looks OK, please test it before committing it!
Comment 14 Florian Quèze [:florian] [:flo] 2013-06-22 14:18:35 PDT
Created attachment 766357 [details] [diff] [review]
Patch with test

Same patch, now with an xpcshell test.

I pushed this changeset to try and the new test passes: https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=1f8da1e733d9 (the rest isn't more broken than on the current Thunderbird-Trunk tree).

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