From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "WAROQUIERS Philippe" Newsgroups: gmane.emacs.bugs Subject: RE: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Date: Thu, 9 Aug 2007 09:39:08 +0200 Message-ID: <1B2B2EF98D55CB41BD16F13B18B9B0080303EE43@FFBRUE001.cfmu.corp.eurocontrol.int> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1186650803 8595 80.91.229.12 (9 Aug 2007 09:13:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2007 09:13:23 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 09 11:13:21 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IJ453-0001dz-2A for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Aug 2007 11:13:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJ452-0006bD-Be for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Aug 2007 05:13:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IJ2cK-0002qi-AX for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2007 03:39:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IJ2cH-0002px-Bj for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2007 03:39:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJ2cH-0002pu-4t for bug-gnu-emacs@gnu.org; Thu, 09 Aug 2007 03:39:33 -0400 Original-Received: from exprod8og57.obsmtp.com ([64.18.3.96]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IJ2cE-0000r7-Lf; Thu, 09 Aug 2007 03:39:30 -0400 Original-Received: from source ([193.221.170.179]) by exprod8ob57.obsmtp.com ([64.18.7.12]) with SMTP; Thu, 09 Aug 2007 00:39:20 PDT Original-Received: from HHBRUE006.hq.corp.eurocontrol.int (hhbrue006.hq.corp.eurocontrol.int [193.221.160.195]) by biscuit.eurocontrol.int (8.12.10/8.12.7) with ESMTP id l797d65p018995; Thu, 9 Aug 2007 09:39:16 +0200 (MEST) Original-Received: from FFBRUE001.cfmu.corp.eurocontrol.int ([193.58.25.51]) by HHBRUE006.hq.corp.eurocontrol.int with Microsoft SMTPSVC(6.0.3790.1830); Thu, 9 Aug 2007 09:39:09 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set Thread-Index: AcfaRSWSpQ2knbdCQFGAAyYBXoXcGwAEbgyA X-OriginalArrivalTime: 09 Aug 2007 07:39:09.0181 (UTC) FILETIME=[5F286AD0:01C7DA58] X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Thu, 09 Aug 2007 05:13:16 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16305 Archived-At: >Please try to debug it and find the cause. >First I suggest recompiling using -g. >That means the .gdbinit file wasn't found or didn't work. >Please try to figure out why. .gdbinit was not found because I was not in the good directory. After recompiling with debug and using gdb, I was able to see what is happening, and tested a fix. The problem is that when emacs starts up without DISPLAY, it calls the function tty_default_color_capabilities. For a reason not clear to me (my knowledge of C is *very* rusty), the static local variables in tty_default_color_capabilities are not properly initialized to NULL or 0 at startup. I first tried to just put a " =3D NULL;" and a "=3D 0;" but that did not solve the problem. At the end, the problem was solved by moving the static variables just before the function tty_default_color_capabilities=20 (and also initializing them to NULL/0). In other words, the below fixes the problem: /* Save or restore the default color-related capabilities of this terminal. */ static char *default_orig_pair, *default_set_foreground, *default_set_background =3D NULL; /* need init ??? */ static int default_max_colors, default_max_pairs, default_no_color_video =3D 0; /* need init ??? */ static void tty_default_color_capabilities (save) int save; { if (save) { if (default_orig_pair) As I do not understand too much the problem, if you need any other investigation, I can always see what I can do. Thanks for your help ... ____ This message and any files transmitted with it are legally privileged and= intended for the sole use of the individual(s) or entity to whom they ar= e addressed. If you are not the intended recipient, please notify the sen= der by reply and delete the message and any attachments from your system.= Any unauthorised use or disclosure of the content of this message is str= ictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitme= nt on the part of EUROCONTROL, unless it is confirmed by appropriately si= gned hard copy. Any views expressed in this message are those of the sender. =0D