Closed Bug 242768 Opened 20 years ago Closed 20 years ago

[gtk2] Thunderbird / mozilla mailnews crashes when sending mail / newsgroup post. [IM_get_input_context]

Categories

(MailNews Core :: Networking, defect)

x86
Linux
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fredbezies, Assigned: sspitzer)

References

Details

(Keywords: crash)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040506 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040506 Firefox/0.8.0+

Simple.

I saw it with the latest official trunk build, and my own homemade build (based
on sources up to date at midnight).


Reproducible: Always
Steps to Reproduce:
1.Launch Thunderbird.
2.Create a mail / news post
3.Click on send

Actual Results:  
Send then thunderbird commits suicide.

Expected Results:  
Send only.

With official build, sent 2 Talkbacks reports :

TB39818E & TB39815W

With my homemade build I got this on console :

Gecko:9694): Glib-GObject-WARNING **: invalid cast form '(null)' to 'GtkWidget'

(Gecko:9694): Glib-GObject-WARNING **: invalid cast form '(null)' to 'GObject'
./run-mozilla.sh: line 423: 9694 Segmentation fault "$prog" ${1+"@"}

[1]+ Exit 139 

Could be related to bugfix for bug 238854

It could also kills mozilla mailnews ?!
Same crash happens with a gtk2+xft enabled build of mozilla trunk.

Here is the crash log :


(Gecko:24057): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)'
in cast to `GtkWidget'

(Gecko:24057): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)'
in cast to `GObject'

(Gecko:24057): GLib-GObject-CRITICAL **: file gobject.c: line 1400
(g_object_get_data): assertion `G_IS_OBJECT (object)' failed
./run-mozilla.sh: line 423: 24057 Segmentation fault      "$prog" ${1+"$@"}

Tweaking summary and changing component, as it also kills mozilla trunk.
Assignee: mscott → sspitzer
Component: Mail Window Front End → Networking: MailNews General
Product: Thunderbird → MailNews
QA Contact: grylchan
Summary: Thunderbird exits without warning when sending mail / newsgroup post. → [gtk2] Thunderbird / mozilla mailnews exits without warning when sending mail / newsgroup post.
Version: unspecified → Trunk
Keywords: crash
Summary: [gtk2] Thunderbird / mozilla mailnews exits without warning when sending mail / newsgroup post. → [gtk2] Thunderbird / mozilla mailnews crashes when sending mail / newsgroup post.
Is there any real evidence that this has anything to do with 238854 ? Another
mozillazine forum user reports the crash on sending mail on MacOSX too.

http://forums.mozillazine.org/viewtopic.php?p=514454
Stack trace:
#0  0x00ac3df4 in IM_get_input_context (aArea=0x8f6a020)
    at /builds/mozilla/trunk/mozilla/widget/src/gtk2/nsWindow.cpp:4346
#1  0x00ac35db in nsWindow::IMEGetContext (this=0x8f9a7f0)
    at /builds/mozilla/trunk/mozilla/widget/src/gtk2/nsWindow.cpp:4049
#2  0x00ac3369 in nsWindow::IMELoseFocus (this=0x8f9a7f0)
    at /builds/mozilla/trunk/mozilla/widget/src/gtk2/nsWindow.cpp:3972
#3  0x00ac3256 in nsWindow::IMEDestroyContext (this=0x8f9a7f0)
    at /builds/mozilla/trunk/mozilla/widget/src/gtk2/nsWindow.cpp:3943
#4  0x00abadb3 in nsWindow::Destroy (this=0x8f9a7f0)
    at /builds/mozilla/trunk/mozilla/widget/src/gtk2/nsWindow.cpp:369
#5  0x0166c929 in ~nsView (this=0x8f9a798)
    at /builds/mozilla/trunk/mozilla/view/src/nsView.cpp:151
#6  0x01672180 in ~nsViewManager (this=0x8f9a648)
    at /builds/mozilla/trunk/mozilla/view/src/nsViewManager.cpp:452
#7  0x016726a9 in nsViewManager::Release (this=0x8f9a648)
    at /builds/mozilla/trunk/mozilla/view/src/nsViewManager.cpp:508
#8  0x0124ed66 in ~nsCOMPtr (this=0x8f960f0) at nsCOMPtr.h:509
#9  0x0142051e in ~DocumentViewerImpl (this=0x8f960c0)
    at /builds/mozilla/trunk/mozilla/content/base/src/nsDocumentViewer.cpp:532
#10 0x0141fb37 in DocumentViewerImpl::Release (this=0x8f960c0)
    at /builds/mozilla/trunk/mozilla/content/base/src/nsDocumentViewer.cpp:513
...

It seems likely that this was my checkin.  I'll keep investigating.
making sure brian is on the cc list for this since he thinks it may be him.
Additionnal note on this bug...

It kills firefox when downloading a file is finished...

I tried with my last firefox gtk2+xft build (based on 07:00am up-to-date CVS
sources), and it tells me this after firefox commits suicide :

(Gecko:9343):GLib-GObject-WARNING **: invalid uninstantiatable type `(null)'
in cast to `GObject'

(Gecko:9343): GLib-GObject-CRITICAL **: file gobject.c: line 1400
(g_object_get_data): assertion `G_IS_OBJECT (object)' failed
./run-mozilla.sh: line 423: 24057 Segmentation fault      "$prog" ${1+"$@"}

