GNU bug report logs - #21132
25.0.50; Emacs on Windows crashes evaluating x-frame-geometry in batch mode

Previous Next

Package: emacs;

Reported by: flitterio <at> gmail.com (Francis Litterio)

Date: Sat, 25 Jul 2015 16:07:01 UTC

Severity: normal

Found in version 25.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 21132 <at> debbugs.gnu.org, flitterio <at> gmail.com
Subject: Re: bug#21132: 25.0.50;
 Emacs on Windows crashes evaluating x-frame-geometry in batch mode
Date: Sat, 25 Jul 2015 21:53:45 +0300
> Date: Sat, 25 Jul 2015 20:17:39 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: 21132 <at> debbugs.gnu.org
> 
>  >> Emacs built from the latest source on Windows crashes when invoked
>  >> as follows:
>  >>
>  >>    emacs.exe -Q -batch --eval="(x-frame-geometry (selected-frame))"
>  >
>  > Thanks, fixed.
> 
> Do you have any simple guideline how to find similar instances of this
> bug?

Look for unconditional uses of FRAME_W32_WINDOW in code that is not
guaranteed to be invoked in a GUI session.  Functions exposed to Lisp
are an obvious candidate, as in this case.

> And what is the difference between !FRAME_INITIAL_P (f) and
> FRAME_W32_WINDOW (f)?

FRAME_W32_WINDOW is not a predicate.  You probably meant
FRAME_INITIAL_P and FRAME_W32_P.  The difference is the method used to
output text.

> I suppose that !FRAME_INITIAL_P (f) implies
> FRAME_W32_WINDOW (f).

No, it implies (on w32) FRAME_W32_P or FRAME_TERMCAP_P.

> So there are probably cases when we use
> FRAME_W32_WINDOW (f) and FRAME_INITIAL_P (f) holds.  Right?

If there are, we will crash.

> And do we prefer (FRAME_W32_WINDOW (f) != 0) to (!FRAME_W32_WINDOW (f))?

We prefer !FRAME_W32_P (f)

> Also I believe that I should replace FRAME_X_WINDOW by FRAME_W32_WINDOW.

Yes.

>  > I believe similar changes are needed in xfns.c and in nsfns.m, could
>  > someone with access to the relevant OSes please check and apply?
> 
> I'll look into these.

Thanks.




This bug report was last modified 9 years and 331 days ago.

Previous Next


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