From dieter.menne at menne-biomed.de  Fri Mar 19 20:26:09 2010
From: dieter.menne at menne-biomed.de (Dieter Menne)
Date: Fri, 19 Mar 2010 20:26:09 +0100
Subject: [Rd] Crash of latticeExtra graph with Adobe Acro
	Pro/Reader/Windows/ during print only (display ok).
Message-ID: <000001cac79a$07514ca0$15f3e5e0$@menne@menne-biomed.de>

I created a report with Sweave today, that displayed perfectly on screen,
but crashed both Adobe Pro 9.3.1 and Adobe Reader 9.0 on Windows 7. Output
with Foxit Reader was flawless.

I was able to reproduce a "minimal" example, which is not really minimal but
the smallest I could get after 2 hours of wasting paper.

Required:

latticeExtra calling both 
      panel.xyplot(...) # both lines are required, no problem with only one
of them
      panel.smoother(...) #

pch = 16 (lower number were no problem)

At least 300 data points with some overlap; I did bracket it exactly, but
200 did not show the problem. I was not able to generate a runif-based
example, therefore a simplified data set from my original report is
included.

Reproduce: Run the example. sessionInfo see below. Open the created pdf with
Adobe Acrobat Pro/Reader. It displays perfectly. 

Print it to any device; I used the virtual Windows XPS printer because after
30 pages I was running out of laser printer toner.

Adobe Displays: Flattening, and hangs after 94%; must be force-restarted
after that.

When using more data points, it hangs after a lower percentage; looks like
"flattening" has to do with processing of data points, and 300 is just above
the limit.

My workaround is to use something else than pch=16, because I cannot force
customers to install Foxit.

The created pdf file can be downloaded from
http://www.menne-biomed.de/uni/crashedadobe.pdf

Dieter Menne



library(latticeExtra)

d = structure(list(y = c(1, 2, 0, 3, 2, 1, 2, 2, 1, 0, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 0, 2, 2, 2, 2, 2, 1, 1, 2,
2, 3, 0, 2, 3, 1, 2, 2, 2, 2, 1, 0, 2, 1, 2, 4, 2, 1, 1, 0, 0,
1, 2, 2, 3, 1, 1, 2, 2, 2, 2, 1, 2, 0, 2, 0, 2, 2, 1, 1, 1, 1,
2, 1, 8, 2, 5, 3, 2, 2, 0, 1, 0, 2, 0, 2, 0, 2, 4, 2, 2, 2, 2,
2, 1, 2, 5, 1, 1, 2, 0, 1, 2, 2, 2, 2, 1, 2, 2, 0, 1, 2, 0, 2,
2, 2, 2, 1, 0, 2, 0, 1, 2, 1, 2, 2, 0, 0, 2, 2, 2, 3, 2, 2, 2,
2, 2, 1, 2, 1, 2, 2, 2, 2, 2), x = c(1, 2, 3, 13, 1, 14, 14,
4, 4, 0, 1, 1, 4, 2, 5, 3, 4, 13, 2, 5, 12, 1, 4, 0, 1, 2, 0,
2, 5, 2, 3, 3, 3, 1, 5, 4, 5, 0, 4, 2, 5, 4, 12, 3, 3, 5, 0,
3, 4, 4, 14, 5, 2, 1, 0, 0, 1, 3, 4, 2, 14, 1, 2, 2, 12, 1, 3,
4, 0, 5, 2, 5, 2, 2, 3, 5, 5, 2, 5, 13, 2, 4, 12, 2, 4, 1, 4,
0, 1, 0, 1, 0, 4, 5, 4, 5, 2, 2, 13, 3, 4, 13, 1, 12, 3, 1, 0,
2, 5, 3, 14, 4, 2, 2, 0, 0, 4, 0, 2, 12, 13, 3, 2, 1, 4, 2, 3,
1, 1, 3, 3, 0, 0, 3, 5, 3, 13, 3, 13, 3, 13, 3, 1, 1, 4, 2, 1,
4, 12, 5)), .Names = c("y", "x"),
row.names = c(NA, -150L), class = "data.frame")

pdf("crashedadobe.pdf")
p2 = xyplot(y~x,data=d,
    pch=16, # required, no problem with pch=1,2,8
    panel = function(...) {
      panel.xyplot(...) # both lines are required
      panel.smoother(...) #
    },
  )
print(p2)
dev.off()


#R version 2.10.1 (2009-12-14) 
#i386-pc-mingw32 
#
#locale:
#[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
#[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
#[5] LC_TIME=German_Germany.1252    
#
#attached base packages:
#[1] stats     graphics  grDevices datasets  utils     methods   base     
#
#loaded via a namespace (and not attached):
#[1] tools_2.10.1
#



[Rd] Crash of latticeExtra graph with Adobe Acro Pro/Reader/Windows/ during print only (display ok).
Dieter Menne