From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <83y4i4ysp2.fsf@gnu.org> References: <87r3nwb4t4.fsf@gmail.com> <838ua419gg.fsf@gnu.org> <55B3D2C3.8060007@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437850463 11597 80.91.229.3 (25 Jul 2015 18:54:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jul 2015 18:54:23 +0000 (UTC) Cc: 21132@debbugs.gnu.org, flitterio@gmail.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 25 20:54:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZJ4aI-0007mv-Hg for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jul 2015 20:54:10 +0200 Original-Received: from localhost ([::1]:48745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJ4aI-0002zt-0y for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jul 2015 14:54:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJ4aE-0002zV-2z for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2015 14:54:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJ4aA-0006m4-Bd for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2015 14:54:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJ4aA-0006m0-8M for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2015 14:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZJ4aA-0007ov-2W for bug-gnu-emacs@gnu.org; Sat, 25 Jul 2015 14:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2015 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21132 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21132-submit@debbugs.gnu.org id=B21132.143785042730034 (code B ref 21132); Sat, 25 Jul 2015 18:54:02 +0000 Original-Received: (at 21132) by debbugs.gnu.org; 25 Jul 2015 18:53:47 +0000 Original-Received: from localhost ([127.0.0.1]:58734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJ4Zu-0007oM-JD for submit@debbugs.gnu.org; Sat, 25 Jul 2015 14:53:47 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:57440) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJ4Zs-0007oC-ES for 21132@debbugs.gnu.org; Sat, 25 Jul 2015 14:53:45 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NS200I00447F600@mtaout27.012.net.il> for 21132@debbugs.gnu.org; Sat, 25 Jul 2015 21:51:15 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NS2008CK4DFY9C0@mtaout27.012.net.il>; Sat, 25 Jul 2015 21:51:15 +0300 (IDT) In-reply-to: <55B3D2C3.8060007@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105127 Archived-At: > Date: Sat, 25 Jul 2015 20:17:39 +0200 > From: martin rudalics > CC: 21132@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.