GNU bug report logs - #5515
23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box

Previous Next

Package: emacs;

Reported by: Carsten Bormann <cabo <at> tzi.org>

Date: Wed, 3 Feb 2010 07:40:03 UTC

Severity: normal

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5515 in the body.
You can then email your comments to 5515 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5515; Package emacs. (Wed, 03 Feb 2010 07:40:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carsten Bormann <cabo <at> tzi.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 03 Feb 2010 07:40:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carsten Bormann <cabo <at> tzi.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box 
Date: Wed, 3 Feb 2010 08:36:13 +0100
(This bug may be related to some quirkyness around external
subprocesses, such as those started by flymake or archive-mode.  These
sometimes don't run properly, but I haven't been able to pin that one
down at all.  They do cause a dialog box, e.g., indicating that a
program is not found which is very much there.  This in turn may be
related to a bug where Emacs still thinks it has subprocesses attached
to a buffer that is to be killed.  All very confusing.  On to this bug:)

Approximately the second dialog box that Emacs displays because of the
above quirkyness gets stuck in the following way:

The dialog box is not displayed, but Emacs also no longer accepts any
input on the existing frames.  Looking at it in the debugger suggests
that there should indeed be a dialog box visible:

^C
Program received signal SIGINT, Interrupt.
0x00007fff876399ee in __semwait_signal ()
(gdb) where
#0  0x00007fff876399ee in __semwait_signal ()
#1  0x00007fff8763987d in nanosleep ()
#2  0x00007fff88a5677c in +[NSThread sleepUntilDate:] ()
#3  0x00000001001a5b87 in -[EmacsDialogPanel runDialogAt:] ()
#4  0x003a657461446c69 in ?? ()

This is as good as a crash as there is no way to supply any further
input to the running Emacs.
(Obviously, I restarted Emacs to type this bug report.)

Recent version built from git (repo.or.cz).
OSX 10.6.2, 64-bit.

In GNU Emacs 23.1.92.2 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25)
 of 2010-01-31 on tuffi.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--without-dbus' '--without-x' '--with-ns' 'CFLAGS=-O9 -mtune=nocona -pipe -fomit-frame-pointer''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  iswitchb-mode: t
  partial-completion-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<menu-bar> <help-menu> <send-emacs-bug-report>

Recent messages:
Loading dired-x...done
Loading page-ext...done
Loading feedmail...done
Loading /Users/cabo/el/xmlunicode.el (source)...
Loading /Users/cabo/el/unichars.el (source)...done
Loading /Users/cabo/el/xmlunicode.el (source)...done
Loading hideshow...done
Loading comint-complete (compiled; note, source file is newer)...done
Loading gnus...done
Loading paren...done

Load-path shadows:
/Users/cabo/el/cedet-1.0pre4/speedbar/speedbar hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/speedbar
/Users/cabo/el/cedet-1.0pre4/speedbar/sb-image hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/sb-image
/Users/cabo/el/longlines hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/longlines
/Users/cabo/el/cedet-1.0pre4/common/ezimage hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/ezimage
/Users/cabo/el/cedet-1.0pre4/speedbar/dframe hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/dframe
/Users/cabo/el/ruby-mode hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/progmodes/ruby-mode
/Users/cabo/el/cedet-1.0pre4/eieio/eieio hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eieio
/Users/cabo/el/cedet-1.0pre4/eieio/eieio-speedbar hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eieio-speedbar
/Users/cabo/el/cedet-1.0pre4/eieio/eieio-opt hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eieio-opt
/Users/cabo/el/cedet-1.0pre4/eieio/eieio-custom hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eieio-custom
/Users/cabo/el/cedet-1.0pre4/eieio/eieio-comp hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eieio-comp
/Users/cabo/el/cedet-1.0pre4/eieio/eieio-base hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/eieio-base
/Users/cabo/el/cedet-1.0pre4/eieio/chart hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/chart
/Users/cabo/el/cedet-1.0pre4/semantic/semantic hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/semantic
/Users/cabo/el/cedet-1.0pre4/common/mode-local hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/mode-local
/Users/cabo/el/cedet-1.0pre4/common/inversion hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/inversion
/Users/cabo/el/cedet-1.0pre4/ede/ede hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/ede
/Users/cabo/el/cedet-1.0pre4/common/cedet hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/cedet
/Users/cabo/el/cedet-1.0pre4/common/cedet-files hides /Users/cabo/big/be/emacs/nextstep/Emacs.app/Contents/Resources/lisp/cedet/cedet-files

