[R] Extension provokes crash in unzReadCurrentFile

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Nov 8 15:33:53 CET 2004


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> On Mon, 8 Nov 2004, Mark White wrote:
> 
> > I'm doing some work in C with the R_ExternalPointer
> > interface, and having some seg fault problems.  I expect the
> > crash is my fault, bad pointer in my code causing a fault
> > later etc, but I'm curious about the point of failure.
> > 
> > R almost always falls over in a call to unzReadCurrentFile
> > following a burst of disk activity.  I'm definitely not
> > doing anything that would call that explicitly, and I don't
> > notice the bursts of disk activity in similar work without
> > using my package.
> > 
> > Any idea what might be causing a compressed file read?
> 
> It's not a compressed file read, but rather from the interface for unz()  
> connections to zip files.  That is very unlikely to be used on a
> non-Windows system, so if that really is being called this looks like
> considerable internal corruption.
> 
> > Something to do with lazy loading, maybe?  I've tried
> > disabling it in the package description without success.
> > 
> > This is R 2.0.0 on NetBSD/i386.

In any case, since you're obviously running a more than half-decent
operating system, and you seem to know how to operate the debugger
(gdb?), could you please tell us what the backtrace ("bt", if gdb)
says at the point of crash.

This can be very enlightening. Sometimes it requires more work because
things have been corrupted beyond recognition, in which case you need
to use breakpoints and stuff.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list