Bug 14668 - Contents of graphics devices not drawn when opening many at once
Contents of graphics devices not drawn when opening many at once
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Graphics
R 2.13.1
ix86 (32-bit) Windows 32-bit
: P5 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-06 12:13 UTC by Richard Cotton
Modified: 2011-09-07 17:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Cotton 2011-09-06 12:13:06 UTC
According to ?dev.new, R should be able to manage 63 devices concurrently (including the null device).

However, if you open more than 15 graphics devices (inc. null dev.) at once, the content of the devices is not drawn under R2.13.0 or higher under Windows XP SP3.  (Other operating systems not tested.  Behaviour is correct under R2.12.1 and previous, R2.12.2 not tested.)

simple_plot <- function() 
{
  dev.new() 
  plot(1:5)  
}
   
for(i in seq_len(20)) 
{                     
  simple_plot() 
} 

Devices 2 to 15 appear correctly, but 16 to 21 appear blank.

Leaving a pause between opening each device does not change the behaviour.

for(i in seq_len(20)) 
{                     
  simple_plot()
  Sys.sleep(1)
}
Comment 1 Duncan Murdoch 2011-09-06 16:47:57 UTC
I see the reported problem.  A quick scan of the sources isn't enough to 
spot what's going wrong; I'll take a longer look today.

Duncan Murdoch


Comment 2 Duncan Murdoch 2011-09-07 01:31:55 UTC
The docs don't actually guarantee 63 will work; that depends on the capabilities of your system.  But there was a bug that meant the system would open non-functioning windows, and I think I've fixed that.  Now I can get 45 working on XP, and more on Win 7. I will commit soon to R-devel and R-patched.
Comment 3 Richard Cotton 2011-09-07 09:56:42 UTC
(In reply to comment #2)
That sounds much better, although you definitely could use all the devices in Win XP in R2.12.x and earlier versions.  Is it worth doing a simple diff on the graphics source, or has it changed too much since then to be useful?
Comment 4 Duncan Murdoch 2011-09-07 17:36:01 UTC
On 11-09-07 4:56 AM, r-bugs@r-project.org wrote:
> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14668
>
> --- Comment #3 from Richard Cotton<richard.cotton@hsl.gov.uk>  2011-09-07 04:56:42 EDT ---
> (In reply to comment #2)
> That sounds much better, although you definitely could use all the devices in
> Win XP in R2.12.x and earlier versions.  Is it worth doing a simple diff on the
> graphics source, or has it changed too much since then to be useful?
>


That's pretty presumptuous of you to tell me what I could do in previous 
versions.  In fact, current R-patched behaviour and R-2.11.1 patched 
behaviour look the same to me.

Duncan Murdoch