Couldn't this bug severity be raised to blocker ?
*** Bug 242978 has been marked as a duplicate of this bug. ***
this isn't only mailnews - it crashes on exit too - simply start and quit the
browser - blank page
Summary: [gtk2] Thunderbird / mozilla mailnews crashes when sending mail / newsgroup post. → [gtk2] Thunderbird / mozilla mailnews crashes when sending mail / newsgroup post. [IM_get_input_context]
I precised it kills firefox trunk in comment #5.

This is really one of the nastiest regression I've ever seen :[

I decided to use 1.7 branch code for my firefox builds until this bug is fixed.
Still crashing, even after Brian Ryner backed out the patch at 23:07 yesterday.

(Gecko:9231): GLib-GObject-WARNING **: invalid uninstantiatable type `GEnum' in
cast to `GtkWidget'
./run-mozilla.sh: line 423:  9231 Segmentation fault      "$prog" ${1+"$@"}

This crash happened with a blank new tarball source, grabbed with CVS, at 02:00
am mozilla.org time.
Interesting... I can't reproduce the problem now, with my nightly trunk build,
checked out starting at 23.55 PDT last night...

% /export/stuff/mozilla/thunderbird-nightly/mozilla/dist/thunderbird/thunderbird -V
Mozilla 1.8a, Copyright (c) 2003 mozilla.org, build 2004050723
% 
Still crashes for me on every occasion.  This is a mozilla build, not tbird.

Another operation which is a sure crash is trying to remove an address from the
adressee list of a reply-all.  Just click on an address to get the cursor
positioned, press Ctrl-U, and then Delete.  The last step crashes moz 100% of
the time.
i've been testing this by only starting Mozilla browser (with a blank page) and
then hit File->Quit. I tested a profile without mail configured, and there  the
start/quit routine didn't crash. I then set up a mail account for that profile,
and now that one too will crash. No idea if that means anything.

It doesn't crash if i use the window's X button instead of a proper quit.
> Another operation which is a sure crash is trying to remove an address from the
> adressee list of a reply-all.  Just click on an address to get the cursor
> positioned, press Ctrl-U, and then Delete.  The last step crashes moz 100% of
> the time.

This one I _can_ reproduce.
I tried with latest thunderbird nightly (with talkback) and it crashes when
sending a test email to myself.

Here is the talkback ID : TB 44246X

And a crash log :


(Gecko:15102): GLib-GObject-WARNING **: invalid cast from `(null)' to `GtkWidget'

