Re: [Rd] plot(x,y) core dump

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Mon 02 Aug 2004 - 08:34:33 EST

Hi

Rf_allocNewX11DeviceDesc is called by newX11DeviceDriver and the latter needs to check the value returned. I think Brian Ripley has made a fix for this problem in the development version of R. The first few lines of newX11DeviceDriver now look like ...

     newX11Desc *xd;
     char *fn;

     xd = Rf_allocNewX11DeviceDesc(pointsize);
     if(!xd) return FALSE;

Unfortunately, your next problem may be that you can't start an X11 device (it looks like you are failing to allocate memory for the device).

Paul

Liao, Kexiao wrote:
> Dear R Development Team,
>
> I compile R-1.9.1 on AIX 5.2 under 2.9-aix51-020209, and xlf 7.1. In
> order to let R compile successfully under gcc 2.9, I have to change one
> C statement of file(RHOME//src/modules/X11/devX11.c) line 1768 from
> "retrun FALSE" to "retrun NULL", following is C code snapshot:
>
>
>
> newX11Desc * Rf_allocNewX11DeviceDesc(double ps)
>
> {
>
> newX11Desc *xd;
>
> /* allocate new device description */
>
> if (!(xd = (newX11Desc*)calloc(1, sizeof(newX11Desc))))
>
> return NULL;
>
>
>
> /* From here on, if we need to bail out with "error", */
>
> /* then we must also free(xd). */
>
>
>
> /* Font will load at first use. */
>
>
>
> if (ps < 6 || ps > 24) ps = 12;
>
> xd->fontface = -1;
>
> xd->fontsize = -1;
>
> xd->basefontface = 1;
>
> xd->basefontsize = ps;
>
> xd->handleOwnEvents = FALSE;
>
> xd->window = (Window) NULL;
>
>
>
> return(xd);
>
> }
>
>
>
> However I got core dump while I try to use plot() from R:
>
>
>
>
>
> R : Copyright 2004, The R Foundation for Statistical Computing
>
> Version 1.9.1 (2004-06-21), ISBN 3-900051-00-3
>
>
>
> 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 more information and
>
> 'citation()' on how to cite R in publications.
>
>
>
> 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.
>
>
>
>

>>help.start()

>
>
> Making links in per-session dir ...
>
> If /usr/bin/netscape is already running, it is *not* restarted, and
>
> you must switch to its window.
>
> Otherwise, be patient ...
>
>
>>x <- rnorm(50)

>
>
>>y <- rnorm(x)

>
>
>>plot(x,y)

>
>
> Illegal instruction (core dumped)
>
>
>
>
>
> Can anyone give me some suggestion? Thanks!
>
>
>
>
>
> Kexiao
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
Received on Mon Aug 02 08:37:53 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:04 EST