[Rd] Segmentation fault, devPS.c, 0.99.0 (PR#413)
Peter Dalgaard BSA
p.dalgaard@biostat.ku.dk
08 Feb 2000 16:32:36 +0100
Roger Bivand <rsb@reclus.nhh.no> writes:
> (gdb) p *fp
> Cannot access memory at address 0x20203665.
> (gdb) p fp
> $1 = (FILE *) 0x20203665
> (gdb) up
> #3 0x806d953 in PS_NewPage (dd=0x81df2d0) at devPS.c:1015
> 1015 if(pd->pageno > 1) PostScriptEndPage(pd->psfp);
> (gdb) p pd->psfp
> $2 = (FILE *) 0x20203665
> (gdb) p pd->pageno
> $3 = 1920216697
> (gdb) up
> #4 0x8087c75 in Rf_GNewPlot (recording=1, ask=-2147483648) at
> graphics.c:1781
> 1781 dd->dp.newPage(dd);
>
> (including the function where the problem occurs). The (FILE *) looks
> healthy enough to me, so I'll accept that the problem is a machine
> idiosyncracy.
I wouldn't think so! 0x20203665 looks suspiciously like a bit of a text
string. "e6 " to be precise (give or take byte ordering issues). And
the pointer is not pointing anywhere useful. I think something is
walking over pd->psfp
Next step would be to find out where that happens. If you set a
breakpoint in PS_Open just after the R_fopen call, run to it and then
do a
p &(pd->psfp)
watch *<address obtained from the above>
disp/x *<address obtained from the above>
run
and see if it stops with the memory location being overwritten
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._