[Rd] text() with invalid argument type crashes RGui.exe
Roger Bivand
Roger.Bivand at nhh.no
Wed Nov 24 10:22:37 CET 2004
On Wed, 24 Nov 2004, P Ehlers wrote:
> Dear Rexperts:
>
> (R 2.0.1 on Windows XP Pro)
>
> Is the following problem unique to my setup?
> If it's a known problem, I didn't see it at
> http://bugs.r-project.org/ nor find discussion in the archives.
>
> plot(1:10)
> loc <- c(5, 6)
> text(loc, labels = "a")
>
> Produces expected results according to ?xy.coords.
>
> plot(1:10)
> loc <- list(x = 5, y = 6)
> text(loc, labels = "a")
>
> No problem.
>
> But:
>
> plot(1:10)
> loc <- list(5, 6)
> text(loc, labels = "a")
>
> crashes RGui.
> ("R for Windows GUI front-end has encountered a problem and ...")
>
> R-FAQ:9.1 says:
>
> If you call .C(), .Fortran(), .External() or .Call() (or
> .Internal()) yourself (or in a function you wrote), you can
> always crash R by using wrong argument types (modes). This
> is not a bug.
>
> I realize that I'm using the wrong argument type;
> nevertheless, if the behaviour is general, it might be better
> to generate an error.
>
> For anyone with more know-how than I have, here are the details
> of the crash:
> AppName: rgui.exe AppVer: 2.1.41115.0 ModName: r.dll
> ModVer: 2.1.41115.0 Offset: 000ef1b3
>
Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0
RHEL 3 i386
> plot(1:10)
> loc <- list(5, 6)
> text(loc, labels = "a")
Program received signal SIGFPE, Arithmetic exception.
0x080edd3b in do_text (call=0x9080c48, op=0x867d72c, args=0x8660570,
env=0x8a1bf90) at plot.c:2153
2153 xx = x[i % n];
>
> Peter Ehlers
> U of Calgary
> ehlers at math.ucalgary.ca
>
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
More information about the R-devel
mailing list