On Sun, Aug 12, 2007 at 08:23:20PM +0200 I heard the voice of
佐藤 純弘 via RT, and lo! it spake thus:
>
> to reproduce this, 
>   1. run ctwmrc with attched .ctwmrc
>   2. then get no-title bar window popup
>        easiest way is using Firefox, go basic authenticated page
>        then enable to get password popup
>   3. click button to close popup (OK / Cancel /etc/)
>   4. ... then ctwm crash, get core.

I get a slightly different trace.  Whether that's due to code changes,
or corruption from signal handlers, I don't know.

Mine is bombing out in events.c:2681, which is:

    XTranslateCoordinates(dpy, Tmp_win->vs->window, [...]

Examination of the core in gdb shows that Tmp_win->vs is NULL, hence
the SEGV.  The attached patch seems to prevent the crash here, but I
have no idea whether it's a correct fix, or just invalid in a
non-crashing way; it's very much shotgunned.  Olaf may know better?


-- 
Matthew Fuller     (MF4839)   |  [EMAIL PROTECTED]
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

#
# old_revision [1dfd5be037e9fb09f9aee3d938dcca2848aa7744]
#
# patch "events.c"
#  from [39f3358ff082d672b599845150ceab6806a03603]
#    to [faecee097f0d8826210e043688de7642c4b3814d]
#
============================================================
--- events.c    39f3358ff082d672b599845150ceab6806a03603
+++ events.c    faecee097f0d8826210e043688de7642c4b3814d
@@ -2675,10 +2675,14 @@ void HandleButtonRelease(void)
        if(xl < 0 || yt < 0 || xl > Scr->rootw || yt > Scr->rooth) {
                int odestx, odesty;
                int destx, desty;
-               Window cr;
+               Window cr, tsrc;
                virtualScreen *newvs;
 
-               XTranslateCoordinates(dpy, Tmp_win->vs->window, 
+               if(Tmp_win->vs!=NULL)
+                       tsrc = Tmp_win->vs->window;
+               else
+                       tsrc = Scr->Root;
+               XTranslateCoordinates(dpy, tsrc,
                        Scr->XineramaRoot, xl, yt, &odestx, &odesty, &cr);
 
                newvs = findIfVScreenOf(odestx, odesty);

Reply via email to