[Rd] Rgui.exe plot device "Save as" crash (PR#9237)

murdoch at stats.uwo.ca murdoch at stats.uwo.ca
Tue Sep 19 03:39:14 CEST 2006

On 9/18/2006 8:32 PM, mwtoews at sfu.ca wrote:
> Full_Name: Michael Toews
> Version: 2.3.1
> OS: WindowsXP Home/Proffesional SP2
> Submission from: (NULL) (
> Hi,
> I have a bug that I can reproduce on two different MS Windows platforms
> (1:AMD64x2/WinXP SP2 Home; 2:P4/WinXP SP2 Prof.) which is triggered by the "Save
> as" dialog when saving a plot from a Windows device onto the Desktop. This bug
> is difficult to reproduce, but here are some instructions to attempt a crash:
> 1) Start R from Start menu
> 2) Plot something simple, such as "plot(1:5)"
> 3) Choose "File > Save as PDF"
> 4) In the dialog, click the "Save in:" drop-down menu at the top, and select
> "Desktop"
> 5) Type "boohoo" in the "File name:" field, and click "Save"
> 6) Repeat steps 3 and 4, but try to not hover the mouse over any files or window
> controls, except for "boohoo.pdf" (although this isn't always the case). If you
> don't crash, repeat steps 3 to 5 again until a crash.
> 7) *crash*; Windows will display the default crash dialog; Rgui.exe will appear
> in the Windows Task Manager (ctrl-alt-del in Processes tab) using about 0 of
> CPU.

Thanks for the detailed instructions.  I can reproduce this in 2.3.1, 
and a fairly recent (but not today's) R-patched build.  I'm just 
building a current Alpha build to test it there.

I'm not sure it's something we'll be able to fix:  tooltips are very 
complicated things, involving tons of DLLs outside of R.  This could be 
an Adobe bug (since Acrobat might be involved in producing a tooltip for 
a PDF), a Windows bug, or something completely unrelated that just 
happens to be hooked into Explorer.  The fact that we can both see it 
suggests it's either in R or Windows, though.

> 8) Click "Don't Send" from the dialog
> 9) Observe that "Rgui.exe" is now using all available CPU resources for that
> thread (this is about 50 for Hyper-threading-enabled or dual-core CPUs). It is
> probably in an infinite loop.
> 10) Choose "Rgui.exe" from the Processes in Windows Task Manager, and click "End
> Process". Now your system will be stable, and you can repeat the bug, if you
> wish.
> Here are some things that do _not_ affect the outcome:
> - Presence or absence of a custom .Rprofile in C:\Program Files\R\R-2.3.1, or
> Rconsole in "My Documents"
> - The use of a different file name in step 5; I have also tried "tmp" and "rat a
> tat tat", so spaces don't seem to matter
> - The complexity of the plot
> - Active or inactive Windows devices
> - MDI or SDI modes for GUI
> Here are some things that _do_ affect the outcome:
> - No crash if you "Save as" any of the Jpeg options, but crash for all of the
> other formats (Metafile, Postscript, etc.)
> - No crash if in other folder, such as "My Documents"; this crash seems to
> happen only in the Desktop folder when accessed through the drop-down list at
> the top or the button on the left-hand side (oddly enough, when navigating an
> absolute path from C:\Documents and Settings\etc..\Desktop, there is no crash)
> - In the "Save as" dialog, if you navigate to the Desktop folder by selecting
> the button on the left-hand side of the dialog (rather than in the "Save in:"
> drop-down field as indicated in step 4), the crash does _not_ trigger the
> default Microsoft crash dialog, and Rgui.exe silently crashes (disappears), but
> remains as an active process, using ~ 50% of CPU resources, and requires a
> manual "End Process".
> - If "Debug" (if available) or "Send Report [to Microsoft]" are pressed in the
> crash dialog, the Rgui.exe process ends normally, and no manual "End Process" is
> required.
> Sorry if this seems "TooMuchAtOnce", but it is all the same bug with lots of
> details. My guess is it has something to do with the Tooltip from the Windows
> system "Save as" dialog, which suggests there is a bug in R's implementation of
> the system "Save as" dialog. As well, it appears to have problems with the
> "Desktop" folder when navigated from the convenient "Desktop" links (either from
> the upper drop-down list or left-hand button) in the "Save" dialog.
> I don't have access to a pre-compiled Win32 EXE of the the R 2.4.0 alpha
> releases, otherwise I would try to trigger this bug on the upcoming release.

You can download (approximately) daily builds from 

Duncan Murdoch

More information about the R-devel mailing list