Closed Bug 512780 Opened 15 years ago Closed 14 years ago

Console error during calendar export [Error: File Read Error (underflow.)]

Categories

(Calendar :: Import and Export, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: Fallen)

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.4pre) Gecko/20090826 Calendar/1.0pre

Steps To Reproduce:
===================
1. Create new Sunbird profile and start the application
2. Create some events in the default calendar
3. Export the entire calendar

Actual Results:
===============
Error Console shows the following message twice:

  Error: File Read Error (underflow.) (file:///D:/dev/sunbird/calendar-js/)
  Source File: file:///D:/dev/sunbird/modules/calUtils.jsm Line: 80

But the Save As dialog is displayed and the export seems to finish successful.

Extended log from debug console:

[calAlarmService] starting...
... loading script='calIcsImportExport.js' ...
... loading script='undefined' ...

1: [file:///D:/obj/mozilla/dist/bin/modules/calUtils.jsm:79] cal_loadScripts
2: [file:///D:/obj/mozilla/dist/bin/components/calImportExportModule.js:118] anonymous
3: [file:///D:/obj/mozilla/dist/bin/components/calImportExportModule.js:175] anonymous
4: [null:0] null
5: [chrome://calendar/content/import-export.js:264] saveEventsToFile
6: [chrome://calendar/content/import-export.js:330] anonymous
7: [null:0] null
8: [file:///D:/obj/mozilla/dist/bin/modules/calProviderUtils.jsm:567] cPB_notifyOperationComplete
9: [file:///D:/obj/mozilla/dist/bin/calendar-js/calStorageCalendar.js:898] cSC_getItems_
10: [file:///D:/obj/mozilla/dist/bin/calendar-js/calStorageCalendar.js:666] anonymous

... loading script='calHtmlExport.js' ...
... loading script='calListFormatter.js' ...
... loading script='calMonthGridPrinter.js' ...
... loading script='calWeekPrinter.js' ...
... loading script='calOutlookCSVImportExport.js' ...
... loading script='undefined' ...

1: [file:///D:/obj/mozilla/dist/bin/modules/calUtils.jsm:79] cal_loadScripts
2: [file:///D:/obj/mozilla/dist/bin/components/calImportExportModule.js:118] anonymous
3: [file:///D:/obj/mozilla/dist/bin/components/calImportExportModule.js:175] anonymous
4: [null:0] null
5: [chrome://calendar/content/import-export.js:264] saveEventsToFile
6: [chrome://calendar/content/import-export.js:330] anonymous
7: [null:0] null
8: [file:///D:/obj/mozilla/dist/bin/modules/calProviderUtils.jsm:567] cPB_notifyOperationComplete
9: [file:///D:/obj/mozilla/dist/bin/calendar-js/calStorageCalendar.js:898] cSC_getItems_
10: [file:///D:/obj/mozilla/dist/bin/calendar-js/calStorageCalendar.js:666] anonymous

... loading script='calUtils.js' ...
http://mxr.mozilla.org/comm-central/source/calendar/import-export/calImportExportModule.js#117 seems to be the origin of the problem. Two entries of componentData don't have a script property, so we get back 'undefinied'. But I don't know how to improve the situation without loading scripts twice.
Attached patch Fix - v1 — — Splinter Review
This should take care, ignoring entries that are null.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #433810 - Flags: review?(ssitter)
Comment on attachment 433810 [details] [diff] [review]
Fix - v1

r=ssitter
Attachment #433810 - Flags: review?(ssitter) → review+
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/ce66906ae8e2>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: