From ellis at stat.harvard.edu  Wed Aug 31 10:23:56 2005
From: ellis at stat.harvard.edu (Byron Ellis)
Date: Wed, 31 Aug 2005 01:23:56 -0700
Subject: [Rd] Fwd: segfault
In-Reply-To: <90104E46-4CF0-48ED-9B75-C4C49D4D9540@mclink.it>
References: <p06230901bf3759687fd6@[84.173.69.150]>
	<AE67BE22-269F-4ED4-A6E3-D800A1F91496@mclink.it>
	<Pine.LNX.4.61.0508290930250.29579@gannet.stats>
	<90104E46-4CF0-48ED-9B75-C4C49D4D9540@mclink.it>
Message-ID: <B2C92800-D422-45C5-B281-F597A7639FE6@stat.harvard.edu>

There's definitely something a bit strange going on. The arguments as  
passed to wireframePanelCalculations from the code snippet show only  
6060 elements for the z vector (51,101,16 respectively for x,y,rot)  
while the function routinely tries to access at positions in the z  
vector >20,000... until it eventually falls over (how long this takes  
seems to depend on circumstances, I can actually get it to complete a  
run while running in gdb).

On Aug 30, 2005, at 10:12 AM, stefano iacus wrote:

>
> On 29/ago/05, at 10:35, Prof Brian Ripley wrote:
>
>
>> It does not crash for me on either Windows or Linux, but it does
>> take a
>> long time and the plot is a mess, so there does seem to be a
>> lattice-related problem (maybe a usage one).
>>
>> However, I think the crash is a Mac (presumably quartz()) problem.
>>
>>
>
> no, it also happens with the X11 device. BTW, it seems to be OS X
> specific.
> I'll try to debug
> stefano
>
>
>> On Mon, 29 Aug 2005, stefano iacus wrote:
>>
>>
>>
>>> This segfaults on OS X (10.4) on both X11 and quartz devices.
>>> Seems a problem with lattice but I cannot test on other platforms
>>> stefano
>>>
>>>
>>> Begin forwarded message:
>>>
>>>
>>>
>>>> From: "G. Sawitzki" <gs at statlab.uni-heidelberg.de>
>>>> Date: 28 agosto 2005 14:11:18 GMT+02:00
>>>> To: jago at mclink.it
>>>>
>>>>
>>>> Dear Stefano,
>>>>
>>>>  this small exaple leads to a crash of R. I did not try it on
>>>> versions other than the Mac version. So I am sending it to you
>>>> directly. If it is a littice problem, could you pass it to Deepayan
>>>> Sarkar? Thank you.
>>>>
>>>>   g.
>>>>
>>>> ==
>>>> #pbinom
>>>> library(grid)
>>>> library(lattice)
>>>>
>>>> n<-20
>>>> psteps<-50
>>>> binomtable<- function (n,psteps){
>>>> x<-(0:(10*n))/10
>>>> p<- (0:psteps)/psteps
>>>> dd<-expand.grid(x=x,p=p)
>>>> dd$F<- pbinom(dd$x,n,dd$p)
>>>> dd$x0<-trunc(dd$x)
>>>> dd
>>>> }
>>>>
>>>> bt<-binomtable(n=5,psteps=100)
>>>> bt[bt$x-bt$x0>=0.9,]$F<-NA
>>>> wireframe(bt$F~bt$x*bt$p,bt,groups=bt$x0,shade=TRUE) # leads to R
>>>> crash
>>>> #wireframe(bt$F~bt$x*bt$p,bt,shade=TRUE) #ok
>>>>
>>>>
>>
>> -- 
>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

---
Byron Ellis (ellis at stat.harvard.edu)
"Oook" -- The Librarian



[Rd] Fwd: segfault
Byron Ellis