From ripley at stats.ox.ac.uk  Fri Apr 29 08:40:52 2005
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Fri Apr 29 08:41:00 2005
Subject: (PR#7821) [Rd] Rgui crash when >1 figure plotted to single wmf
Message-ID: <20050429064052.690A3A1ED@slim.kubism.ku.dk>

On Thu, 28 Apr 2005 rich.fitzjohn@gmail.com wrote:

> R for Windows crashes where more than one plot is plotted to a windows
> metafile where an integer format is not included in the character
> string (i.e. when attempting to write more than one plot to the same
> file).

That is a user error, but the C code is missing a test for a non-NULL 
pointer.

What is unclear is why the metafile cannot be created.  Although we have 
called CloseEnhMetafile and DeleteEnhMetafile, it seems Windows is still
locking the file it opened.  I don't know how to work around that.

> win.metafile("tmp.wmf")
> plot(1:10)
> plot(1:10)
>
> The following dialogues then come up:
>
> Unable to create metafile

-- 
Brian D. Ripley,                  ripley@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


(PR#7821) [Rd] Rgui crash when >1 figure plotted to single wmf
ripley@stats.ox.ac.uk