Closed
Bug 386417
Opened 18 years ago
Closed 16 years ago
Imported all day event on Jan 1st 1970 misbehaves
Categories
(Calendar :: Provider: Local Storage, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mozilla, Unassigned)
Details
Attachments
(3 files)
When importing the ICS file I am currently using in Evolution into Sunbird 0.5 (OS/2 version) birthday events (and others?) somehow multiply to an (almost) infinite number of recurrences. Importing the original file therefore takes a huge amount of time and using the resulting calendar in Sunbird is not possible.
The ICS file I attach is reduced testcase that contains just one such birthday. I will attach screenshots of what it looks like in Sunbird after importing.
Reporter | ||
Comment 1•18 years ago
|
||
Reporter | ||
Comment 2•18 years ago
|
||
For week view Sunbird managed to put up the "unresponsive script" dialog after about a minute.
Comment 3•18 years ago
|
||
Subscribing the attached .ics file in Sunbird 0.5pre (2007062905) works fine.
Importing the attached .ics file in Sunbird 0.5pre (2007062905) hangs Sunbird.
This might be a problem with the storage provider and not the ics parser.
Comment 4•18 years ago
|
||
Using Sunbird 0.7pre (20070908) I can subscribe to this calendar without problems.
After Import into local storage calendar I don't get the unresponsive behavior reported in Comment #0. But I see a lot of the following errors reported:
Error: item.startDate has no properties
Source File: file:///D:/sunbird/components/calStorageCalendar.js Line: 1534
Error: uncaught exception: [Exception... "'[JavaScript Error: "item.startDate has no properties" {file: "file:///D:/sunbird/components/calStorageCalendar.js" line: 1534}]' when calling method: [calICalendar::getItems]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///D:/sunbird/components/calCompositeCalendar.js :: anonymous :: line 380" data: yes]
According to storage.sdb "event_start" in "cal_events" is set to 0. This might be a valid value because the start date is specified as 01.01.1970 00:00 (floating) in the .ics file.
But the check in getEventFromRow() doesn't take 0 into account: <http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/calendar/providers/storage/calStorageCalendar.js&rev=1.108&mark=1528#1525>
Component: Import and Export → Provider: Local Storage
QA Contact: import-export → storage-provider
Reporter | ||
Comment 5•18 years ago
|
||
Yes, it doesn't multiply infinitely any more (tested with Sunbird 0.7pre 20070909 branch nightly).
The checks you point at clearly expect values of 0 to be invalid for both row.event_start and row.event_end. Is it possible that the meaning of 0 has changes since vlad wrote those lines two years ago, or what the format always relative to 1970-01-01? Do you see any problem with just removing the tests for those two values, i.e. can the start and end values be undefined at all? If yes, then you probably need to invent some extra flags for that as 0 obviously doesn't work.
Comment 6•18 years ago
|
||
Peter, Stefan: Can you change the summary and confirm this bug?
Reporter | ||
Comment 7•17 years ago
|
||
I tried this again with
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12pre) Gecko/20071218 Calendar/0.8pre
Now the messages on the error console when importing the testcase are
Error: item.startDate has no properties
Source File: file:///<path_to_sunbird>/js/calStorageCalendar.js
Line: 1513
Error: Assert failed: [Exception... "'[JavaScript Error: "item.startDate has no properties" {file: "file:///<path_to_sunbird>/js/calStorageCalendar.js" line: 1513}]' when calling method: [calICalendar::getItems]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///<path_to_sunbird>/components/calCompositeCalendar.js :: anonymous :: line 424" data: yes]
1: ASSERT
2:
3: getItems
4: popRefreshQueue
5: refresh
Source File: file:///<path_to_sunbird>/js/calUtils.js
Line: 781
So they changed slightly since comment 4. The same error I get whenever I go to a view that would include 01-Jan-1970, and while the event was imported (I can see that it's there in storage.sdb) it never gets displayed.
A workaround is to change the date in the ICS file from 19700101 to 19700102 before import and then change it back again afterwards. Once it is in the storage there doesn't seem to be a problem any more, nothing on the error console, either.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Birthday event imported from Evolution multiplies infinitely → Imported all day event on Jan 1st 1970 misbehaves
Reporter | ||
Comment 8•17 years ago
|
||
This happens at least on Linux and OS/2, so better remove the OS/2 flag.
OS: OS/2 → All
Hardware: PC → All
Comment 9•16 years ago
|
||
Peter, Stefan, is this still an issue with Lightning 0.9 or 1.0pre?
Reporter | ||
Comment 10•16 years ago
|
||
I finally tried with a current self-compiled Sunbird build [Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1pre) Gecko/20090701 Calendar/1.0pre] and importing the same event now works. No errors in the error console any more and it does display correctly in the calendar, too. --> WFM
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•