all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Hang in Emacs 21.3.50
@ 2002-11-29 11:15 Dhruva Krishnamurthy
  2002-11-29 13:26 ` Kai Großjohann
  2002-11-30 14:05 ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Dhruva Krishnamurthy @ 2002-11-29 11:15 UTC (permalink / raw)
  Cc: Emacs Devel

Hello,
 I am using Emacs on W2K from CVS (21.3.50) compiled in MinGW32 2.0.

I try setting the default frame properties in 2 ways:
1.
(nconc default-frame-alist
       (list '(height . 40))
       (list '(font . "-*-Arial
       Monospaced-normal-r-*-*-13-*-*-*-c-*-fontset-standard"))
       (list '(background-color . "light grey")))
This works.

2.
(defconst my-def-font "-*-Arial
Monospaced-normal-r-*-*-13-*-*-*-c-*-fontset-standard")
(nconc default-frame-alist
       (list '(height . 40))
       (list '(font . my-def-font))
       (list '(background-color . "light grey")))

This hangs Emacs (99% CPU usage in task manager).

 I have no clue and do not know how to debug a HANG using GDB.

with regards,
dhruva

-- 
Dhruva Krishnamurthy

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

* Re: Hang in Emacs 21.3.50
  2002-11-29 11:15 Dhruva Krishnamurthy
@ 2002-11-29 13:26 ` Kai Großjohann
  2002-11-30 14:05 ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Kai Großjohann @ 2002-11-29 13:26 UTC (permalink / raw)


"Dhruva Krishnamurthy" <seagull@fastmail.fm> writes:

