Well I guess there's no point in starting a discussion here. I can also do all
calculations, gather the plots in a list before starting the pdf device and
plot them later. But just to prove my point: the attached pdfs (generated in a
clean session, on the system used to generate the bug report)
How is this a bug in R? First, multicore is not R. Second, you're
running multicore with GUI code loaded which it explicitly tells you
that it won't work. Third, the code you provided does produce correct
PDFs (tested on the same platform you provided) in a clean session
(unsurprisingly).
The attached code produces corrupted pdfs (test2.pdf, test4.pdf and
test5.pdf). The resulting pdf depends on how many cores are available on
the machine.
I don't see why there should be any difference between the pdfs (exept for
the timestamp). Doing many operations involving mclapply can increas