You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Hi,
A colleague recently came across an R crash, which I can boil down to
the following, running under Rgui on Windows 7:
library(ggplot2)
ggplot(data.frame(x=1, y=1, z=4.7), aes(x, y, z=z)) + stat_summary2d()
This reliably causes a segmentation fault. I have sent a separate email
to the R-devel list about the segfault itself, but I think the situation
could be improved on the ggplot side too. The relevant code is in
guide_train.colorbar():
.bar <- discard(pretty(scale_limits(scale), n = guide$nbin), scale_limits(scale))
When there's only one value, the two values returned from scale_limits()
are the same, and if that value doesn't happen to be included in the
list returned from pretty(), all the tick-mark locations get discarded.
Then .bar is empty and R crashes when trying to draw an empty raster.
The attach patch tries to do something sensible in this case, although
I haven't convinced myself it'll work in all situations. Could somebody
who knows this code better have a look please?