Bug 15271 - copy to clipboard error saving metafile
copy to clipboard error saving metafile
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Graphics
R 3.0.0
All All
: P5 major
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-13 13:25 UTC by Charles Auerbach
Modified: 2013-04-14 19:10 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 Charles Auerbach 2013-04-13 13:25:11 UTC
After using the locator(1) to acquire x y ordinates and attempting to save graph as a metafile, the following error is produced: "first argument must be a string (of length 1) or native symbol reference."
There is no error when saving as a bitmap.
Comment 1 Duncan Murdoch 2013-04-14 12:40:43 UTC
I can reproduce this, but so far haven't been able to track it down.  The error happens when R tries to replay the display list on the metafile device.  Presumably the locator() call has damaged something, but I haven't been able to track down what yet.
Comment 2 Duncan Murdoch 2013-04-14 15:02:28 UTC
This isn't Windows specific.  The following operations repeat it in OSX:

plot(1)
locator()   # click once then stop
x <- recordPlot()
x

It looks as though locator() adds something to the displaylist that isn't in the appropriate format, and replaying it gives the error.  There's a FIXME message in C_locator, but I don't think that's the problem.

identify() has the same problem as locator().
Comment 3 Duncan Murdoch 2013-04-14 16:10:37 UTC
I think I have this now.  The displaylist contained .External2(x,y,...) instead of .External2(C_locator, x,y, ...).  It should be easy to fix.
Comment 4 Duncan Murdoch 2013-04-14 19:10:44 UTC
Fixed in R-devel and R-patched