From p.dalgaard@biostat.ku.dk  Mon Dec 27 13:52:05 1999
From: p.dalgaard@biostat.ku.dk (p.dalgaard@biostat.ku.dk)
Date: Mon, 27 Dec 1999 14:52:05 +0100 (MET)
Subject: coredump with plot(x,y,pch="+",cex=2.2) (PR#389)
Message-ID: <199912271352.OAA02520@pubhealth.ku.dk>


[please CC: r-bugs on this kind of reply, so that it gets properly filed]

Rashid Nassar <rnassar@duke.edu> writes:

> ... it is 2 or 3 am your end-- I guess I shouldn't report such things 
> without thinking about what time it is over in Denmark.

Well, my computer is not connected to my alarm clock (yet...). Bad
habit, but it's so nice and quiet at that time and I had some stuff I
wanted to get written down. (You stand a much worse chance of catching
me early in the morning.)

> To answer your questions:
> 
> 1.  I'm using Red Hat 6.0.  
> 2.  I compiled R on my machine
> 
> > Try /path/to/R -d gdb, run, recreate the crash, and tell us what gdb
> > says at that that point and the first couple of line of "bt" output
> > might also be useful.
> 
> 3.  I've tried demo(graphics) (which also crashed R) and plot() with
> pch="c" & cex=2.2 with gdb running as per your instructions (I hope!) and
> I include the output below: I apologize for my ignorance, but I don't know
> what "bt" output is or how I can get it (I need to ask my son for
> assistance with that, if the following does not suffice-- please let me
> know and I'd be glad to try anything that I know how to do.  I included the
> whole thing so I won't remove relevant details.

"bt" (backtrace) is just a gdb command which you type at the (gdb)
prompt, but never mind. The output below suffices in this case (but if
it were inside a utility routine called from multiple places, I would
have wanted to know where it was called from).

Obviously, this shouldn't crash R, but the only reason I can see that
it might happen is if the scalable fonts are absent *and* the Adobe
fonts are not present in both 75dpi and 100dpi versions. I seem to
recall that RH6.0 had a bug in the font server setup somewhat to that
effect (causing Netscape to crash all over the place). So what is in
your /etc/X11/fs/config ? Mine (RH6.1+modif.) has:

catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
        /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/misc,
        /usr/X11R6/lib/X11/fonts/Type1,
        /usr/X11R6/lib/X11/fonts/Speedo,
        /usr/share/fonts/default/Type1,
        /usr/X11R6/lib/X11/fonts/100dpi,
        /usr/X11R6/lib/X11/fonts/cyrillic,
        /usr/X11R6/lib/X11/fonts/75dpi


> Best regards,  -Rashid
> 
> =========================
> [rnassar@rnassar sgu]$ /usr/local/bin/R -d gdb
> GNU gdb 4.17.0.11 with Linux support
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux"...
> (gdb) R
> Starting program: /usr/local/lib/R/bin/R.X11 
> 
> R : Copyright 1999, The R Development Core Team
> Version 0.90.1  (December 15, 1999)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type    "?license" or "?licence" for distribution details.
> 
> R is a collaborative project with many contributors.
> Type    "?contributors" for a list.
> 
> Type    "demo()" for some demos, "help()" for on-line help, or
>         "help.start()" for a HTML browser interface to help.
> Type    "q()" to quit R.
> 
> [Previously saved workspace restored]
> 
> > > demo(graphics)
> 
> 
>         demo(graphics)
>         ---- ~~~~~~~~
> 
> Type  <Return>   to start : 
> 
> > opar <- par(ask = interactive() && (.Device == "X11" || 
>     .Device == "windows"))
> 
> > x <- rnorm(50)
> 
> > opar <- c(opar, par(bg = "white"))
> 
> > plot(x, ann = FALSE, type = "n")
> Hit <Return> to see next plot: 
> 
> > abline(h = 0, col = gray(0.9))
> 
> > lines(x, col = "green4", lty = "dotted")
> 
> > points(x, bg = "limegreen", pch = 21)
> 
> > title(main = "Simple Use of Color In a Plot", xlab = "Just a Whisper of a Label", 
>     col.main = "blue", col.lab = gray(0.8), cex.main = 1.2, cex.lab = 1, 
>     font.main = 4, font.lab = 3)
> 
> > par(bg = "gray")
> 
> > piechart(rep(1, 24), col = rainbow(24), radius = 0.9)
> Hit <Return> to see next plot: 
> 
> > title(main = "A Sample Color Wheel", cex.main = 1.4, 
>     font.main = 3)
> 
> Program received signal SIGSEGV, Segmentation fault.
> SetFont (face=3, size=17, dd=0x8171050) at devX11.c:920
> 920             XSetFont(display, xd->wgc, xd->font->fid);
> (gdb) 
> (gdb) R
> The program being debugged has been started already.
> Start it from the beginning? (y or n) y
> Starting program: /usr/local/lib/R/bin/R.X11 
> 
> R : Copyright 1999, The R Development Core Team
> Version 0.90.1  (December 15, 1999)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type    "?license" or "?licence" for distribution details.
> 
> R is a collaborative project with many contributors.
> Type    "?contributors" for a list.
> 
> Type    "demo()" for some demos, "help()" for on-line help, or
>         "help.start()" for a HTML browser interface to help.
> Type    "q()" to quit R.
> 
> [Previously saved workspace restored]
> 
> > plot(1,1,pch=4,cex=2.2)
> > plot(1,1,pch="+",cex=2.2)
> 
> Program received signal SIGSEGV, Segmentation fault.
> SetFont (face=1, size=26, dd=0x8173058) at devX11.c:920
> 920             XSetFont(display, xd->wgc, xd->font->fid);
> (gdb) q
> The program is running.  Exit anyway? (y or n) y
> [rnassar@rnassar sgu]$ 

-- 
   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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


coredump with plot(x,y,pch="+",cex=2.2) (PR#389)
p.dalgaard@biostat.ku.dk