Open Bug 1851428 Opened 2 years ago Updated 9 months ago

Thunderbird crashes [@ OOM | small ] if dragging 5000 recipients to the To field

Categories

(Thunderbird :: Message Compose Window, defect)

Thunderbird 115
x86
Windows 10
defect

Tracking

(thunderbird_esr115 affected)

Tracking Status
thunderbird_esr115 --- affected

People

(Reporter: cmgaudry33, Unassigned)

References

Details

(Keywords: crash, reproducible, triaged, Whiteboard: [patchlove])

Crash Data

Attachments

(2 files, 1 obsolete file)

Hi,

If you drag/drop one recipient from a row (TO:) with a few recipients (about 20) to one (CC:) with many recipients (about 5000), the application memory grows up to out of memory and then crashes : https://crash-stats.mozilla.org/report/index/8a7dccb9-69a5-4e27-8edd-39d150230904 .

If I remove it from TO and then add it to CC from an address book, everything is fine.

I'm using Thunderbird 115.1.1 with SMIME but I think it is not related.
Same with 115.0 and 115.2.0.

Flags: needinfo?(mkmelin+mozilla)
Attached patch bug_1851428.patch (obsolete) — Splinter Review

This patch has been applied to my Thunderbird 115.2.0 installation dir.

Assignee: nobody → chris.m.gaudry

Hi,

I found the problem : the MailRecipientsArea#createDNDPills method is calling addressRowAddRecipientsArray in a loop of addresses. The second argument of the addressRowAddRecipientsArray is an array of address containing one addres only. Each time the addressRowAddRecipientsArray method is called the targeted recipients row is modified (too much UI solicitations).

My solution : I filter selected or not selected addresses in two diffrent arrays, then make 2 calls to addressRowAddRecipientsArray, one call with select addresses, an other with unselected ones.

You will find my patch suggestion as attachment.

Regards.

Hey Chris, the patch looks reasonable - but do add a code comment about why it's done this way. Like "// Call addressRowAddRecipientsArray as few times as possible, since otherwise the repeated DOM modifications will be a problem if you have thousands of addresses."

Please submit the patch using Phabricator - see https://developer.thunderbird.net/thunderbird-development/fixing-a-bug#submitting-a-patch

Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
Summary: Thunderbird crashes while playing with a lot of recipients → Thunderbird crashes if dragging 5000 recipients to the To field
Crash Signature: [@ OOM | small ]
Keywords: crash
Summary: Thunderbird crashes if dragging 5000 recipients to the To field → Thunderbird crashes [@ OOM | small ] if dragging 5000 recipients to the To field
Flags: needinfo?(chris.m.gaudry)
Attached patch bug_1851428.diffSplinter Review

This new patch keeps the order of recipients (it takes into account the insertion point of dropped recipients).

Attachment #9351818 - Attachment is obsolete: true
Flags: needinfo?(chris.m.gaudry)

Hi,

I'm sorry but my organization prevents me from retrieving sources via Git (antivirus security policies) and therefore I cannot work on Mozilla sources. So I think I can't use this new tool.

Perhaps you could assign this issue to someone able to apply and submit this fix?

PS: I modified the patch to keep the order of recipients.

Thanks in advance.
Greetings,
Chris

Flags: needinfo?(vseerror)
Flags: needinfo?(vseerror) → needinfo?(mkmelin+mozilla)
Severity: -- → S3
Flags: needinfo?(mkmelin+mozilla)

Don't be alarmed by the crash spike under this signature, it's caused by the changes in bug 1746940 which are moving crashes that were missing symbols to this signature.

Assignee: chris.m.gaudry → nobody
Status: ASSIGNED → NEW
Keywords: reproducible
Whiteboard: [patchlove]
See Also: → 1896086
Duplicate of this bug: 1684211
Keywords: triaged
See Also: → 1738510
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: