Last Comment Bug 615856 - crash sending message [@ nsMsgBuildMessageByName]
: crash sending message [@ nsMsgBuildMessageByName]
: crash
Product: MailNews Core
Classification: Components
Component: Composition (show other bugs)
: Trunk
: x86 Windows Vista
-- critical (vote)
: Thunderbird 20.0
Assigned To: Kent James (:rkent)
Depends on:
  Show dependency treegraph
Reported: 2010-12-01 06:56 PST by Wayne Mery (:wsmwk, NI for questions)
Modified: 2012-12-20 08:36 PST (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

fix (932 bytes, patch)
2011-08-07 19:06 PDT, Makoto Kato [:m_kato]
mozilla: review-
Details | Diff | Splinter Review
with review comments (2.33 KB, patch)
2012-12-04 16:02 PST, Kent James (:rkent)
irving: review+
Details | Diff | Splinter Review

Description User image Wayne Mery (:wsmwk, NI for questions) 2010-12-01 06:56:12 PST
crash sending message [@ nsMsgBuildMessageByName]

bp-c6fe8964-eb51-4826-bd04-74dbc2101124 (nca1061) "everytime I reply to an e-mail Thunderbird crashes"
0	thunderbird.exe	nsMsgBuildMessageByName	mailnews/compose/src/nsMsgPrompts.cpp:75
1	thunderbird.exe	nsMsgBuildMessageWithTmpFile	mailnews/compose/src/nsMsgPrompts.cpp:90
2	thunderbird.exe	nsMsgComposeAndSend::GatherMimeAttachments	mailnews/compose/src/nsMsgSend.cpp:637
3	thunderbird.exe	nsMsgComposeAndSend::HackAttachments	mailnews/compose/src/nsMsgSend.cpp:2752
4	thunderbird.exe	nsMsgComposeAndSend::Init	mailnews/compose/src/nsMsgSend.cpp:3451
5	thunderbird.exe	nsMsgComposeAndSend::CreateAndSendMessage	mailnews/compose/src/nsMsgSend.cpp:4293
6	thunderbird.exe	nsMsgCompose::_SendMsg	mailnews/compose/src/nsMsgCompose.cpp:1054
7	thunderbird.exe	nsMsgCompose::SendMsg	mailnews/compose/src/nsMsgCompose.cpp:1251
Comment 1 User image Ludovic Hirlimann [:Usul] 2010-12-02 00:55:59 PST
Wayne might be worth asking that user if -safe-mode helps !
Comment 2 User image Wayne Mery (:wsmwk, NI for questions) 2010-12-02 04:15:57 PST
fwiw, user has lightning and adblock extensions only
Comment 3 User image Makoto Kato [:m_kato] 2011-08-07 19:03:41 PDT
It seems to be that this is typo of parameter of nsMsgBuildMessageWithTmpFile.  We should use mHTMLFile instead of mTempFile.
Comment 4 User image Makoto Kato [:m_kato] 2011-08-07 19:06:38 PDT
Created attachment 551372 [details] [diff] [review]
Comment 5 User image David :Bienvenu 2011-08-08 09:52:38 PDT
thx for the patch - isn't this code wrong as well?

  nsCOMPtr<nsIInputStream> inputFile;
  rv = NS_NewLocalFileInputStream(getter_AddRefs(inputFile), input_file);
  if (NS_FAILED(rv))
    if (mSendReport)
      nsAutoString error_msg;
      nsMsgBuildMessageWithFile(mTempFile, error_msg);
      mSendReport->SetMessage(nsIMsgSendReport::process_Current, error_msg.get(), PR_FALSE);

and for good measure, I'm thinking it would be good to add a null check in nsMsgBuildMessageByName so we don't crash with a null aFile.
Comment 6 User image David :Bienvenu 2011-08-08 09:55:53 PDT
Comment on attachment 551372 [details] [diff] [review]

minusing because I'd like to have a patch that fixes the other issues I mentioned. Using an NS_ENSURE_ARG_POINTER(aFile) in nsMsgBuildMessageByName along with using the correct file in that other instance of nsBuildMessageWithTmpFile would be an automatic r+.
Comment 7 User image Kent James (:rkent) 2012-12-04 16:02:08 PST
Created attachment 688506 [details] [diff] [review]
with review comments

Since I'm generating one of these crashes in my ExQuilla extension, I figure I should go ahead and do the core checks.
Comment 8 User image :Irving Reid (No longer working on Firefox) 2012-12-11 12:10:16 PST
Comment on attachment 688506 [details] [diff] [review]
with review comments

Review of attachment 688506 [details] [diff] [review]:

These crashes happen in the middle of producing a "can't open file" message to present to the user - it would be interesting to know what causes the file open to fail.
Comment 9 User image Kent James (:rkent) 2012-12-20 08:35:02 PST
Comment on attachment 688506 [details] [diff] [review]
with review comments

Checked in

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