unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
@ 2010-02-03  7:36 Carsten Bormann
  2010-03-30  9:31 ` Adrian Robert
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Bormann @ 2010-02-03  7:36 UTC (permalink / raw)
  To: 5515

(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)








^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
  2010-02-03  7:36 bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box Carsten Bormann
@ 2010-03-30  9:31 ` Adrian Robert
       [not found]   ` <5521A25A-8663-4D07-98D2-7655556495FC@tzi.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Robert @ 2010-03-30  9:31 UTC (permalink / raw)
  To: 5515; +Cc: cabo

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







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
       [not found]   ` <5521A25A-8663-4D07-98D2-7655556495FC@tzi.org>
@ 2010-04-03 15:18     ` Adrian Robert
  2010-04-10  6:26       ` Adrian Robert
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Robert @ 2010-04-03 15:18 UTC (permalink / raw)
  To: Carsten Bormann; +Cc: 5515

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]


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.


[-- Attachment #2: dot-emacs-reproduce-5515-1.el --]
[-- Type: application/octet-stream, Size: 1251 bytes --]

;; this is taken and simplified from: git://github.com/remvee/emacs-rails.git
;; flymake ruby support

(require 'flymake nil t)

(defconst flymake-allowed-ruby-file-name-masks
  '(("\\.rb\\'"      flymake-ruby-init))
  "Filename extensions that switch on flymake-ruby mode syntax checks.")

(defun flymake-ruby-init ()
  (condition-case er
      (let* ((temp-file (flymake-init-create-temp-buffer-copy
                         'flymake-create-temp-inplace))
             (local-file  (file-relative-name
                           temp-file
                           (file-name-directory buffer-file-name))))
        (list rails-ruby-command (list "-c" local-file)))
    ('error ())))

(defun flymake-ruby-load ()
  (setq flymake-allowed-file-name-masks
          (append flymake-allowed-file-name-masks flymake-allowed-ruby-file-name-masks))
  (flymake-mode t))

(add-hook 'ruby-mode-hook 'flymake-ruby-load)

(setq rails-ruby-command "/bad/file/name")

;; eval this buffer, as in:
; Emacs.app/Contents/MacOS/Emacs -Q -l dot-emacs-reproduce-5515-1.el
;; now edit (C-x C-f) a random .rb file.
;; -- the error message will come up fine (pop-up), acknowledge that
;; -- C-x C-v RET
;; -- this second error message is not visible and leads into nirvana

[-- Attachment #3: Type: text/plain, Size: 2 bytes --]




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
  2010-04-03 15:18     ` Adrian Robert
@ 2010-04-10  6:26       ` Adrian Robert
  2010-04-10  9:36         ` Carsten Bormann
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Robert @ 2010-04-10  6:26 UTC (permalink / raw)
  To: Carsten Bormann, 5515

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]


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

[-- Attachment #2: snowLeopard_dialog.patch --]
[-- Type: application/octet-stream, Size: 548 bytes --]

Index: nsmenu.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsmenu.m,v
retrieving revision 1.31
diff -u -p -r1.31 nsmenu.m
--- nsmenu.m	9 Nov 2009 06:21:03 -0000	1.31
+++ nsmenu.m	10 Apr 2010 06:09:44 -0000
@@ -1709,7 +1709,7 @@ void process_dialog (id window, Lisp_Obj
 
 - (Lisp_Object)runDialogAt: (NSPoint)p
 {
-  int ret;
+  NSInteger ret;
   extern EMACS_TIME timer_check (int do_it_now); /* TODO: add to a header */
 
   /* initiate a session that will be ended by pop_down_menu */

[-- Attachment #3: Type: text/plain, Size: 2 bytes --]




^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
  2010-04-10  6:26       ` Adrian Robert
@ 2010-04-10  9:36         ` Carsten Bormann
  2010-04-11 10:29           ` Adrian Robert
  2010-04-12 15:09           ` Adrian Robert
  0 siblings, 2 replies; 8+ messages in thread
From: Carsten Bormann @ 2010-04-10  9:36 UTC (permalink / raw)
  To: Adrian Robert; +Cc: 5515


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







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
  2010-04-10  9:36         ` Carsten Bormann
@ 2010-04-11 10:29           ` Adrian Robert
  2016-04-05 20:59             ` Alan Third
  2010-04-12 15:09           ` Adrian Robert
  1 sibling, 1 reply; 8+ messages in thread
From: Adrian Robert @ 2010-04-11 10:29 UTC (permalink / raw)
  To: Carsten Bormann; +Cc: 5515

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







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
  2010-04-10  9:36         ` Carsten Bormann
  2010-04-11 10:29           ` Adrian Robert
@ 2010-04-12 15:09           ` Adrian Robert
  1 sibling, 0 replies; 8+ messages in thread
From: Adrian Robert @ 2010-04-12 15:09 UTC (permalink / raw)
  To: Carsten Bormann; +Cc: 5515

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.








^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box
  2010-04-11 10:29           ` Adrian Robert
@ 2016-04-05 20:59             ` Alan Third
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Third @ 2016-04-05 20:59 UTC (permalink / raw)
  To: Adrian Robert; +Cc: Carsten Bormann, 5515-done

Adrian Robert <adrian.b.robert@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-05 20:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03  7:36 bug#5515: 23.1.92; OSX: Emacs gets stuck while wanting to display a dialog box Carsten Bormann
2010-03-30  9:31 ` Adrian Robert
     [not found]   ` <5521A25A-8663-4D07-98D2-7655556495FC@tzi.org>
2010-04-03 15:18     ` Adrian Robert
2010-04-10  6:26       ` Adrian Robert
2010-04-10  9:36         ` Carsten Bormann
2010-04-11 10:29           ` Adrian Robert
2016-04-05 20:59             ` Alan Third
2010-04-12 15:09           ` Adrian Robert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).