From ripley at stats.ox.ac.uk  Tue Jul 29 23:37:57 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 29 Jul 2008 22:37:57 +0100 (BST)
Subject: [Rd] closing View windows after multiple View(x) crashes
In-Reply-To: <Pine.GSO.4.56.0807291400160.20024@devsun3201.insightful.com>
References: <488F48E4.1020203@zoology.ufl.edu>
	<Pine.GSO.4.56.0807291249340.20024@devsun3201.insightful.com>
	<488F8416.9000609@zoology.ufl.edu>
	<Pine.GSO.4.56.0807291400160.20024@devsun3201.insightful.com>
Message-ID: <alpine.LFD.1.10.0807292226030.8348@gannet.stats.ox.ac.uk>

We have found elsewhere that the need to use XSync is very dependent on 
the window manager. What manager were you using?

I'll add the call in any case.

On Tue, 29 Jul 2008, Bill Dunlap wrote:

> On Tue, 29 Jul 2008, Ben Bolker wrote:
>
>>    That works like a charm.  Thanks!
>>
>>    Ben Bolker
>
> Good.  Here is the patch I used.  (I didn't send it
> earlier because my code still had a bunch of Rprintf
> calls in it to track the event loop activity.
>
> Index: src/modules/X11/dataentry.c
> ===================================================================
> --- src/modules/X11/dataentry.c	(revision 46139)
> +++ src/modules/X11/dataentry.c	(working copy)
> @@ -1881,6 +1881,7 @@
> #endif
>     XDestroyWindow(iodisplay, DE->iowindow);
>     /* XCloseDisplay(iodisplay); */
> +    Rsync(DE);
> }
>
> #define USE_Xt 1
>
> Valgrind reports a slew of memory leaks when R closes
> after using View(), but it didn't show any use of freed
> or uninitialized memory after that change.
>
> ----------------------------------------------------------------------------
> Bill Dunlap
> Insightful Corporation
> bill at insightful dot com
>
> "All statements in this message represent the opinions of the author and do
> not necessarily reflect Insightful Corporation policy or position."
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] closing View windows after multiple View(x) crashes
Prof Brian Ripley