Last Comment Bug 784729 - Related to new App Button: After update, TB stops showing messages inside folders & message contents; changing folders has no effect. Works in --safe-mode
: Related to new App Button: After update, TB stops showing messages inside fol...
Status: VERIFIED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: General (show other bugs)
: 17 Branch
: x86 All
: -- normal (vote)
: Thunderbird 17.0
Assigned To: Mike Conley (:mconley) - (Needinfo me!)
:
Mentors:
Depends on:
Blocks: TB-AppMenu
  Show dependency treegraph
 
Reported: 2012-08-22 10:57 PDT by AndrzejL
Modified: 2012-08-24 07:32 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v1 (1006 bytes, patch)
2012-08-23 07:51 PDT, Mike Conley (:mconley) - (Needinfo me!)
bwinton: review-
Details | Diff | Review
Patch v2 (4.07 KB, patch)
2012-08-23 09:11 PDT, Mike Conley (:mconley) - (Needinfo me!)
bwinton: review+
Details | Diff | Review

Description AndrzejL 2012-08-22 10:57:29 PDT
User Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120822030558

Steps to reproduce:

My Thunderbird Nightly on my 32 bit Linux got updated so I restarted it.


Actual results:

Since the restart messages in a folders are not being displayed. If I click on let's say "Inbox" it appears to be empty. I have ran the --safe-mode and disabled all the add-ons - no change. I have ran --safe-mode and chose to continue in safe mode. Seems to be working fine.


Expected results:

Yeah... We all know how I love this part... Well... I will humor You... Messages should be displayed inside the folders and when clicked they should display message content and if I switch to another folder Thunderbird should display its content...

Thanks to whoever deals with this.

Regards.

Andrzej
Comment 1 AndrzejL 2012-08-22 11:20:29 PDT
Additional info - if after starting Thunderbird I choose folder which contains messages - it will display the list of them BUT will not show contents of the message. Once chosen folder will display it's list even if I change between folders.

If I start with --safe-mode and choose to "Reset toolbars and controls" it works even if started normally later.

I know what caused it. After upgrade the Menu toolbar was gone but instead there is a new button with 3 horizontal lines. I right clicked on the toolbar and chose Menu toolbar to be displayer and then right clicked again and chose to Customize the toolbar and I remover the new "Menu" icon. This is what is causing trouble. The icon must be displayed otherwise Thunderbird gets wild like a college girls ;).

Regards.

Andrzej
Comment 2 Richard Marti (:Paenglab) 2012-08-23 06:30:15 PDT
When it works in safe-mode it can't be a problem with the AppButton because it is also shown in safe-mode.

Please can you test with all Add-ons disabled and then try to enable one Add-on, restart TB and check if all is working correct (naturally with default toolbar set). If this works enable the next Add-on and check again. Do this until your problem appears again. Then you know which Add-on isn't compatible with the new TB.

Could it be you are using a theme Add-on? Then it could be it doesn't know the new button and messes the appearance.
Comment 3 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 06:42:21 PDT
(In reply to AndrzejL from comment #1)
> Additional info - if after starting Thunderbird I choose folder which
> contains messages - it will display the list of them BUT will not show
> contents of the message. Once chosen folder will display it's list even if I
> change between folders.
> 
> If I start with --safe-mode and choose to "Reset toolbars and controls" it
> works even if started normally later.
> 
> I know what caused it. After upgrade the Menu toolbar was gone but instead
> there is a new button with 3 horizontal lines. I right clicked on the
> toolbar and chose Menu toolbar to be displayer and then right clicked again
> and chose to Customize the toolbar and I remover the new "Menu" icon. This
> is what is causing trouble. The icon must be displayed otherwise Thunderbird
> gets wild like a college girls ;).
> 
> Regards.
> 
> Andrzej

Andrzej:

If you put the App Menu button back, and hide the main menu, are you able to reproduce the problem reliably?

If so, I'd be curious to know if there was anything suspicious in your Error Console.

-Mike
Comment 4 AndrzejL 2012-08-23 07:10:15 PDT
@ Richard.

Like I wrote in my previous posts:

1) Problem still exists with add-ons disabled
2) Problem does not exist with add-ons enabled after re-setting toolbars

