One difference with the original report that I should mention is that I
encounter the crash only when I move the transient window off-screen.
This seems fairly expected, since the NULL dereference occurs inside an
if-block which tests for exactly such a condition. I used a transient
window of xmh for testing (a bit faster to start up than Firefox and
useful while I was offline).

On Wed 26 Dec 2007 at 21:05:30 +0100, Matthew D. Fuller via RT wrote:
> I wonder if it has something to do with being a transient window
> (which doesn't have occupation, without that option set, which isn't
> in the given rc file).

The same thought had occurred to me. I tried adding
TransientHasOccupation and DecorateTransients (separately and together)
but it made no difference. What does make a difference though is adding
a Workspaces {...} statement. With that, the crash no longer occurs.

Tracing this indeed reveals, in add_window.c:AddWindow():

    /*===============[ Matthew McNeill 1997 ]==========================*
     * added the occupation parameter to this function call so that the 
     * occupation can be set up in a specific state if desired 
     * (restore session for example)
     */

    /* note, this is where tmp_win->vs get setup, among other things */

    if (restoredFromPrevSession) {
      SetupOccupation (tmp_win, saved_occupation);
    } else
      SetupOccupation (tmp_win, 0);
    tmp_win->old_parent_vs = vs;
    /*=================================================================*/

and workmgr.c:SetupOccupation() starts with

    if (! Scr->workSpaceManagerActive) {
        twm_win->occupation = 1;
        return;
    }
 
I suppose this must be cleaned up, to at least initialise all other
fields to some sane default.

Untested:

    if (! Scr->workSpaceManagerActive) {
        twm_win->occupation = 1 << 0;   /* occupy workspace #0 */
        /*
         * Choose some valid virtual screen.
         * InitVirtualScreens() always seems to set this to non-NULL.
         */
        twm_win->vs = Scr->vScreenList; /* only one virtual screen */
        /* more?... */
        return;
    }

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.

Reply via email to