Features:
(shadow mail-extr message ecomplete rfc822 mml mml-sec password-cache
mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045
qp ietf-drums mailabbrev gmm-utils mailheader canlock sha1 hex-util
hashcash emacsbug semantic-el semantic-bovine bovine-debug
semantic-debug uniquify paren gnus gnus-ems nnheader gnus-util netrc
time-date mm-util mail-prsvr hideshow quail help-mode view feedmail
mail-utils page-ext dired-x dired-aux nxml-mode nxml-outln nxml-rap
nxml-util nxml-glyph nxml-enc xmltok iswitchb server planner-multi crm
planner cal-menu calendar cal-loaddefs sort muse-html muse-xml-common
muse-colors muse-mode muse-project cus-edit cus-start cus-load
muse-publish muse muse-protocols sb-info info muse-regexps
muse-nested-tags complete emacs-wiki emacs-wiki-publish executable
emacs-wiki-project emacs-wiki-macros emacs-wiki-colors
emacs-wiki-regexps pcomplete git ewoc vc-git utf-8m psvn log-edit
pcvs-util add-log diff-mode easy-mmode dired desktop edmacro kmacro
jka-compr erc-match erc-goodies erc erc-backend erc-compat format-spec
thingatpt pp org-install rails rails-spec rails-features
rails-controller-layout rails-model-layout rails-ui rails-log rails-ws
rails-test rails-rake rails-scripts rails-find rails-navigation
rails-cmd-proxy rails-lib rails-ruby inf-ruby ruby-mode flymake compile
align rails-core rails-project rails-compat inflections
predictive-prog-mode flyspell ispell find-recursive etags ansi-color sql
comint mmm-mode mmm-univ mmm-class mmm-region mmm-utils mmm-auto
mmm-vars mmm-compat regexp-opt ecb-autoloads cedet cedet-contrib-load
speedbar-load semantic-load senator ring which-func semantic-imenu
semantic-sb imenu semantic-idle semantic-ia-sb semantic-analyze
semantic-ctxt semantic-format semantic-cb semantic-sort semanticdb-find
semanticdb-el semanticdb-search semantic-find semanticdb
semantic-util-modes semantic-util semantic semantic-lex semantic-tag
working fame semantic-fw mode-local find-func derived eieio-load
ede-speedbar ede ede-load eieio-speedbar speedbar sb-image ezimage
dframe assoc eieio-custom wid-edit ede-source eieio-base eieio advice
help-fns advice-preload cogre-load cedet-load inversion cl cl-19
tex-site auto-loads package reporter tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)






bug reassigned from package 'emacs' to 'emacs,ns'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 08 Feb 2010 20:10:03 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, help-debbugs <at> gnu.org:
bug#5515; Package emacs,ns. (Tue, 30 Mar 2010 09:32:02 GMT) Full text and rfc822 format available.

Message #10 received at 5515 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: 5515 <at> debbugs.gnu.org
Cc: cabo <at> tzi.org
Subject: Re: 23.1.92;
	OSX: Emacs gets stuck while wanting to display a dialog box
Date: Tue, 30 Mar 2010 12:31:18 +0300
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5515

Hello,

Could you please provide a step-by-step procedure, starting from emacs -Q, to reproduce this bug?

