Closed Bug 591744 Opened 14 years ago Closed 14 years ago

All calendars and events lost after restart [Error: Timezone Service not initialized]

Categories

(Calendar :: Internal Components, defect)

x86
All
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: Fallen)

References

Details

(Whiteboard: [needed beta][no l10n impact])

Attachments

(3 files, 5 obsolete files)

Lightning 1.1a1pre (BuildID: 20100829013809) with Mozilla/5.0 (Windows NT 6.1; rv:2.0b5pre) Gecko/20100827 Thunderbird/3.2a1pre (BuildID: 20100827033932) Steps to reproduce: 1. Create clean Thunderbird profile, install Lightning, restart 2. Create at least one event in the default Home calendar 3. Restart Thunderbird Actual Result: List of calendars is empty. Calendar view is broken. No events are displayed. Error Console displays: [[[ Error: Can't create calendar for 2464eebf-d0f0-47e5-880a-94ac867526c5 (storage, moz-storage-calendar://): [Exception... "'<error>' when calling method: [calICalendar::id]" nsresult: "0x804a0008 (<unknown>)" location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///.../calendar-js/calCalendarManager.js :: cmgr_assureCache :: line 751" data: no] ]]] [[[ Error: Calling Timezone Service before its initialized! Stack: 1: [resource://calendar/modules/calUtils.jsm -> file:///.../calendar-js/calTimezoneService.js:183] anonymous 2: [resource://calendar/modules/calUtils.jsm -> file:///.../calendar-js/calTimezoneService.js:297] calTimezoneService_getTimezone 3: [resource://calendar/modules/calUtils.jsm -> file:///.../calendar-js/calTimezoneService.js:358] anonymous 4: [null:0] null 5: [chrome://calendar/content/calUtils.js:218] calendarDefaultTimezone 6: [chrome://calendar/content/calendar-base-view.xml:313] ]]] [[[ Error: uncaught exception: [Exception... "'Component not initialized' when calling method: [calITimezoneService::defaultTimezone]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: chrome://calendar/content/calUtils.js :: calendarDefaultTimezone :: line 218" data: no] ]]] [[[ Error: uncaught exception: [Exception... "'<error>' when calling method: [calICalendar::id]" nsresult: "0x804a0008 (<unknown>)" location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///.../calendar-js/calCalendarManager.js :: anonymous :: line 627" data: no] ]]]
Hmm I've had this once before, but I couldn't quite reproduce it. Looks like the startup service is failing somehow and not initializing the timezone service.
Flags: blocking-calendar1.0+
Whiteboard: [needed beta][no l10n impact]
I'm getting a new harddrive with lots of space this week, so I'll set up a windows build environment and try to reproduce this.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Whiteboard: [needed beta][no l10n impact] → [needed beta][no l10n impact][needs Windows testing Fallen]
I can confirm this under windows. Next I'll try to find out whats happening.
Whiteboard: [needed beta][no l10n impact][needs Windows testing Fallen] → [needed beta][no l10n impact][needs patch]
Strange stuff...I got this error on a clean profile after a full build. Then I started adding some WARN() statements to see what is being called when. At one point it then magically started working, so I tried a clean profile. Now I'm back to no patches and removed the whole profiles folder, and the error is gone. Stefan, any tips on how to better reproduce?
So in 30% of cases I can reproduce, this should be enough to fix the bug. Not an easy one, since the addon API is async it seems sometimes the views already start being initialized before the tz api is done.
OS: Windows 7 → All
The bug occurs one out of three times of starting TB in my environment. The root cause is at http://mxr.mozilla.org/comm-central/source/calendar/base/src/calTimezoneService.js#241 __initDB() is async called. i.e. the bug occurs when getTimezoneExt() is called after this.ensureInitialized() (defined at http://mxr.mozilla.org/comm-central/source/calendar/base/src/calTimezoneService.js#181) is called. It looks like the addon manager APIs such as getAddonByID() don't meet the requirements here. Can we change back to use the method used in TB 3.1?
Attachment #488442 - Flags: review?(philipp)
Comment on attachment 488442 [details] [diff] [review] use nsIExtensionManager to get sqlite file directly. Sorry, but we can't do this. Trunk removed nsIExtensionManager in favor of an async API, which sucks for us. We won't have trouble if the next release is from comm-1.9.2 as planned though.
Attachment #488442 - Flags: review?(philipp) → review-
Blocks: 621746
In my case, the bug "mutated" a bit: - Calendar view is broken. / No events are displayed. - But list of calendars is not empty. And you can activate (tick) all calendars, what however doesn't have an impact. - Also I see a grayed out "task filter area" above the calendar list. I attach a screeshot a my calendar view and my error console entries. Maybe this gives you further hints for a solution. Thanks.
Attached file Error console β€”
Attached patch Fix - v1 (obsolete) β€” β€” Splinter Review
Ok, I've tested this on windows and linux. Unfortunately its a quite drastic step, but I see no other way. On the upside, this should help us in the future when the amount of asynchronous load increases. The concept is to load all services in order (which we have been doing partially) that are needed to startup calendar. Then we dispatch an event, similar to how mail has been doing it ("calendar-startup-done"). This is the replacement for our former "load" event. This only needs to be done for code that uses calendar components. Trunk might actually be usable after this patch :)
Attachment #488442 - Attachment is obsolete: true
Attachment #502345 - Flags: review?(mschroeder)
Whiteboard: [needed beta][no l10n impact][needs patch] → [needed beta][no l10n impact][needs review]
Attached patch Fix - v2 (obsolete) β€” β€” Splinter Review
Fix a small error.
Attachment #502439 - Flags: review?(mschroeder)
Attachment #502345 - Attachment is obsolete: true
Attachment #502345 - Flags: review?(mschroeder)
Attached patch Fix - v3 (obsolete) β€” β€” Splinter Review
And another one!
Attachment #502440 - Flags: review?(mschroeder)
Attachment #502439 - Attachment is obsolete: true
Attachment #502439 - Flags: review?(mschroeder)
Comment on attachment 502440 [details] [diff] [review] Fix - v3 I think there are still issues with this patch, on startup I get these in the console: Error: Error handling calendar-startup-done: TypeError: this.agendaListboxControl is null Error: Error handling load: [Exception... "'[JavaScript Error: "this.mStatusProgressPanel is null" {file: "chrome://calendar/content/calendar-statusbar.js" line: 92}]' when calling method: [calIStatusObserver::startMeteors]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///c:/cygwin/home/svaillan/mozsrc/tb/comm-central/objdir-tb-debug/mozilla/dist/bin/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js :: <TOP_LEVEL> :: line 439" data: yes] Error: aOldTab is null Source File: chrome://lightning/content/messenger-overlay-sidebar.js Line: 65
Attachment #502440 - Flags: review?(mschroeder) → review-
Attached patch Fix - v4 β€” β€” Splinter Review
Oh my god, sometimes its so easy! Thanks for talking to me about this yesterday, it gave me the right ideas to fix it! This very simple patch ensures that opening the TZ database is synchronous, so no need for complicated events and such.
Attachment #502440 - Attachment is obsolete: true
Attachment #508778 - Flags: review?(nomisvai)
Comment on attachment 508778 [details] [diff] [review] Fix - v4 Looks good simon=r, I was distracted by bug 601474, which I get every time because I have strict warnings enabled.
Attachment #508778 - Flags: review?(nomisvai) → review+
I just noticed many occurrences of the following message in my console when opening the options dialog, I am not sure this is a result of the patch or because the dev builds have a weird configuration, it might be worth looking into before merging the patch, there used to be a reference to "chrome://lightning/locale/timezones.properties" that is not in the new patch : Timezone property lookup failed! Falling back to Pacific/Tarawa [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIStringBundle.GetStringFromName]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///c:/cygwin/home/svaillan/mozsrc/tb/comm-central/objdir-tb-debug/mozilla/dist/bin/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calTimezoneService.js :: <TOP_LEVEL> :: line 74" data: no]
Good catch, I've slightly modified the patch before pushing.
Whiteboard: [needed beta][no l10n impact][needs review] → [needed beta][no l10n impact]
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/3f15521039b1> -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Trunk
"Mozilla/5.0 (X11; Linux i686; rv:2.0b12pre) Gecko/20110210 Firefox/4.0b12pre SeaMonkey/2.1b3pre" (ID:20110210003002) (i.e., the current SeaMonkey trunk nightly for Linux) with Lightning and gdata-provider nightlies dated 2011-02-10 Events are now displayed, but the calendar list is still empty (so no UI to enable/disable calendars, select the current one, view calendar Properties, etc.) Shall I: - REOPEN this bug? - REOPEN bug 615996 and change its title? - or file a followup bug?
P.S. under View => Calendar, both "Mini-Month" and "Calendar List" are checked. The former works, the latter displays a "Calendars" title but an empty list, as seen in the attached screenshot.
Tony, could you test with Thunderbird instead of Seamonkey, just to be sure? Also, what about error console messages?
(In reply to comment #28) > Tony, could you test with Thunderbird instead of Seamonkey, just to be sure? > Also, what about error console messages? Error console messages: hard to tell, because I seem to get a lot of non-Calendar-related error console messages pushing any Calendar ones away, not always before I can see them, but before I can copy them. Thunderbird: hm, IOW, install a Tb trunk nightly, add Lightning to it, but I'm not gonna tell it about any of my POP accounts. A news account would be possible, if it doesn't want to start without anything to read… Let's see…
In reply to comment #29 Mozilla/5.0 (X11; Linux i686; rv:2.0b12pre) Gecko/20110211 Thunderbird/3.3a3pre same Lightning and gdata-provider nightlies as above (i.e. yesterday's) default theme: the calendar list is there but there is a twisty in front of its title. I'll check SeaMonkey's default theme next, and if the twisty is there, file a "SeaMonkey skins" bug at bugzilla.kairo.at for it. More to follow…
In reply to comment #30 I spoke too fast: I see calendars & events immediately after creating the calendars, but after closing down and relaunching Shredder, the calendars are there but the Multiweek grid, and the events list above it, are empty. Here is what I see in the Error Console (I omit additional repeated instances of a single error): Message: Could not read chrome manifest file '/root/Minefield/thunderbird/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest'. Message: mail.mozilla.com : server does not support RFC 5746, see CVE-2009-3555 Error: too much recursion Source File: resource://calendar/modules/calUtils.jsm -> file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calTimezoneService.js Line: 63 Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [calIRecurrenceInfo.getOccurrences]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calMemoryCalendar.js :: <TOP_LEVEL> :: line 460" data: no] Source File: file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calMemoryCalendar.js Line: 460 Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [calIEvent.icalComponent]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calIcsParser.js :: ip_processIcalComponent :: line 132" data: no] Source File: resource://calendar/modules/calUtils.jsm -> file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calIcsParser.js Line: 132 Error: ERROR addons.manager: Exception calling provider getAddonsByTypes: [Exception... "Success arg 0 [nsIXPCComponents.utils]" nsresult: "0x0 (NS_OK)" location: "JS frame :: resource://gre/modules/AddonManager.jsm :: <TOP_LEVEL> :: line 27" data: no] Source File: resource://gre/modules/AddonManager.jsm Line: 27 Error: too much recursion Source File: file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js Line: 469 Error: [Exception... "'[JavaScript Error: "too much recursion" {file: "file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js" line: 469}]' when calling method: [calIStatusObserver::spinning]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///root/.thunderbird/mwcytwue.test/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js :: <TOP_LEVEL> :: line 469" data: yes] Error: too much recursion Source File: resource:///modules/activity/glodaIndexer.js Line: 212 Message: 2011-02-11 18:24:49 gloda.indexer ERROR [Exception... "'[JavaScript Error: "too much recursion" {file: "resource:///modules/activity/glodaIndexer.js" line: 212}]' when calling method: [nsIActivityProcess::state]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: resource:///modules/activity/glodaIndexer.js :: <TOP_LEVEL> :: line 212" data: yes]
On reloading one more time (same Shredder build, but a later Calendar build, namely tinderbox-build 1297446591 dated 2011-02-11 10:10, the events are now displayed. In SeaMonkey's default theme, there is a twisty, and it was in [+] (collapsed) state. Case closed.
Attachment #511625 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: