Subject: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

From: David Engster <[email-masked]>
Date: Mon, 23 Nov 2015 21:55:24 +0100

I've compiled from the emacs-25 branch (f146ea73a9ca6) simply with
'./configure' (output see below), but I've also seen this problem with
Emacs 24.5.

I do the following:

- emacs -Q

- Enter in the scratch buffer

  (custom-set-faces
    '(default ((t (:height 100 :family "DejaVu Sans Mono")))))
  (set-frame-width nil 60)

- Run 'M-x dired'

What I see:

- The frame width suddenly becomes wider (to 78 characters)

- In the console output, I see

  (emacs:27459): Gtk-CRITICAL **: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed

- I also see this assertion when I resize the frame with the mouse to a
  smaller width than those 78 characters.

- I do *not* have these problems with a bitmap font like "Terminus".

- I also do *not* have these problems with a Lucid build.

This is on a Debian 8 machine with GTK '3.14.5-1+deb8u1'.

Configure output:

Configured for 'x86_64-unknown-linux-gnu'.
                      
  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -std=gnu99 -g3 -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng12
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use cairo?                                   no
  Does Emacs use imagemagick?                             yes
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    no
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              yes
  Does Emacs use -lotf?                                   yes
  Does Emacs use -lxft?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                no
  Does Emacs use toolkit scroll bars?                     yes