Open Bug 2000594 Opened 1 year ago Updated 4 months ago

Crash in [@ OOM | large | NS_ABORT_OOM | nsMsgBodyHandler::ApplyTransformations] handling attachment

Categories

(Thunderbird :: General, defect)

Unspecified
Windows 11
defect

Tracking

(Not tracked)

People

(Reporter: wsmwk, Unassigned)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/08f2a5d9-0a57-408f-9195-8f55b0250914 143.0b3 "when opening an attachment/pdf from a gmail account, thunderbird slows to an almost freeze and eventually crashes. This started 2 versions ago [141 beta]. this does not happen with accounts from other mail providers."

MOZ_CRASH Reason:

MOZ_CRASH(OOM)

Top 10 frames:

0  xul.dll  NS_ABORT_OOM(unsigned long long)  xpcom/base/nsDebugImpl.cpp:689
1  xul.dll  nsMsgBodyHandler::ApplyTransformations(nsTString<char> const&, int, bool&, ns...  mailnews/search/src/nsMsgBodyHandler.cpp:265
2  xul.dll  nsMsgBodyHandler::GetNextLine(nsTString<char>&, nsTString<char>&)  mailnews/search/src/nsMsgBodyHandler.cpp:81
3  xul.dll  nsMsgSearchTerm::MatchBody(nsIMsgSearchScopeTerm*, char const*, nsIMsgDBHdr*,...  mailnews/search/src/nsMsgSearchTerm.cpp:811
4  xul.dll  nsMsgSearchOfflineMail::ProcessSearchTerm(nsIMsgDBHdr*, nsIMsgSearchTerm*, ch...  mailnews/search/src/nsMsgLocalSearch.cpp:455
5  xul.dll  nsMsgSearchBoolExpression::OfflineEvaluate(nsIMsgDBHdr*, char const*, nsIMsgS...  mailnews/search/src/nsMsgLocalSearch.cpp:139
6  xul.dll  nsMsgSearchBoolExpression::OfflineEvaluate(nsIMsgDBHdr*, char const*, nsIMsgS...  mailnews/search/src/nsMsgLocalSearch.cpp:159
7  xul.dll  nsMsgSearchBoolExpression::OfflineEvaluate(nsIMsgDBHdr*, char const*, nsIMsgS...  mailnews/search/src/nsMsgLocalSearch.cpp:159
8  xul.dll  nsMsgSearchOfflineMail::MatchTerms(nsIMsgDBHdr*, nsTArray<RefPtr<nsIMsgSearch...  mailnews/search/src/nsMsgLocalSearch.cpp:599
8  xul.dll  nsMsgSearchOfflineMail::MatchTermsForSearch(nsIMsgDBHdr*, nsTArray<RefPtr<nsI...  mailnews/search/src/nsMsgLocalSearch.cpp:312

bp-51186785-e395-4506-bbb6-d920c0250731 140.1.0esr "Every time i use the searrch bar in a mail box it crashes"

bp-75da76fa-d610-482f-842d-8c3de0251103 143.0.1 "TB always crashes when I include "body" in a search (from within the "filter messages" or viamenue/search.. from=, body=...; I am not talking about global search). Searching for sender, recipient, subject... only (not with mail message body) works nicely."

https://searchfox.org/comm-central/rev/133670925aa0da6a034840f5dfe204f779d116ae/mailnews/search/src/nsMsgBodyHandler.cpp#265

It's trying to allocate close to 2GB. Probably buf doesn't get cleared when it should somewhere.

We would need to limit buf.Length() to something, however I have no idea yet what the maximum sane value would be and what other implications this might have.

However, when opening an attachment/pdf from a gmail account and Every time i use the searrch bar in a mail box it crashes may be two entirely different bugs.

You need to log in before you can comment on or make changes to this bug.