[Rd] R-10 alpha windows() bug?

Duncan Murdoch murdoch at stats.uwo.ca
Fri Oct 9 21:10:12 CEST 2009


On 10/8/2009 6:21 PM, apjaworski at mmm.com wrote:
> This is my third attempt to send this message.  Hopefully this one will go 
> through.  If anybody got my previous attempts (one with 3 attached PNG 
> files and one with graph embedded in the message) I apologize for multiple 
> postings.
> 
> I tried to illustrate this possible bug by including screenshots but it 
> seems that these posts get blocked by something (r-devel-bounce?).  Below 
> I try to describe what happens in words.
> 
> I have been compiling patched and development versions of R regularly.  I 
> started compiling R-10.0 alpha a couple of days ago and I think I 
> discovered a bug in the "windows()" command.
> 
> Here is what is happening:.
> 
> 1.  Just compiled the latest tarball.  Before doing this I updated the 
> R-tools to version 2.10 (includes jpeg-7).
> 2.  Compilation went fine and I successfully built and ran the Windows 
> installer.
> 3.  I also successfully ran "make check-all".
> 4.  I start R GUI and do "plot(1:10)".  Here is what I get:
> 
> The plot is missing bottom and right-hand side (both the axis and part of 
> the box).
> The bottom is missing up to the third dot on the plot, i.e., the x-axis is 
> missing
> together with the first three points.

I can't reproduce this, and it seems unrelated to recent changes:  up to 
this point you're using old code in the windows() device, none of the 
new stuff in the jpeg-7 library.  So we need to investigate why your 
system thinks the window is a different size than it really is.


> 
> 5. When I go to File>Save As>Png... and go through the dialog box 
> (choosing a file name) I get the following GUI error:
> 
> A window pops up saying: "R for Windows GUI has encountered a problem and 
> needs to close.
> We are sorry for the inconvenience".  Closing this window causes R to 
> crash.

This could be related to the previous bug:  if the driver is sometimes 
miscalculating the size of a window, basically anything could go wrong 
when you start doing bulk copies of bits.  It may be creating a target 
buffer that's too small, etc.

> 6.  When, before saving, I resize the graphics window with my mouse even 
> by a very small amount, the plot changes to its normal look (without 
> missing axes of plot.png) and I can save it with no problem.

Resizing will send a message to the window giving the new size.  So it 
looks as though the problem is in the window initialization.

> 7.  When I do the same thing in just compiled 2.9.2 everything works fine 
> and the plot (plot.png above) looks fine.
> 8.  I suppose, all this is related to the following result of the 
> "windows()" command:
> 
> I get a window with the upper left chunk of it being dark gray and the 
> remaining part, i.e.,
> the bottom and the right-hand side being white.  The white portions 
> correspond to the missing
> parts of the plot described in 4.  Again, resizing this window even 
> slightly, fixes the
> problem -  the whole window becomes dark gray. 

Yes, this seems like a size calculation problem again.  One other 
question:  are you running in SDI or MDI mode? (MDI is the one where R 
makes its windows within one big frame, SDI keeps them separate.)

How big does the plot window end up?  (Measured by you in pixels and in 
inches.)  What resolution of display (in dots per inch) does Windows 
report?  (That's available in an "advanced" page of the control panel 
applet for the display.)  By default, R tries to create a window that is 
7 inches by 7 inches.  Does it look as though it's getting the pixel 
count for that correct?  Does specifying the xpinch and ypinch values in 
windows.options() help?

Duncan Murdoch

> 
> I am on the Windows XP SP2 machine.  Here is the output of R.version:
> 
>> R.version
>                _ 
> platform       i386-pc-mingw32 
> arch           i386 
> os             mingw32 
> system         i386, mingw32 
> status         alpha 
> major          2 
> minor          10.0 
> year           2009 
> month          10 
> day            07 
> svn rev        49971 
> language       R 
> version.string R version 2.10.0 alpha (2009-10-07 r49971)
> 
> 
> Regards,
> 
> Andy
> 
> 
> __________________________________
> Andy Jaworski
> 518-1-01
> Process Laboratory
> 3M Corporate Research Laboratory
> -----
> E-mail: apjaworski at mmm.com
> Tel:  (651) 733-6092
> Fax:  (651) 736-3122
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list