Open Bug 1738510 Opened 4 years ago Updated 5 months ago

Thunderbird crashes when importing 1.6 Mb ICS file - TB is not checking for validatity of ICS file before import - Thunderbird 140.3.1esr Crash Report [@ OOM | small ]

Categories

(Calendar :: Import and Export, defect)

Thunderbird 91
x86
Windows 10
defect

Tracking

(thunderbird_esr115 affected, thunderbird_esr140 affected, thunderbird143 affected)

Tracking Status
thunderbird_esr115 --- affected
thunderbird_esr140 --- affected
thunderbird143 --- affected

People

(Reporter: subscrg, Unassigned, NeedInfo)

References

Details

(Keywords: crash, perf)

Crash Data

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36

Steps to reproduce:

Importing an 1.6Mb ICS file containing 2300+ events in calendar:
with 32bit build , the whole TB crashes while analyzing the ics file, before the user can even press the import button;
with 64bit build, tb doesn't crash on analyzing ics file, but locks up at 10% of import.
The procedure works properly only if using the 64bit build, and you sort the ics content list by decreasing date BEFORE starting the import.

Actual results:

TB 32bit crashed
TB 64bit cannot import more than 10% approx of the 2300+ events in the file, and then the progress bar freezes and no more events get imported.

Expected results:

Tb should process all 2300+ events in the file and import them all, regardless of the build (32/64 bits).
The used ICS file is a a file created by TB itself, exporting a calendar connected by means of the "provider for google calendar" plugin.

Did you have this issue with version 78?

TB 64bit cannot import more than 10% approx of the 2300+ events in the file, and then the progress bar freezes and no more events get imported.

How much memory is being used at that point?
How much CPU?

related ?

  • Bug 817251 - Make Importers asynchronous / ICS import causes unresponsive script warning
  • Bug 302390 - Import needs a progress dialog
Component: Untriaged → Import and Export
Flags: needinfo?(subscrg)
Keywords: perf
Product: Thunderbird → Calendar

Hi!

I've never tried this with v78, so I don't know.

When using the 32bit version, it simply crashes out and the crash manager appears.

When using the 64bit version, CPU usage was under 10% and memory usage was around 1Gb, but that was not too much more than the usage before starting the import procedure; the import dialog was still responsive (I closed it with its close button and no unresponsive script message appeared), but the progress bar was not moving and the calendar window event search bar stopped showing new events, as it did while the import was working.

Flags: needinfo?(subscrg)

Can you test beta 99 using a new profile?
Beta 99 using the (replacement) js ical parser.

https://support.mozilla.org/en-US/kb/using-multiple-profiles
https://www.thunderbird.net/channel/ (install into its own directory, so you don't overwrite your production version)

Flags: needinfo?(subscrg)

Thunderbird 115 crashes repeatedly when trying to import the United-States-Holidays.ics file.

Steps to reproduce:

  • Menu Bar > Events and Tasks > Import
  • click "Continue" button
  • open United-States-Holidays.ics file (724,615 bytes) on local HDD
  • crashes on "Loading items..." step

Holiday Calendars
http://www.thunderbird.net/calendar/holidays/

Thunderbird 115.0 (fresh install)
Windows 10 Pro 21H2 32-bit (12 years old ASUS mobo with AMD cpu)

I can confirm the issue and the STR above lead to the error.

I downloaded https://www.thunderbird.net/media/caldata/autogen/United-States-Holidays.ics and try to import it in a new empty profile in 115.0b6 (64-bit) via Menu > Tools > Import wizard.
I followed all the wizard steps to import .ics file and after the last step when clicking the Start Import button, the attached error occurred.

With error console showing the below:

An error occurred when writing to the calendar United-States-Holidays! Please see below for more information. Error code: MODIFICATION_FAILED. Description: If you're seeing this message after snoozing or dismissing a reminder and this is for a calendar you do not want to add or edit events for, you can mark this calendar as read-only to avoid such experience in future. To do so, get to the calendar properties by right-clicking on this calendar in the list in the calendar or task view. CalCalendarManager.jsm:880:15
    announceError resource:///modules/CalCalendarManager.jsm:880
    onError resource:///modules/CalCalendarManager.jsm:725
    notify resource:///modules/calendar/utils/calDataUtils.jsm:39
    notify resource:///modules/calendar/utils/calDataUtils.jsm:66
    notifyError resource:///modules/calendar/utils/calProviderUtils.jsm:649
    notifyOperationComplete resource:///modules/calendar/utils/calProviderUtils.jsm:622
    onError resource:///modules/CalStorageCalendar.jsm:198
    adoptItem resource:///modules/CalStorageCalendar.jsm:222