> 2.
> (defconst my-def-font "-*-Arial
> Monospaced-normal-r-*-*-13-*-*-*-c-*-fontset-standard")
> (nconc default-frame-alist
>        (list '(height . 40))
>        (list '(font . my-def-font))
>        (list '(background-color . "light grey")))

What you want is `(font . ,my-def-font) instead of '(font .
my-def-font) -- the latter uses the symbol my-def-font as the font,
the former evals it as a variable.

And I think nconc is somewhat dangerous (in esoteric cases).  How
about the following?

    (add-to-list 'default-frame-alist '(height . 40))
    (add-to-list 'default-frame-alist `(font . ,my-def-font))
    (add-to-list 'default-frame-alist '(background-color . "light grey"))

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

* Re: Hang in Emacs 21.3.50
  2002-11-29 11:15 Dhruva Krishnamurthy
  2002-11-29 13:26 ` Kai Großjohann
@ 2002-11-30 14:05 ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2002-11-30 14:05 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

     I have no clue and do not know how to debug a HANG using GDB.

See etc/DEBUG for a lot of advice.  You can stop Emacs by typing
C-z at the window where GDB is running.

    What you want is `(font . ,my-def-font) instead of '(font .
    my-def-font) -- the latter uses the symbol my-def-font as the font,
    the former evals it as a variable.

This is a bug in Dhruva's code, but it still seems wrong
for Emacs to loop--it ought to report an error.  Can someone
debug why it loops, and make it report a clean error?

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

* Re: Hang in Emacs 21.3.50
@ 2002-12-04 11:01 Dhruva Krishnamurthy
  2002-12-04 15:18 ` Eli Zaretskii
  2002-12-04 21:57 ` Jason Rumney
  0 siblings, 2 replies; 6+ messages in thread
From: Dhruva Krishnamurthy @ 2002-12-04 11:01 UTC (permalink / raw)
  Cc: Emacs Bug, Emacs Devel

On Sat, 30 Nov 2002 09:05:57 -0500, "Richard Stallman" <rms@gnu.org>
said:
>      I have no clue and do not know how to debug a HANG using GDB.
> 
> See etc/DEBUG for a lot of advice.  You can stop Emacs by typing
> C-z at the window where GDB is running.

  Did not work in W2k, the interrupt must be some other key (C-Brk killed
  the session!)
  I built Emacs using MSVC 6.0 and debugged.

> This is a bug in Dhruva's code, but it still seems wrong
> for Emacs to loop--it ought to report an error.  Can someone
> debug why it loops, and make it report a clean error?

 I did some further debugging using MSVC 6.0 debugger. I would like to
 report another scenerio which causes a similar HANG (infinite loop) in
 w32fns.c:w32_msg_pump()

1. I use Aspell (latest : 05.3-2 I guess)
2. When I do "M-x ispell-buffer", it goes to w32fns.c:w32_msg_pump() and
gets into an infinite loop (GetMessage())
3. The thread exits (presumably Aspell) with return value "1" (some error
I guess).

I feel the threads are getting into some sort of dead lock. In the Aspell
case, I am quite sure of it.

IMHO, this bug needs to be examined by a Win32 internal experts or
generally threads experts.

with best regards,
dhruva

PS:
Emacs is multi threaded. Am I right or am I missing something.

-- 
Dhruva Krishnamurthy

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

* Re: Hang in Emacs 21.3.50
  2002-12-04 11:01 Hang in Emacs 21.3.50 Dhruva Krishnamurthy
@ 2002-12-04 15:18 ` Eli Zaretskii
  2002-12-04 21:57 ` Jason Rumney
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2002-12-04 15:18 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

> From: "Dhruva Krishnamurthy" <seagull@fastmail.fm>
> Date: Wed, 04 Dec 2002 16:31:22 +0530
> > 
> > See etc/DEBUG for a lot of advice.  You can stop Emacs by typing
> > C-z at the window where GDB is running.
> 
>   Did not work in W2k, the interrupt must be some other key (C-Brk killed
>   the session!)

See the end of the file etc/DEBUG, it explains how to stop Emacs from
the MSVC debugger.

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

* Re: Hang in Emacs 21.3.50
  2002-12-04 11:01 Hang in Emacs 21.3.50 Dhruva Krishnamurthy
  2002-12-04 15:18 ` Eli Zaretskii
@ 2002-12-04 21:57 ` Jason Rumney
  1 sibling, 0 replies; 6+ messages in thread
From: Jason Rumney @ 2002-12-04 21:57 UTC (permalink / raw)
  Cc: Richard Stallman, Emacs Bug, Emacs Devel

"Dhruva Krishnamurthy" <seagull@fastmail.fm> writes:

>  I did some further debugging using MSVC 6.0 debugger. I would like to
>  report another scenerio which causes a similar HANG (infinite loop) in
>  w32fns.c:w32_msg_pump()
> 
> 1. I use Aspell (latest : 05.3-2 I guess)
> 2. When I do "M-x ispell-buffer", it goes to w32fns.c:w32_msg_pump() and
> gets into an infinite loop (GetMessage())

It is normal for the message pump thread to spend most of its time in
GetMessage(), and the loop is intentional. The lisp/redisplay thread
is more interesting in cases where Emacs appears to be hung.

> PS:
> Emacs is multi threaded. Am I right or am I missing something.

On MS Windows, there is the main Lisp thread, a message pump thread
(which simulates asynchronous signals and allow C-g to interrupt the
Lisp thread even when it is performing a blocking operation), and a
thread for each subprocess to handle I/O from that subprocess. The
latter thread normally exits when the subprocess exits, so the
message you see about a thread exiting is probably the thread
handling I/O for aspell, as you guessed.

The question, I think, is why does Emacs appear to hang when aspell
exits unexpectedly.

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

end of thread, other threads:[~2002-12-04 21:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-04 11:01 Hang in Emacs 21.3.50 Dhruva Krishnamurthy
2002-12-04 15:18 ` Eli Zaretskii
2002-12-04 21:57 ` Jason Rumney
  -- strict thread matches above, loose matches on Subject: below --
2002-11-29 11:15 Dhruva Krishnamurthy
2002-11-29 13:26 ` Kai Großjohann
2002-11-30 14:05 ` Richard Stallman

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.