(Gecko:15102): GLib-GObject-WARNING **: invalid cast from `(null)' to `GObject'

(Gecko:15102): GLib-GObject-CRITICAL **: file gobject.c: line 1400
(g_object_get_data): assertion `G_IS_OBJECT (object)' failed
I'm seeing this too on Linux GTK2+Xft Firefox builds too (including
2004-05-11-08) on completed downloads. But is that the same bug as this? Or
should a new bug be filed on Firefox Downloading?
*** Bug 243282 has been marked as a duplicate of this bug. ***
same stack on the crash i get 100% reproducably when selecting File->Print
Preview. (still crashing with a fresh CVS trunk build, clobbered)
Flags: blocking1.8a?
Not confirmed on Linux.

version 0.6 (20040509)

I have made multiple postings with Thunderbird to a newsgroup and experienced
absolutely no crashes.
Confirmed; Firefox crashes on finishing a file download (have not yet
investigated the Thunderbird part of this bug).

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040510 Firefox/0.8.0+
Sorry for bugspam - but I have no download crash with Firefox.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040507 Firefox/0.8.0+
(daihard: XFT+GTK2; opt. for P4/SSE-2)
i too get the crash on a finishing file download - day old trunk CVS build, 
Gtk2+xft, Linux i686
brian told me he backed out the patch that was causing this crash. Is that not
the case? 
(In reply to comment #22)
> brian told me he backed out the patch that was causing this crash. Is that not
> the case? 

In a Firefox trunk CVS build from: Thu May 13 00:20:36 PDT 2004

I still get the following segfault/crash on a completed download:

(Gecko:20968): GLib-GObject-WARNING **: invalid uninstantiatable type `glong' in
cast to `GtkWidget'
 
(Gecko:20968): GLib-GObject-WARNING **: invalid uninstantiatable type `glong' in
cast to `GObject'
 
(Gecko:20968): GLib-GObject-CRITICAL **: file gobject.c: line 1400
(g_object_get_data): assertion `G_IS_OBJECT (object)' failed
/home/aebrahim/firefox/run-mozilla.sh: line 423: 20968 Segmentation fault     
"$prog" ${1+"$@"}
> brian told me he backed out the patch that was causing this crash. Is that not
> the case?