thank you,
Adrian





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5515; Package emacs,ns. (Sat, 03 Apr 2010 15:19:02 GMT) Full text and rfc822 format available.

Message #13 received at 5515 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: Carsten Bormann <cabo <at> tzi.org>
Cc: 5515 <at> debbugs.gnu.org
Subject: Re: 23.1.92;
	OSX: Emacs gets stuck while wanting to display a dialog box
Date: Sat, 3 Apr 2010 18:18:17 +0300
[Message part 1 (text/plain, inline)]
On Apr 3, 2010, at 12:57 PM, Carsten Bormann wrote:

> I have distilled the test case to the attached file.
> Sorry, I don't know how to reduce this further.
> At least it's fully reproduceable with various Emacs versions around 23.1/24.0.
> I only tried it on 10.6, though.

[dot-emacs-reproduce-5515-1.el (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]


Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5515; Package emacs,ns. (Sat, 10 Apr 2010 06:27:02 GMT) Full text and rfc822 format available.

Message #16 received at 5515 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: Carsten Bormann <cabo <at> tzi.org>,
 5515 <at> debbugs.gnu.org
Subject: Re: 23.1.92;
	OSX: Emacs gets stuck while wanting to display a dialog box
Date: Sat, 10 Apr 2010 09:26:04 +0300
[Message part 1 (text/plain, inline)]
On Apr 3, 2010, at 6:18 PM, Adrian Robert wrote:

> 
> On Apr 3, 2010, at 12:57 PM, Carsten Bormann wrote:
> 
>> I have distilled the test case to the attached file.
>> Sorry, I don't know how to reduce this further.
>> At least it's fully reproduceable with various Emacs versions around 23.1/24.0.
>> I only tried it on 10.6, though.
> 
> <dot-emacs-reproduce-5515-1.el>

Hello Carsten,

Thank you for this test case.  I tried the procedure outlined, but could not reproduce the issue on a somewhat older (23.1.90) version of emacs, running 64-bit on 10.6.2.  I guess we have a regression here.  However, I fixed a related dialog problem (bug#5811) with the attached patch.  Would you be able to test it and see if it does anything for the issue in your case?

thanks,
Adrian
[snowLeopard_dialog.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]


Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5515; Package emacs,ns. (Sat, 10 Apr 2010 09:37:02 GMT) Full text and rfc822 format available.

Message #19 received at 5515 <at> debbugs.gnu.org (full text, mbox):

From: Carsten Bormann <cabo <at> tzi.org>
To: Adrian Robert <adrian.b.robert <at> gmail.com>
Cc: 5515 <at> debbugs.gnu.org
Subject: Re: 23.1.92;
	OSX: Emacs gets stuck while wanting to display a dialog box
Date: Sat, 10 Apr 2010 11:36:22 +0200
On Apr 10, 2010, at 08:26, Adrian Robert wrote:

> 
> On Apr 3, 2010, at 6:18 PM, Adrian Robert wrote:
> 
>> 
>> On Apr 3, 2010, at 12:57 PM, Carsten Bormann wrote:
>> 
>>> I have distilled the test case to the attached file.
>>> Sorry, I don't know how to reduce this further.
>>> At least it's fully reproduceable with various Emacs versions around 23.1/24.0.
>>> I only tried it on 10.6, though.
>> 
>> <dot-emacs-reproduce-5515-1.el>
> 
> Hello Carsten,
> 
> Thank you for this test case.  I tried the procedure outlined, but could not reproduce the issue on a somewhat older (23.1.90) version of emacs, running 64-bit on 10.6.2.  

I just tried rebuilding Emacs 24.0. from scratch, from the git version 218181d7f636089824e9f876a5d662bf2e350229.
Using the parameters you told me:

setenv CFLAGS '-g'
./configure --with-ns
make -j3
make install

Running this on 10.6.3 (but I previously reproduced this on 10.6.2).

Now it takes three attempts (not two as previously) to open a Ruby file to reproduce the bug.
(This appears to point to some randomness influencing the occurrence of the bug.)


> I guess we have a regression here.  However, I fixed a related dialog problem (bug#5811) with the attached patch.  Would you be able to test it and see if it does anything for the issue in your case?

I then applied the patch, rebuilt (make -j3; make install), and retried.
(I cannot reproduce 5811 with the patched version, but I didn't try before patching; I *can* reproduce 5811 with an earlier 24.0.50 from http://emacsformacosx.com/builds -- the one built 2010-03-30; so this bug now seems to be fixed.)

Unfortunately, the patch makes no difference in the behavior wrt 5515.

BTW, if I evoke the print dialog once (CMD-P), click No, and then try the C-x C-f, I need only two attempts to trigger the bug.  If I evoke the print dialog twice, click No, and then try the C-x C-f, I trigger the bug immediately.  So it looks like the third dialog gets hit, but:
I can evoke the print dialog as much as I want without triggering the bug.

So, it looks like:
-- the bug only happens if dialogs have been active before (used to be once, now twice).
-- the bug only happens if the dialog is evoked in some rather specific circumstances (such as here: from an error handler in the creation of a process that is started from a timer handler).

Looks like this needs more work to properly isolate.

Gruesse, Carsten





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5515; Package emacs,ns. (Sun, 11 Apr 2010 10:30:03 GMT) Full text and rfc822 format available.

Message #22 received at 5515 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: Carsten Bormann <cabo <at> tzi.org>
Cc: 5515 <at> debbugs.gnu.org
Subject: Re: 23.1.92;
	OSX: Emacs gets stuck while wanting to display a dialog box
Date: Sun, 11 Apr 2010 13:29:32 +0300
Thanks, I'm able to reproduce it -- hitting the C-x C-v a second time as you say did the trick.

I'll try to fix it when I get a chance.


-Adrian





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5515; Package emacs,ns. (Mon, 12 Apr 2010 15:10:03 GMT) Full text and rfc822 format available.

Message #25 received at 5515 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Robert <adrian.b.robert <at> gmail.com>
To: Carsten Bormann <cabo <at> tzi.org>
Cc: 5515 <at> debbugs.gnu.org
Subject: Re: 23.1.92;
	OSX: Emacs gets stuck while wanting to display a dialog box
Date: Mon, 12 Apr 2010 18:09:16 +0300
BTW, a couple of other comments re: interaction with the print dialog.  With me, the print dialog seems to help things.  If I do the first bad-find-ruby-file, then a Cmd-P, then I can do any number of bad-find-ruby-files without issue.  I don't know why.  Also, the behavior seems 100% deterministic in my case -- same patterns will always lead to the "nirvana" state.  Something inside the state of emacs / NS's event handling has changed, but I have not been able to isolate what.






Reply sent to Alan Third <alan <at> idiocy.org>:
You have taken responsibility. (Tue, 05 Apr 2016 21:00:02 GMT) Full text and rfc822 format available.

Notification sent to Carsten Bormann <cabo <at> tzi.org>:
bug acknowledged by developer. (Tue, 05 Apr 2016 21:00:02 GMT) Full text and rfc822 format available.

Message #30 received at 5515-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Adrian Robert <adrian.b.robert <at> gmail.com>
Cc: Carsten Bormann <cabo <at> tzi.org>, 5515-done <at> debbugs.gnu.org
Subject: Re: bug#5515: 23.1.92;
 OSX: Emacs gets stuck while wanting to display a dialog box
Date: Tue, 05 Apr 2016 21:59:49 +0100
Adrian Robert <adrian.b.robert <at> gmail.com> writes:

> Thanks, I'm able to reproduce it -- hitting the C-x C-v a second time as you say did the trick.
>
> I'll try to fix it when I get a chance.

I can't reproduce this in Emacs 25, so I'm guessing it got fixed a while
back.

I'll close this bug.
-- 
Alan Third




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 May 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.