[R] heplot3d / rgl : example causes R GUI to crash

Duncan Murdoch murdoch at stats.uwo.ca
Fri Feb 12 13:28:03 CET 2010


On 10/02/2010 11:07 AM, Michael Friendly wrote:
> Duncan Murdoch wrote:
>> On 10/02/2010 9:33 AM, Michael Friendly wrote:
>>> [Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end]
>>>   
>> This is probably a bug in rgl, and I can reproduce it.  Bugs in 
>> contributed packages are best sent to the maintainer of the package, 
>> because otherwise they might be lost.  In this case I did see it, so 
>> no need for you to do anything more.
>>
>> Duncan Murdoch
> Thanks, Duncan
> FMI, if you (or anyone) has pointers on how to debug such things, I'd 
> like to learn.
> 

I tracked this down.  It's a bug in rgl, but likely also a bug in 
heplots. At line 93 of heplot3d.mlm.R, called from line 198 in the same 
file, there's a call

		texts3d(x[which.max(x[,2]),] + offset*ranges, adj=0, texts=label, 
color=col, lit=FALSE)

At this point "label" is NULL, and that crashes rgl.  I'll fix rgl so 
there's no crash, but I suspect that heplots probably meant to pass a 
non-null label here.

Duncan Murdoch



More information about the R-help mailing list