Hell, no.  moz crashes if you only look at it.  I just refreshed from CVS and
rebuilt, just to be sure.  This is as of about 2004-05-13T09:00-0700.
(In reply to comment #22)
> brian told me he backed out the patch that was causing this crash. Is that not
> the case? 

He indeed backed it out. But Moz Gtk2 still crashes - all over the place.
I just replaced the relevant files with pre-bug-238854 versions, and i still get
the same crash. So something else seems to be the the reason for the crashes
then, unless a makefile went bad.. "or something"

These were the files i reinstated for a build that still crashes:

/cvsroot/mozilla/widget/src/gtk2/mozcontainer.c v. 1.11
/cvsroot/mozilla/widget/src/gtk2/mozcontainer.h v. 1.4
/cvsroot/mozilla/widget/src/gtk2/mozdrawingarea.c v. 1.9
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp v.1.100
/cvsroot/mozilla/widget/src/gtk2/nsWindow.h  v.1.44
See Talkback Incident ID TB46910W for a report generated by a crash when
completing a download in Firefox.
I can now confirm the Thunderbird send crash, but not the Firefox download crash.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040514 Firefox/0.8.0+
(daihard: XFT+GTK2; opt. for P4/SSE-2)

Thunderbird version 0.6+ (20040513)
(In reply to comment #27)
> I can now confirm the Thunderbird send crash, but not the Firefox download crash.
> 
> Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040514 Firefox/0.8.0+
> (daihard: XFT+GTK2; opt. for P4/SSE-2)
> 
> Thunderbird version 0.6+ (20040513)

I'm still crashing on download complete on Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.8a) Gecko/20040515 Firefox/0.8.0+.
(In reply to comment #28)
> (In reply to comment #27)
> > I can now confirm the Thunderbird send crash, but not the Firefox download
crash.
> > 
> > Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040514 Firefox/0.8.0+
> > (daihard: XFT+GTK2; opt. for P4/SSE-2)
> > 
> > Thunderbird version 0.6+ (20040513)
> 
> I'm still crashing on download complete on Mozilla/5.0 (X11; U; Linux i686;
> en-US; rv:1.8a) Gecko/20040515 Firefox/0.8.0+.
> 

NEW DATA!

The Download Manager Tweak extension nullfies this bug! I just created a new
profile and attempted a download, and Firefox crashed!
This may be the same as my bug report 243343 which is definitely caused by the
download-progress-dialog widget.  No crash if you check the 'leave this dialog
open after download finishes' box, but the dialog resizes itself in an odd way
when the download finishes--this seems like a promising place to look for the
source of the bug.

BTW the crash only happens when downloading files over about 80KB in size --
no idea why  :-/
I'm not sure, but the connection between downloading files and sending mail
(both causing crashes) might be the progress bar (download progress/sending
progress).
I did some tests to see if it was the actual sending of the messages or the
closing of the send mail window causing the problem. Selecting "send later"
rather than just "send" also caused a crash even no no dialogue pops up with a
progress bar.
Take a look at bug 243436 as it seems to be substantially related.
I'm noticing this only sometimes happens, but enough that it originally seemed
always happening.  I just switched my mail accounts to store its sent mail in
local folders, rather than on my remote IMAP server ( Dovecot ) and Thunderbird
doesn't seem to crash on sending now.

Maybe the bug is in the FCC code?  Freeing an object too soon?
(In reply to comment #34)
> I'm noticing this only sometimes happens, but enough that it originally seemed
> always happening. 

For me, it usually happens on the second message send now, although I think
is used to happen on the first.


> I just switched my mail accounts to store its sent mail in
> local folders, rather than on my remote IMAP server ( Dovecot ) and Thunderbird
> doesn't seem to crash on sending now.

I don't use FCC. I BCC myself (so server-side filters will be envoked).
Maybe the local filesystem interaction is evading a timing issue ... or
maybe it's just a coincidence.... ?


PS. I created a new profile and set it to save a copy in local folders, but it
doesn't seem to help for me.

PPS. Further experimentation suggests that it doesn't crash on the first send
attempt because that yields a prompt for my SMTP password. If I let password
manager save my SMTP password, it consistently crashes on the first send.


I can confirm both the download crash and thunderbird send-mail crash on builds
from trunk 14-05-04. The error is the same for both:

(Gecko:7634): GLib-GObject-CRITICAL **: file gobject.c: line 1642
(g_object_get_data): assertion `G_IS_OBJECT (object)' failed
./run-mozilla.sh: line 423: 24057 Segmentation fault      "$prog" ${1+"$@"}
*** Bug 243876 has been marked as a duplicate of this bug. ***
Is this bug being looked at? It's a serious blocker for any gtk2/xft user..
Yeah, this is a blocker.

There's mention of checkins that might be responsible in bug 243343 comment 19.
Severity: critical → blocker
*** Bug 243940 has been marked as a duplicate of this bug. ***
Attached file longer stack
*** Bug 243912 has been marked as a duplicate of this bug. ***
The latest Thunderbird nightly no longer crashes when posting to newsgroups.

version 0.6+ (20040518)

Was this fixed?
to comment 44:
testing a fresh cvs build, Gtk2, Linux, i can no longer make this crash either.
Nor can I provoke the other crashes i saw with the same stack 
(simply opening/closing mozilla, or saving file, or using print preview)
so something has changed recently.
Using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040518
Firefox/0.8.0+ I no longer crash on completing a download.

Perhaps someone backed a change out that caused this problem without realising it?
I can no longer seem to crash Thunderbird on sending with todays build....  I
wonder what changed...
brian fixed this yesterday
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Flags: blocking1.8a?
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: