bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: emacs 22.1 on hp-ux 11.11 core dumps when DISPLAY not set


From: WAROQUIERS Philippe
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

>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  " = NULL;" and a "= 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 
(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
= NULL; /* need init ??? */
  static int default_max_colors, default_max_pairs,
default_no_color_video = 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 are 
addressed. If you are not the intended recipient, please notify the sender by 
reply and delete the message and any attachments from your system. Any 
unauthorised use or disclosure of the content of this message is strictly 
prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on 
the part of EUROCONTROL, unless it is confirmed by appropriately signed hard 
copy.

Any views expressed in this message are those of the sender.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]