Closed Bug 468656 Opened 16 years ago Closed 15 years ago

TB 3 fails to properly initialize on first start when TB 2 is already installed - 3pane is empty, no accounts listed

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WORKSFORME
Thunderbird 3.0b3

People

(Reporter: mayhemer, Unassigned)

References

Details

(Whiteboard: [no l10n impact])

Attachments

(4 files)

I am using latest TB 2 and I have just a single, default profile. On the last page of TB 3 installer I checked (or better say, left by default checked) option to start TB immediately. TB 3 started but: it didn't offer to choose TB 3 as a default email client and didn't find the default TB 2 profile, started with blank window, no email nor account and no "New in TB 3" tab.

I restarted TB 3 and then all went as expected. Other restarts worked also correct. I have backup of the profile with which I can reproduce it.

I am able to establish a build env for TB 3 and work on this bug.
Probably dup of bug 466311.
Do you get anything of interest in the Error Console when this happens?
Chyba: uncaught exception: [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 :: addIfRecent :: line 789"  data: no]

Apparently dup of bug 466311. I'm just curious why you announced TB 3 b1 and left this bug unfixed in it. My first impression is not good...
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
No, it's something else after closer look. My apologies.

http://mxr.mozilla.org/comm-central/source/mail/base/content/folderPane.js#789
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
788       function addIfRecent(aFolder) {
789         let time = Number(aFolder.getStringProperty("MRUTime")) || 0;
790         if (time <= oldestTime)
791           return;
> I'm just curious why you announced TB 3 b1 and left this bug unfixed in it. 

Unfortunately it wasn't encountered by anyone who tested.  

The console message from comment 3, that is when TB3 starts OK, correct?
Your profile and data appear to be intact?
Summary: TB 3 fails to properly initialize on first run when TB 2 is already installed → TB 3 fails to properly initialize on first start when TB 2 is already installed - 3pane is empty, no accounts listed
(In reply to comment #6)
> > I'm just curious why you announced TB 3 b1 and left this bug unfixed in it. 
> 
> Unfortunately it wasn't encountered by anyone who tested.  
> 

I tough it was the bug I previously marked this as duplicate of.

> The console message from comment 3, that is when TB3 starts OK, correct?

Yes.

> Your profile and data appear to be intact?

It seems ok including account settings but files' content changed, probably a database update? Certain is that it changes after first start, because second start of TB 3 goes well.
Status: REOPENED → NEW
Is there anyone working on this? I can take this bug otherwise.
Attached file And after it was run (deleted) β€”
I think it's save to say you're welcome to take it and work on it!
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
-> me

So far I can tell this:
nsMsgDBFolder::GetStringProperty fails because GetDBFolderInfoAndDB call fails. GetDBFolderInfoAndDB fails because mIsServer is set to true.

mIsServer is set to true from here:
C++:
>	msgbsutl.dll!nsMsgDBFolder::parseURI(int needServer=0x00000000)  Line 2575	C++
 	msgbsutl.dll!nsMsgDBFolder::GetIsServer(int * aResult=0x0012d258)  Line 2694 + 0xd bytes	C++
 	msglocal.dll!nsMsgLocalMailFolder::GetSubFolders(nsISimpleEnumerator * * aResult=0x0012d3f8)  Line 368 + 0x12 bytes	C++
JS:
1 addSubFolders(aFolder = [xpconnect wrapped nsIMsgFolder @ 0x640e230 (native @
0x4b68cf0)]) ["chrome://messenger/content/folderPane.js":838]
    this = [object ChromeWindow @ 0x4d691f8 (native @ 0x4d67038)]
2 anonymous() ["chrome://messenger/content/folderPane.js":852]
    acctMgr = [xpconnect wrapped nsIMsgAccountManager @ 0x63f8b48 (native @ 0x4b
65af8)]
    addSubFolders = [function]
    folders = [xpconnect wrapped nsIMsgFolder @ 0x640e230 (native @ 0x4b68cf0)]
    Ci = [object nsXPCComponents_Interfaces @ 0x54bd220 (native @ 0x55bba08)]
    Cc = [object nsXPCComponents_Classes @ 0x42e46b0 (native @ 0x4b8c640)]
    this = [object Object]
3 ftv__mg_recent() ["chrome://messenger/content/folderPane.js":805]
    items = undefined
    addIfRecent = [function]
    oldestTime = 0
    recentFolders =
    sorter = [function]
    this = [object Object]
4 ftv__rebuild() ["chrome://messenger/content/folderPane.js":648]
    oldCount = null
    this = [object Object]
5 ftv_load(aJSONFile = "folderTree.json", aTree = [object XULElement @ 0x5a58d00
 (native @ 0x4a70368)]) ["chrome://messenger/content/folderPane.js":114]
    session = undefined
    Ci = [object nsXPCComponents_Interfaces @ 0x54bd220 (native @ 0x55bba08)]
    Cc = [object nsXPCComponents_Classes @ 0x42e46b0 (native @ 0x4b8c640)]
    this = [object Object]
6 InitPanes() ["chrome://messenger/content/msgMail3PaneWindow.js":986]
    threadTree = undefined
    folderTree = undefined
    this = [object ChromeWindow @ 0x4d691f8 (native @ 0x4d67038)]
7 LoadPostAccountWizard() ["chrome://messenger/content/msgMail3PaneWindow.js":71
2]
    toolbarset = undefined
    toolbox = undefined
    showDefaultClientDialog = [function]
    feedHandler = undefined
    this = [object ChromeWindow @ 0x4d691f8 (native @ 0x4d67038)]
8 OnLoadMessenger() ["chrome://messenger/content/msgMail3PaneWindow.js":687]
    tabmail = undefined
    defaultHeight = undefined
    defaultWidth = undefined
    this = [object ChromeWindow @ 0x4d691f8 (native @ 0x4d67038)]
9 onload(event = [object Event @ 0x63b6298 (native @ 0x63b61c8)]) ["chrome://mes
senger/content/messenger.xul":1]
    this = [object ChromeWindow @ 0x4d691f8 (native @ 0x4d67038)]


mURI of the nsMsgDBFolder instance is "mailbox://nobody@Local%20Folders". Path is then empty ("/") and cause the following call to GetDBFolderInfoAndDB fail:


>	msglocal.dll!nsMsgLocalMailFolder::GetDBFolderInfoAndDB(nsIDBFolderInfo * * folderInfo=0x0012dc44, nsIMsgDatabase * * db=0x0012dc48)  Line 1319	C++
 	msgbsutl.dll!nsMsgDBFolder::GetStringProperty(const char * propertyName=0x0639ae10, nsACString_internal & propertyValue={...})  Line 1903 + 0x41 bytes	C++
1 addIfRecent(aFolder = [xpconnect wrapped nsIMsgFolder @ 0x619aa40 (native @ 0x
4b591c0)]) ["chrome://messenger/content/folderPane.js":792]
    time = undefined
    this = [object ChromeWindow @ 0x4d7c438 (native @ 0x4d7a278)]
2 ftv__mg_recent() ["chrome://messenger/content/folderPane.js":806]
    items = undefined
    addIfRecent = [function]
    oldestTime = 0
    recentFolders =
    sorter = [function]
    this = [object Object]
3 ftv__rebuild() ["chrome://messenger/content/folderPane.js":648]
    oldCount = null
    this = [object Object]
4 ftv_load(aJSONFile = "folderTree.json", aTree = [object XULElement @ 0x5a80618
 (native @ 0x1175db0)]) ["chrome://messenger/content/folderPane.js":114]
    session = undefined
    Ci = [object nsXPCComponents_Interfaces @ 0xcd9d18 (native @ 0x554af08)]
    Cc = [object nsXPCComponents_Classes @ 0x54e1250 (native @ 0x4d06fa8)]
    this = [object Object]
5 InitPanes() ["chrome://messenger/content/msgMail3PaneWindow.js":986]
    threadTree = undefined
    folderTree = undefined
    this = [object ChromeWindow @ 0x4d7c438 (native @ 0x4d7a278)]
6 LoadPostAccountWizard() ["chrome://messenger/content/msgMail3PaneWindow.js":71
2]
    toolbarset = undefined
    toolbox = undefined
    showDefaultClientDialog = [function]
    feedHandler = undefined
    this = [object ChromeWindow @ 0x4d7c438 (native @ 0x4d7a278)]
7 OnLoadMessenger() ["chrome://messenger/content/msgMail3PaneWindow.js":687]
    tabmail = undefined
    defaultHeight = undefined
    defaultWidth = undefined
    this = [object ChromeWindow @ 0x4d7c438 (native @ 0x4d7a278)]
8 onload(event = [object Event @ 0x4e0b998 (native @ 0x5a79af8)]) ["chrome://mes
senger/content/messenger.xul":1]
    this = [object ChromeWindow @ 0x4d7c438 (native @ 0x4d7a278)]


I am absolutely unfamiliar with this code so if anybody knows what this could be let me know. Otherwise I will start analyzes my self.

For info, I have set the tree folder view to be "Recent folders".
One more info: The callstacks are from modified folderPane.js - on line 791 was inserted a debug alert (one line only), so everything after that line is +1 line in the callstacks from version in hg.
Honza, do you still see the problem? any further insight?
Assignee: honzab.moz → nobody
Component: General → Mail Window Front End
QA Contact: general → front-end
Wayne: was there any change in the code that could fix this bug? Have I retest with a nightly?

I was recently working mainly on firefox3.1 blocking bugs, so there was not much time. In comment 12 and comment 13 there are few discoveries, I was waiting for some feedback if someone that knows this code would see the bug on the first sight.

If this persists I can take a look in few days, however thunderbird is not my primary assignment.
bienvenu I think has been tied up.

we're still at comment 12
I think we need a try catch there - in general, we don't handle errors creating the folder pane well - davida filed a bug about handling unknown folder pane modes recently that's similar.
so there might be two things we can do - a try catch around getstring property, and a try catch around building the folder pane in general - if that fails, we could fall back to the "all folders" mode. But the recent folders mode should not fail when getstring property throws an exception, I don't think. I'll try to attach a proposed fix.
Assignee: nobody → bienvenu
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b2
Whiteboard: [no l10n impact]
Attached patch proposed fix (deleted) β€” β€” Splinter Review
this fixes it for me.

STR 

1. switch to recent folders view in folder pane, shutdown TB.
2. delete panacea.dat and a .msf file for one of your local folders
3. restart. 

An exception gets thrown in addIfRecent
Attachment #360430 - Flags: review?(jminta)
we should also do something similar around the builders in general as I said earlier, but I wouldn't want to switch back to all folders just because a .msf file was missing, along with panacea.dat
Attachment #360430 - Flags: review?(jminta) → review+
Comment on attachment 360430 [details] [diff] [review]
proposed fix

How about just wrapping the getStringProperty line, since that's the only part that should throw? No need to catch the whole block of code. r=jminta with that.
fix checked in with jminta's comment addressed, thx for the review!
Status: ASSIGNED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Depends on: 479632
(In reply to comment #14)
> Honza, do you still see the problem? any further insight?

I do, with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090225 Shredder/3.0b3pre

Reopening.

There is no error in the error console, nor terminal output. Just this warning, probably unrelated:

Warning: Timed textboxes are deprecated. Consider using type="search" instead.
Source File: chrome://messenger/content/messenger.xul
Line: 0
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
moving off to b3 - but without any thing on the error console, I'm not sure how to figure out what's going on.
Target Milestone: Thunderbird 3.0b2 → Thunderbird 3.0b3
As it looks like the indirect cause of this bug is seting of the folder tree view to 'recent folders' what about to change the settings to some other, e.g. default, value before processing the database? That's a workaround but won't fail first TB start for people with settings like me.
Honza, do you still see this with recent nightly builds? I think we fixed an other issue with recent folders view.
(In reply to comment #26)
> Honza, do you still see this with recent nightly builds? I think we fixed an
> other issue with recent folders view.

With today's nightly I can see the "what's new" page but folders are still broken.
Honza, are you still starting up with the recent folders view?
(In reply to comment #28)
> Honza, are you still starting up with the recent folders view?

Yes, I'm still using the same use case. Nothing in the console. Hmm.. maybe I could try to delete my emails, account data and send you a minimal profile to test.
Honza, that would be very helpful if you could do that.
Honza, any more info?
Whiteboard: [no l10n impact] → [no l10n impact] closeme 2009-05-21
p4 since I can't get any more info about this...
Priority: -- → P4
Not sure it's the same but for my own builds I get the all empty panes fairly often. To resolve it one has to run another build (on a different path) - my theory is that it makes the profile get poked to stop caching whatever wrong values it has.
Priority: P4 → --
Magnus, do you see anything on the console when this happens, or any warnings in a debug build?
Can't remember, will have to check the next time it happens.
Ok, so I had it again with my own build (but like i said, may be irrelevant and due to just rebuilding in mailnews and mail.)

I get a bunch of these

Discovering folders for account failed with exception: [Exception... "Cannot find interface information for parameter arg 0 [nsIMsgIncomingServer.rootFolder]"  nsresult: "0x80570006 (NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: ftv__mg_all :: line 1026"  data: no]

Error: uncaught exception: [Exception... "Cannot find interface information for parameter arg 0 [nsIMsgIncomingServer.rootFolder]"  nsresult: "0x80570006 (NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: ftv__mg_all :: line 1035"  data: no]

Didn't do a debug build so I don't know about debug warnings.
And running the profile once with a trunk build "fixed" it as usual.
almost sounds like a component registry corruption issue - running a trunk builds forces a re-registration of all the components
Attached file Profile to reproduce the problem (deleted) β€”
I rechecked with latest (today) nightly. The problem is still there. The profile I send is empty (no emails) and no account, just folders. Anyway, I made it password protected, password sent privately to David :Bienvenu to his bugzilla mail.
I got the profile and tried it out, thx, Honza. It's set to be in the recent folders folder pane mode, and I suspect you have no recent folders. If I cycle to the other folder views, the account show up, and when I restart, the account shows up.
so the question is why aren't there any recent folders, I guess. I'll try to figure that out.
Status: REOPENED → ASSIGNED
Whiteboard: [no l10n impact] closeme 2009-05-21 → [no l10n impact]
(In reply to comment #33)
> Not sure it's the same but for my own builds I get the all empty panes fairly
> often. To resolve it one has to run another build (on a different path) - my
> theory is that it makes the profile get poked to stop caching whatever wrong
> values it has.

Magnus, are you using the recent folders view, or the standard folder pane view?

Honza, none of the db's in the profile I tried had the MRUTime set in the .msf files, so I'm not sure if the reproducible case is a side effect of creating the reproducible case. If you use folders, do they then show up in the recent folders view when you restart?

One way I can think to paper over this issue would be to allow folders with a 0 MRU time into the recent folders list, but I really don't like that. We could look at the date of the folders for local folders, and of the .msf files for IMAP folders, but I'd really just rather trust the MRU Time.

I wonder if this really is a general issue with MRUTime and upgrading from 2.0 to 3.0, or something specific to your profile (other than being in the recent folders view, of course).

If this happened to everyone who went from 2.0 to 3.0 with the recent folders view, then I'd probably block on it; otherwise I wouldn't.
My case is with the standard view.
I tried a new 2.0.21 profile, selected a folder, shutdown in recent folders mode, and then started up a 3.0 nightly - I saw the folder I'd selected in 2.0 in the folder pane. So I think this basically works. Perhaps there are ways to hork your profile, maybe with nightly builds, but I don't know enough to block on this. Honza, if you have new information, I'm willing to reconsider, but it doesn't feel like a blocker at this point.
Flags: blocking-thunderbird3+ → blocking-thunderbird3-
(In reply to comment #42)
> Honza, none of the db's in the profile I tried had the MRUTime set in the .msf
> files, so I'm not sure if the reproducible case is a side effect of creating
> the reproducible case. If you use folders, do they then show up in the recent
> folders view when you restart?
> 

I can confirm that switching to "all folders" view shows emails. When I open Inbox and switch back to "recent folders" view it show up. After restart as well.

It seems to be somehow specific to my profile, but I never installed any nightlies (even if I would, I would certainly backup the profile and return it back when switching back to TB 2.0).

When I start TB 3 with the profile I gave you, do nothing and restart TB 3, it switches to "all folders" view as it would during the second start detect that there are no recent folders. Shouldn't we switch to it on the first start already based on that condition? It would solve the problem of "looking to an emptiness", I don't think it's a problem you loose your recent folders.
Is this still happening with 3.02 builds?
Assignee: bienvenu → nobody
I didn't happen with official 3.0 installation.  Feel free to close it.
thx, Honza.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: