Subject: Re: bug#31312: Segmentation fault with doom-emacs, NeoTree and Zoom

From: martin rudalics <[email-masked]>
Date: Wed, 02 May 2018 15:42:29 +0200

> Yes, found it, seems to be a combination of zoom
 > window-size-change-functions called via prepare_menu_bars and doom
 > advice on balance-windows.  I got 12 changes of selected_window.  First
 > hit summarized inline, the rest of the backtraces are attached below.

Magnificent, many thanks.

A first interpretation is as follows (please correct me if you think
I'm wrong): The first hit stems from a call of 'delete-window' where
'frame-first-window' apparently finds a bad window.  The remainders
but the last one come from running 'window-configuration-change-hook'
where the saved selected window after running the local part of the
hook is dead.  The last one comes from 'window-size-change-functions'
where a call of 'select-window' apparently succeeds passing us a bad
window.

The 'window-configuration-change-hook' instances are design failures -
we simply have to let the selected window alone when the saved one has
been deleted.  The other two deserve some investigation.

martin