Answering Your question - I do not use any 3rd party theme add-on - Default add-on for 17a1 that comes with the Thunderbird + QtCurve gtk theme for KDE 4.8.3 (in latest versions available from kdelook site).

BUT just to humor You I did what You asked for in Your post. I ran Thunderbird in safe mode and I have disabled all add-ons and re-setted toolbars. After Thunderbird has re-started I have right clicked / customized the toolbar and removed the new button. I have restarted Thunderbird with all add-ons disabled and with re-setted toolbars but with new AppMenu button removed - after restart Thunderbird behaves exactly like I described before. No add-on is causing it. Adding the AppMenu button during Thunderbird work fixes the issue. Removing it causes the issue to re-appear.

I know it may sound weird but I am not making it up. Issue exists.

I even went one step further and I have changed gtk theme for KDE4 to 2 different gtk themes to exclude the gtk theme engine problem (restarting Thunderbird after each theme change of course). Still exactly the same result. So there is no connection to gtk theme, add-on theme or any add-on whatsoever. I wish I could provide You with some console output but there is none. No errors. Heck not even a warning.

Summarizing. Only one thing is needed to brake / fix Thunderbird's behaviour - removing the AppMenu button from toolbar / adding it back.

@ Mike

I noticed Your comment while posting this.

I have re-setted the toolbars for the test. All the add-ons are disabled. I have "unticked" the Menu Bar and I have left the AppMenu in the toolbar and restarted Thunderbird. I can browse messages. I have removed the AppMenu button and restarted Thunderbird. 

Error console shows this:

Timestamp: 08/23/2012 03:06:41 PM
Error: TypeError: document.getElementById(...) is null
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 1120

Timestamp: 08/23/2012 03:06:42 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:06:42 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:06:42 PM
Error: TypeError: document.getElementById(...) is null
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 1120

Timestamp: 08/23/2012 03:06:43 PM
Error: TypeError: document.getElementById(...) is null
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 1120

Timestamp: 08/23/2012 03:06:44 PM
Error: TypeError: b.view.selection is null
Source File: chrome://global/content/bindings/tree.xml
Line: 1038

Timestamp: 08/23/2012 03:06:44 PM
Error: TypeError: this.view.selection is null
Source File: chrome://global/content/bindings/tree.xml
Line: 0

Timestamp: 08/23/2012 03:06:44 PM
Error: TypeError: b.view.selection is null
Source File: chrome://global/content/bindings/tree.xml
Line: 1086

Timestamp: 08/23/2012 03:06:45 PM
Error: TypeError: b.view.selection is null
Source File: chrome://global/content/bindings/tree.xml
Line: 1038

Timestamp: 08/23/2012 03:06:45 PM
Error: TypeError: b.view.selection is null
Source File: chrome://global/content/bindings/tree.xml
Line: 1086

Timestamp: 08/23/2012 03:06:46 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:06:46 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:07:12 PM
Error: TypeError: this.view.selection is null
Source File: chrome://global/content/bindings/tree.xml
Line: 0

Timestamp: 08/23/2012 03:07:12 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:07:12 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:07:15 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Timestamp: 08/23/2012 03:07:15 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

I hope that this will throw some light on the matter.

Regards.

Andrzej
Comment 5 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:17:33 PDT
The first error is strange:

Timestamp: 08/23/2012 03:06:41 PM
Error: TypeError: document.getElementById(...) is null
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 1120

Line 1120 is this:

document.getElementById("appmenu_fileAttachmentMenu").setAttribute("disabled", "true");

document.getElementById("appmenu_fileAttachmentMenu") is null for some reason, which is strange, since it's defined here: http://mxr.mozilla.org/comm-central/source/mail/base/content/mailWindowOverlay.xul#2071


Andrzej:  just to confirm - these errors come up when the button is in the toolbar, and the menulist is hidden, and you cannot read your messages, correct?

Also, does the button *work*? If you click on the button, can you see any menu items?
Comment 6 AndrzejL 2012-08-23 07:18:33 PDT
@ Mike

Additional info.

I have enabled all my add-ons and restarted Thunderbird.

Timestamp: 08/23/2012 03:16:40 PM
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2436"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2438

Only this message repeats itself in error console.

That's with working Thunderbird with AppMenu in toolbar.

Regards.

Andy
Comment 7 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:19:27 PDT
Andy:

Hm,

