From murdoch.duncan at gmail.com  Fri Apr  8 19:05:47 2016
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Fri, 8 Apr 2016 13:05:47 -0400
Subject: [Rd] Under Windows,
 Rgui and Rterm crash if one tries to close the graphic device while
 identify or locator are running
In-Reply-To: <57041370.7030004@gmail.com>
References: <CANcXGixqBFipv1crwjnWre0=YykYk1VB6QVLvbf6EO1QAotHHg@mail.gmail.com>
	<5703D887.1010204@gmail.com>
	<CAFDcVCRQHrrcFR13wAPbSxToQ4v+xGQU1tT6vsD3mu9cUavXTw@mail.gmail.com>
	<57041370.7030004@gmail.com>
Message-ID: <5707E4EB.4030108@gmail.com>

On 05/04/2016 3:35 PM, Duncan Murdoch wrote:
> On 05/04/2016 11:56 AM, Henrik Bengtsson wrote:
> > If of any help,
> >
> > I can reproduce this (on Windows 7) back to at least R 3.0.3 but it's
> > not there in R 3.0.0.  (I have *not* checked with R 3.0.1 and 3.0.2
> > which I don't have installed).
>
> That doesn't necessarily mean that 3.0.0 was fine.  It's a segfault (I'd
> guess some memory being accessed after being freed), and it comes and
> goes as I add debugging print statements --- so it might have been there
> in 3.0.0 but we just got lucky and it never surfaced.
>
> Still, it's a start, and I'll try bisecting between 3.0.0 and 3.0.3 to
> see if some change caused it, rather than just triggered it.

I've tracked this down, and I believe I have a working fix now.  The 
issue was that the bug fix for PR#14872, a similar problem on Linux, 
fixed Linux and introduced a new bug in Windows.  For future reference, 
the problem is that it is currently not safe to call error() in a 
Windows event handler.  We may try to fix that over the summer, the 
current fix just avoids doing it.

Duncan Murdoch



[Rd] Under Windows, Rgui and Rterm crash if one tries to close the graphic device while identify or locator are running
Duncan Murdoch