emacs-devel
[Top][All Lists]
Advanced

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

Re: Debugging emacs memory management


From: Dima Kogan
Subject: Re: Debugging emacs memory management
Date: Mon, 05 Oct 2015 01:24:08 -0700

Eli Zaretskii <address@hidden> writes:

>> From: Dima Kogan <address@hidden>
>> Cc: address@hidden, address@hidden
>> Date: Mon, 05 Oct 2015 00:21:32 -0700
>> 
>> Hi. This is happening for me again. And I can't make it NOT happen now,
>> so I can't compare the two cases. You said you see x_new_font() calls,
>> but not the subsequent Fset_char_table_range() calls. I see these
>> Fset_char_table_range() calls with every new frame, and I don't know
>> where my emacs gets off track.
>
> The difference starts in this frame #13, inside fontset_from_font.  On
> my system, this call returns where indicated below:
>
>   int
>   fontset_from_font (Lisp_Object font_object)
>   {
>     Lisp_Object font_name = font_get_name (font_object);
>     Lisp_Object font_spec = copy_font_spec (font_object);
>     Lisp_Object registry = AREF (font_spec, FONT_REGISTRY_INDEX);
>     Lisp_Object fontset_spec, alias, name, fontset;
>     Lisp_Object val;
>
>     val = assoc_no_quit (font_spec, auto_fontset_alist);
>     if (CONSP (val))
>       return XINT (FONTSET_ID (XCDR (val))); <<<<<<<<<<<<<<<<<
>
> Evidently, on your system the call to assoc_no_quit doesn't return a
> cons cell, but something else, probably Qnil.  Is that true?

Yes. Qnil.


> If so, please show the values of the 2 arguments to assoc_no_quit (in
> their Lisp form, as displayed by the "pp" command).

This is the crux of the problem. The font_spec is

  #<font-spec nil unknown DejaVu\ Sans\ Mono nil iso10646-1 normal normal 
normal 14 nil 100 0 ((:name . "monospace-10") (user-spec . "monospace-10"))>

The auto_fontset_alist has many entries, all with the same identical key:

  #<font-spec nil unknown DejaVu\ Sans\ Mono nil iso10646-1 normal normal 
normal 14 nil 100 0 ((:name) (user-spec . "monospace-10"))>

Clearly these aren't identical, and this is the problem. I'm tracking
down where this is changed right now.


> Also, do you see the same call chain, with _exactly_ the same
> arguments, starting from fontset_from_font, each time you create a new
> frame?

Yep


> Finally, please give the exact sequence of commands you invoke to
> create a new frame, and what file/buffer is initially displayed in the
> new frame.  (I used src/xdisp.c via "C-x 5 f".)  I'd like to make sure
> we ask Emacs to do exactly the same job.

I initially make a daemon with "emacs -Q --daemon". Then I open a client
frame with "emacsclient -a '' -c". I open/close clients this way several
times to get the initialization out of the way. I don't touch the emacs
at all, so the initial *scratch* buffer is what's open.


> For the record, the range (64256 . 64262) covers the Latin ligatures,
> like ff.  DejaVu Sans Mono covers only 2 of them.  On my system, the
> default is Courier New, which supports more.  Not sure this has
> anything to do with the problem, but just in case, can you start Emacs
> with a Courier font, and see if the problem still happens?

I don't off the top of my head know how to do that, but let me
investigate the auto_fontset_alist key discrepancy first.

Thank you very much.



reply via email to

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