> That's with working Thunderbird with AppMenu in toolbar.

So there are times when you have the AppMenu in the toolbar, and your messages display just fine?

-Mike
Comment 8 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:23:24 PDT
Cannot reproduce locally.
Comment 9 AndrzejL 2012-08-23 07:33:06 PDT
No no sorry about the confusion.

Previous errors were from the error console when the add-on were disabled, Menu bar was hidden and no AppMenu was in toolbar. Thunderbird is misbehaving then.

The second (repeating) error is what I get with working Thunderbird with Add-ons enabled and with Menu Bar displayed. I think it's related to the Firetray add-on as I have seen it before.

Regards.

Andrzej
Comment 10 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:35:44 PDT
(In reply to AndrzejL from comment #9)
> No no sorry about the confusion.
> 
> Previous errors were from the error console when the add-on were disabled,
> Menu bar was hidden and no AppMenu was in toolbar. Thunderbird is
> misbehaving then.
> 
> The second (repeating) error is what I get with working Thunderbird with
> Add-ons enabled and with Menu Bar displayed. I think it's related to the
> Firetray add-on as I have seen it before.
> 
> Regards.
> 
> Andrzej

Ok, let's deal with one problem at a time.

It sounds from your original bug report as if your message list and folder trees are busted if your add-ons are disabled, the App Menu button is in the toolbar, and the main menu is collapsed by default.  Is this correct?

If this is correct, this is what I'd like to focus on fixing in this bug.

If this is correct, please put yourself into that broken state, and then paste any messages from the Error Console in this bug.

If I'm mistaken about any of this, please let me know.

Thanks!

-Mike
Comment 11 AndrzejL 2012-08-23 07:38:06 PDT
@ Mike.

Yes. The messages are displayed correctly ONLY if AppMenu button is in the toolbar. Button unfolds itself when present in the toolbar.

Nothing else breaks the Thunderbird behaviour. Only thing needed to reproduce error is to remove AppMenu button from toolbar and restart Thunderbird. Then switching between folders will not display messages from the newly clicked folder but from old folder (the first clicked one). Clicking on the messages from first folder does not displays it's content.

Regards.

Andrzej
Comment 12 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:42:33 PDT
Ah, OK, confirmed. Thanks for clearing that up, Andy.

STR:

1) Remove the App Menu button from the toolbar
2) Restart Thunderbird
3) Click on some folders in the folder pane

What happens?

The messages for the selected folders do not display, and then the message list pane is completely broken (selected messages do not display in the preview pane).

What's expected?

Not that.


This appears to be the problem:

Timestamp: 23/08/2012 10:41:44 AM
Error: TypeError: document.getElementById(...) is null
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 1120

This line assumes the App Menu exists in the document when that's not necessarily true.
Comment 13 AndrzejL 2012-08-23 07:44:38 PDT
@ Mike

"Ok, let's deal with one problem at a time.

It sounds from your original bug report as if your message list and folder trees are busted if your add-ons are disabled, the App Menu button is in the toolbar, and the main menu is collapsed by default.  Is this correct?"

No it's not correct Mike. Sorry about the confusion again. My previous posts were just gathering the info as I was testing it.

This is the final version:

Add-ons enabled or disabled - makes no difference. Menu bar present or not - makes no difference. AppMenu button removed from toolbar - that busts the message list and switching between folders. Nothing else does.

Regards.

Andrzej
Comment 14 AndrzejL 2012-08-23 07:47:52 PDT
@ Mike:

"Ah, OK, confirmed. Thanks for clearing that up, Andy."

No worries mate. I thought I was going bananas for a while :D.

"STR:

1) Remove the App Menu button from the toolbar
2) Restart Thunderbird
3) Click on some folders in the folder pane

What happens?

The messages for the selected folders do not display, and then the message list pane is completely broken (selected messages do not display in the preview pane).

What's expected?

Not that."

Correct! I am very glad You were able to reproduce the error.

"This appears to be the problem:

Timestamp: 23/08/2012 10:41:44 AM
Error: TypeError: document.getElementById(...) is null
Source File: chrome://messenger/content/msgHdrViewOverlay.js
Line: 1120

This line assumes the App Menu exists in the document when that's not necessarily true."

Thanks for taking Your time and for assigning Yourself to fix it.

Regards.

