MichaelChirico / r-bugs

A ⚠️read-only⚠️mirror of https://bugs.r-project.org/
20 stars 0 forks source link

[BUGZILLA #389] coredump with plot(x,y,pch="+",cex=2.2) #550

Closed MichaelChirico closed 4 years ago

MichaelChirico commented 4 years ago

From: Rashid Nassar <rnassar@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> Core dumped when plot() is used with pch="c" & cex > 2, e.g.,

plot(1,1, pch="+", cex=2.2)

Thank you and best wishes for 2000!

Rashid Nassar

--please do not edit the information below--

Version: platform = i586-unknown-linux arch = i586 os = linux system = i586, linux status = major = 0 minor = 90.1 year = 1999 month = December day = 15 language = R

Search Path: .GlobalEnv, Autoloads, package:base


METADATA

MichaelChirico commented 4 years ago

From: Peter Dalgaard BSA <p.dalgaard@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> rnassar@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::> writes:

Core dumped when plot() is used with pch="c" & cex > 2, e.g.,

plot(1,1, pch="+", cex=2.2)

Thank you and best wishes for 2000!

Works fine here...

Which flavour of linux is doing that to you? Did you install from prepackaged binaries or compile R yourself? (I've had one report saying that demo(graphics) crashed in RH6.0 when installing from .rpm)

Could you please try debugging a little further?

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.

--please do not edit the information below--

Version:
platform = i586-unknown-linux
arch = i586
os = linux
system = i586, linux
status = 
major = 0
minor = 90.1
year = 1999
month = December
day = 15
language = R

Search Path:
.GlobalEnv, Autoloads, package:base

-- O_ ---- Peter Dalgaard Blegdamsvej 3
c/ /'
--- Dept. of Biostatistics 2200 Cph. N
<CENSORING FROM DETECTED PHONE NUMBER ONWARDS; SEE BUGZILLA>


METADATA

MichaelChirico commented 4 years ago

From: Peter Dalgaard BSA <p.dalgaard@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>>

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

Rashid Nassar <rnassar@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> 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@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::> 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@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::> sgu]$ 

-- O_ ---- Peter Dalgaard Blegdamsvej 3
c/ /'
--- Dept. of Biostatistics 2200 Cph. N
<CENSORING FROM DETECTED PHONE NUMBER ONWARDS; SEE BUGZILLA>


METADATA

MichaelChirico commented 4 years ago

From: Rashid Nassar <rnassar@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>>

On 27 Dec 1999, Peter Dalgaard BSA wrote:


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

You are absolutely right. Here is what is (was) in my /etc/X11/fs/config:

=====================================================

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

# in 12 points, decipoints default-point-size = 120

# 100 x 100 and 75 x 75 default-resolutions = 75,75,100,100

==================================================

I confirmed the crash, then I added the following four lines (from your /etc/X11/fs/config file:

     /usr/share/fonts/default/Type1,
     /usr/X11R6/lib/X11/fonts/100dpi,
     /usr/X11R6/lib/X11/fonts/cyrillic,
     /usr/X11R6/lib/X11/fonts/75dpi

and now it works perfectly. Thank you!

Best regards,

Rashid


METADATA

MichaelChirico commented 4 years ago

From: Peter Dalgaard BSA <p.dalgaard@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> Rashid Nassar <rnassar@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>> writes:

On 27 Dec 1999, Peter Dalgaard BSA wrote:
> 
> 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:

....

You are absolutely right.  Here is what is (was) in my  /etc/X11/fs/config:

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

Nice to know that you got it working, but it still puzzles me that it broke. Unless, perhaps, you happen not to have the 100dpi fonts installed...

(BTW: Things look much nicer with the urw fonts in RH6.1...)

-- O_ ---- Peter Dalgaard Blegdamsvej 3
c/ /'
--- Dept. of Biostatistics 2200 Cph. N
<CENSORING FROM DETECTED PHONE NUMBER ONWARDS; SEE BUGZILLA>


METADATA

MichaelChirico commented 4 years ago

NOTES: Problem traced to problems with X11 fonts on this installation.


METADATA

MichaelChirico commented 4 years ago

Audit (from Jitterbug): Wed Jan 26 19:28:19 2000 ripley moved from incoming to Graphics Sun Feb 20 10:15:04 2000 ripley changed notes Sun Feb 20 10:15:05 2000 ripley moved from Graphics to Graphics-fixed


METADATA