Subject: Re: bug#11403: 24.0.96; Emacs crashes when ViewMail downloads IMAP messages

From: Chong Yidong <[email-masked]>
Date: Sat, 05 May 2012 12:06:52 +0800

Without a proper backtrace, the only thing I get out of this

5   org.gnu.Emacs     ns_term_shutdown + 79 (nsterm.m:4236)
6   org.gnu.Emacs     shut_down_emacs + 192 (emacs.c:2129)
7   org.gnu.Emacs     fatal_error_signal + 295 (emacs.c:360)
8   libSystem.B.dylib _sigtramp + 26
9   libobjc.A.dylib   objc_msgSend_vtable14 + 9
10  org.gnu.Emacs     x_free_frame_resources + 215 (nsterm.m:1166)
11  org.gnu.Emacs     x_destroy_window + 25 (nsterm.m:1181)

is that the [[view window] close]; call in x_free_frame_resources
triggers a fatal object from the operating system.  Maybe there is out
of order execution going on somewhere, causing Emacs to try to interact
with the window that was just closed?  Maybe the sendEvent method in
nsterm.m needs to check if the window is valid before using it?  (Just a
shot in the dark, I don't know the ns code well.)

Jan or Adrian, could you take a look into this?  Thanks.