mail.import: Error: ID already exists for addItem
    onError resource:///modules/CalStorageCalendar.jsm:205
    adoptItem resource:///modules/CalStorageCalendar.jsm:222
CalendarFileImporter.jsm:113:22
    startImport resource:///modules/CalendarFileImporter.jsm:113
Uncaught (in promise) Error: ID already exists for addItem
    onError resource:///modules/CalStorageCalendar.jsm:205
    adoptItem resource:///modules/CalStorageCalendar.jsm:222
2 CalStorageCalendar.jsm:205

This error suggests a problem with the .ics file itself though Thunderbird should handle such error in more user friendly manner.

TB should first attempt to check and validate the .ics file during the first step of the Import wizard and report validation errors to end user without allowing next steps, before trying to import it.

In this specific case, UID values are not unique, duplicates are found causing the error during the import.

The United-States-Holidays.ics file is simply invalid therefore TB should not even allow to import it :-)

I tried in Gmail and it silently failed by importing only 1200 items out of the 1700+ ish items in total without much explanation. Likely skipping events that may use UID that were already imported.

Both the United-States-Holidays.ics file and Thunderbird behaviour may need corrections here :-)

Summary: thunderbird 32bit crashes when importing 1.6 Mb ICS file → Thunderbird crashes when importing 1.6 Mb ICS file - TB is not checking for validatity of ICS file before import.
See Also: → 302390
Status: UNCONFIRMED → NEW
Ever confirmed: true

Thunderbird 140 crashes when trying to import the USHolidays.ics file.

Sometimes the app freezes, i.e. Mozilla Thunderbird (Not Responding), when trying to import the USHolidays.ics file. I had to close the app using the operating system's taskbar.

Steps to reproduce:

Menu Bar > Events and Tasks > Import
click "Continue" button
open USHolidays.ics file (291,108 bytes) on local HDD
crashes or freezes on "Loading items..." step

Holiday Calendars
http://www.thunderbird.net/calendar/holidays/

Thunderbird ESR 140.3.1
Windows 10 Pro 22H2 32-bit (15 years old ASUS mobo with AMD cpu)

The thunderbird.net holiday calendar for United States crashed my app in Thunderbird 91, Thunderbird 115 and Thunderbird 140.

TB 115 Crashes When Importing .ics File
http://forums.mozillazine.org/viewtopic.php?t=3111064

TB 140 Crashes When Importing .ics File
http://forums.mozillazine.org/viewtopic.php?t=3134515

See Also: → 1920710, 1776462

@morat1857231465

  • Is your Windows environment 32bit or 64bits?
  • Is your Thunderbird environment 32bit or 64bits?
  • Did you make sure all extensions are disabled? If you have any enabled?
  • Does any error appears in the console (CTRL+SHIFT+J) during the import?
  • Have you tried in a new user profile without email setup, same result?
  • Have you tried in recent beta? Use a separate program and profile to test.

Fyi, on Windows 11 Pro [11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (2.80 GHz)] I managed to import https://www.thunderbird.net/media/caldata/autogen/USHolidays.ics into TB 144.0b4 (64-bit) within a new profile (no email) without error (that I can see), it appears as a separate calendar. Exiting TB and re-opening it triggers no particular issues.

Same results in TB 140.3.1esr (64-bit) at my end.

In recent version of TB I only see:

  • Menu > Open from File > Calendar > select the .ics calendar previously downloaded
  • Menu > Tools > Import > Import from a file > Continue > Import Calendars > Continue > select the .ics calendar previously downloaded > Continue > Loading items > Continue > Select a destination > Continue
  • If I re-enable deprecated feature Menu bar > Event and Tasks > Import I jump directly to the eight step of the second option above and can directly select the .ics file then process continue and complete fine as usual.

What ever import option I use, it works fine at my end so could be an environmental issue perhaps.

I'm using a Windows 32-bit operating system.

i.e. Start > Settings > System > About > System Type > 32-bit operating system

I'm using a 32-bit version of Thunderbird.

Test one:

  • exited other applications like Firefox
  • manually disabled extensions
  • disabled mozilla.cfg file by commenting out autoconfig.js file
  • disabled userChrome.css file by setting toolkit.legacyUserProfileCustomizations.stylesheets pref to false
  • restarted Thunderbird
  • opened error console
  • imported USHolidays.ics file

Result: no errors in error console, Thunderbird freezes

Test two:

  • same as above except restarted Thunderbird in Troubleshoot Mode

Result: no errors in error console, Thunderbird crashed

Test three:

  • same as above except used fresh profile

Result: no errors in error console, Thunderbird crashed

P.S.

I can import the usa.ics file (19,841 bytes) using my regular Thunderbird setup while running Firefox with no issues.

Federal Holidays for USA
http://www.officeholidays.com/subscribe/usa

I can import the hebcal.ics file (369,758 bytes) using my regular Thunderbird setup while running Firefox with no issues.

I created the hebcal.ics file after selecting the Gregorian year (common era) option.

Jewish Holidays
http://www.hebcal.com/home/210/icalendar-ics-jewish-holidays
http://www.hebcal.com/hebcal

Why do I only have trouble with thunderbird.net .ics files? As far as I can remember, I could always import .ics files from other sites with no issues.