Andrzej
Comment 15 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:49:08 PDT
(In reply to AndrzejL from comment #14)
> Thanks for taking Your time and for assigning Yourself to fix it.
> 

My pleasure - thanks for taking the time to file a bug and make Thunderbird better. :)
Comment 16 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 07:51:35 PDT
Created attachment 654616 [details] [diff] [review]
Patch v1

Simply adds a conditional to account for the case when the App Menu button is not being used.
Comment 17 AndrzejL 2012-08-23 07:58:59 PDT
@ Mike

"My pleasure - thanks for taking the time to file a bug and make Thunderbird better. :)"

Since I am not a coder this is the only way I can repay Thunderbird for their awesome apps. Testing, reporting - that's my way of saying thanks ;).

"Created attachment 654616 [details] [diff] [review] [diff] [review]
Patch v1

Simply adds a conditional to account for the case when the App Menu button is not being used."

How can I test it before it's added to the next upgrade?

Regards.

Andy
Comment 18 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 08:01:35 PDT
(In reply to AndrzejL from comment #17)
> How can I test it before it's added to the next upgrade?

Hm. If you're not a coder, I'll assume you're not used to the process of applying patches or doing a build.

I'll email you a link to a build.

-Mike
Comment 19 AndrzejL 2012-08-23 08:05:47 PDT
Thanks :).

Regards.

Andrzej
Comment 20 Blake Winton (:bwinton) (:☕️) 2012-08-23 08:36:26 PDT
Comment on attachment 654616 [details] [diff] [review]
Patch v1

>+++ b/mail/base/content/msgHdrViewOverlay.js
>@@ -1112,17 +1112,23 @@ function ShowMessageHeaderPane()
>+  let appMenuNode = document.getElementById("appmenu_fileAttachmentMenu");
>+  if (appMenuNode)
>+    appMenuNode.setAttribute("disabled", "true");

Seems okay, but…

mail/base/content/mailWindowOverlay.js seems to also have a bunch of places that use "document.getElementById\(.appmenu" without checking whether it exists or not.  I suggest we just fix them all in this bug.  (http://mxr.mozilla.org/comm-central/search?string=\%28.appmenu&regexp=1&find=mailWindowOverlay.js&findi=&filter=document.getElementById&hitlimit=&tree=comm-central has the list.)

Thanks,
Blake.
Comment 21 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 09:11:42 PDT
Created attachment 654651 [details] [diff] [review]
Patch v2

The good news is that most of the cases where we query for App Menu nodes is in functions that are only called from onpopupshowing for the App Menu itself (so we can assume if the functions are called, that the App Menu is available).

The only function that doesn't fall into this category is view_init(), which I've updated to check for the availability of the nodes before updating them.
Comment 22 AndrzejL 2012-08-23 10:59:40 PDT
I have tested the build with the latest patch from the link sent to me by Mike (not thoroughly but just against the current bug) and I must say it works as expected.

I did nothing else but removing the AppMenu button from the taskbar and restarted the application. This was enough previously for the misbehavior to begin. This time application behaves as expected.

Thanks Mike!

Regards.

Andrzej
Comment 23 Blake Winton (:bwinton) (:☕️) 2012-08-23 11:15:11 PDT
Comment on attachment 654651 [details] [diff] [review]
Patch v2

Looks good.  r=me!
Comment 24 Mike Conley (:mconley) - (Needinfo me!) 2012-08-23 11:22:35 PDT
comm-central: https://hg.mozilla.org/comm-central/rev/2a012b86e886
Comment 25 AndrzejL 2012-08-24 07:32:56 PDT
Well done folks.

Yesterday before I have installed the build from the Mike's link I backed up my older ~/thunderbird folder with Thunderbird installation (not the profile just the install). I moved it to another place so that I could check if the upgrade (which I assumed would be available for everyone little bit later) will fix the issue. Today I have renamed Mike's build installation and replaced it with my older installation. I have confirmed that it was messed up (which was normal as this was the install without the fix) and went to Help > About Daily to check for upgrades. I have found a 3.3 MB upgrade waiting for me there. It was downloaded and applied. After restart my older build which was messed up before - was now fixed and ready to use.

Thanks again to Mike and everyone else who have helped fixing it.

May the source be with You.

Regards.

Andrzej

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