(In reply to morat1857231465 from comment #9)

Why do I only have trouble with thunderbird.net .ics files?

  • Have you tried remove and re-install Thunderbird? Does that help?
  • When you downloaded Thunderbird did you choose a specific language?
  • What are your regional settings on Windows?
  • Is your Windows installation up-to-date?
  • Does the Windows Update option "Receive update for other Microsoft products" is enabled or disabled in your environment?

Currently I tried in TB 143.0.1 (32-bit) on my Windows 11 Pro 64bits machine and Import works as well.
So your issue may likely be an environmental one linked to Windows or the machine hardware that Thunderbird cannot cop with at your end, possibly... or something interfering in the import process.

According to https://icalendar.org/validator.html the USHolidays.ics is valid no error found.
Just few warnings like but that shall not prevent the file to be imported in theory.
"Line length should not be longer than 75 characters near line # 42Reference: RFC 5545 3.1. Content Lines [http://icalendar.org/iCalendar-RFC-5545/3-1-content-lines.html] (...) "

(In reply to morat1857231465 from comment #8)

Thunderbird crashed

As you mentioned Thunderbird crashed, do you see a crash report related?
https://support.mozilla.org/en-US/kb/mozilla-crash-reporter-tb#w_viewing-crash-reports

I downloaded the en-US version of Thunderbird from the thunderbird.net site. The last time I did a fresh install was for Thunderbird 115. I updated to Thunderbird 128 and Thunderbird 140 using the app.

I'm using the standard regional settings for the central time zone in the United States on Windows 10.

Region: United States
Region format: English (United States)
Region format date for calendar: Gregorian Calendar

Windows 10 Pro 22H2 32-bit is up-to-date until October 14, 2025. I'm planning to buy or redeem (using Microsoft reward points) the extended security updates for Windows 10.

I don't receive updates for other Microsoft products.

i.e. Start > Settings > Update & Security > Windows Update > Advanced Options > Receive updates for other Microsoft products when you update Windows > Off

Crash reports (sorted by most recent)
http://crash-stats.mozilla.org/report/index/b316c611-d947-4de4-a05c-1d40a0251007
http://crash-stats.mozilla.org/report/index/382b443e-d19e-4bd5-b456-6fb390251007
http://crash-stats.mozilla.org/report/index/91592aae-4589-4f7c-9a49-b67f90251005

I will try installing the beta build and reinstalling the ESR build when I have more time.

Thanks for replies.

(In reply to morat1857231465 from comment #12)

Crash reports (sorted by most recent)
http://crash-stats.mozilla.org/report/index/b316c611-d947-4de4-a05c-1d40a0251007
http://crash-stats.mozilla.org/report/index/382b443e-d19e-4bd5-b456-6fb390251007
http://crash-stats.mozilla.org/report/index/91592aae-4589-4f7c-9a49-b67f90251005

Thank you very helpful.
All crash reports shows the same error, as I suspected a memory issue it seems.

Looking at most recent crash report: http://crash-stats.mozilla.org/report/index/b316c611-d947-4de4-a05c-1d40a0251007

Thunderbird 140.3.1esr Crash Report [@ OOM | small ]

Crash Reason EXCEPTION_BREAKPOINT

Crashing Thread (0), Name: MainThread
Frame	Module	Signature	Source	Trust
0	mozglue.dll	MOZ_Crash(char const*, int, char const*)	mfbt/Assertions.h:381	inlined
0	mozglue.dll	mozalloc_abort(char const* const)	memory/mozalloc/mozalloc_abort.cpp:35	context
1	mozglue.dll	mozalloc_handle_oom(unsigned int)	memory/mozalloc/mozalloc_oom.cpp:51	cfi
2	xul.dll	mozilla::dom::DOMArena::Allocate(unsigned int)	dom/base/DOMArena.h:49	inlined
2	xul.dll	nsNodeInfoManager::Allocate(unsigned int)	dom/base/nsNodeInfoManager.cpp:290	cfi
3	xul.dll	nsINode::operator new(unsigned int, nsNodeInfoManager*)	dom/base/nsINode.cpp:138	cfi
4	xul.dll	NS_NewHTMLSharedElement(already_AddRefed<mozilla::dom::NodeInfo>&&, mozilla::dom::FromParser)	dom/html/HTMLSharedElement.cpp:21	cfi
5	xul.dll	NS_NewHTMLHtmlElement(already_AddRefed<mozilla::dom::NodeInfo>&&, mozilla::dom::FromParser)	dom/html/nsGenericHTMLElement.h:1468	inlined
5	xul.dll	HTMLContentSink::Init(mozilla::dom::Document*, nsIURI*, nsISupports*, nsIChannel*)	dom/html/nsHTMLContentSink.cpp:608	cfi
6	xul.dll	NS_NewHTMLContentSink(nsIHTMLContentSink**, mozilla::dom::Document*, nsIURI*, nsISupports*, nsIChannel*)	dom/html/nsHTMLContentSink.cpp:529	inlined
6	xul.dll	nsHTMLDocument::StartDocumentLoad(char const*, nsIChannel*, nsILoadGroup*, nsISupports*, nsIStreamListener**, bool)	dom/html/nsHTMLDocument.cpp:497	cfi
7	xul.dll	nsContentDLF::CreateDocument(char const*, nsIChannel*, nsILoadGroup*, nsIDocShell*, already_AddRefed<mozilla::dom::Document> (*)(), nsIStreamListener**, nsIDocumentViewer**)	layout/build/nsContentDLF.cpp:323	inlined
7	xul.dll	nsContentDLF::CreateInstance(char const*, nsIChannel*, nsILoadGroup*, nsTSubstring<char> const&, nsIDocShell*, nsISupports*, nsIStreamListener**, nsIDocumentViewer**)	layout/build/nsContentDLF.cpp:0	cfi
8	xul.dll	nsDocShell::NewDocumentViewerObj(nsTSubstring<char> const&, nsIRequest*, nsILoadGroup*, nsIStreamListener**, nsIDocumentViewer**)	docshell/base/nsDocShell.cpp:7933	inlined
8	xul.dll	nsDocShell::CreateDocumentViewer(nsTSubstring<char> const&, nsIRequest*, nsIStreamListener**)	docshell/base/nsDocShell.cpp:7709	cfi
9	xul.dll	nsDSURIContentListener::DoContent(nsTSubstring<char> const&, bool, nsIRequest*, nsIStreamListener**, bool*)	docshell/base/nsDSURIContentListener.cpp:167	cfi
10	xul.dll	nsDocumentOpenInfo::TryContentListener(nsIURIContentListener*, nsIChannel*)	uriloader/base/nsURILoader.cpp:771	cfi
Summary: Thunderbird crashes when importing 1.6 Mb ICS file - TB is not checking for validatity of ICS file before import. → Thunderbird crashes when importing 1.6 Mb ICS file - TB is not checking for validatity of ICS file before import - Thunderbird 140.3.1esr Crash Report [@ OOM | small ]
Crash Signature: [@ OOM | small]
OS: Unspecified → Windows 10
Hardware: Unspecified → x86
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: