[Rd] text() with invalid argument type crashes RGui.exe

From: P Ehlers <ehlers_at_math.ucalgary.ca>
Date: Wed 24 Nov 2004 - 20:06:01 EST

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.

loc <- c(5, 6)
text(loc, labels = "a")

Produces expected results according to ?xy.coords.

loc <- list(x = 5, y = 6)
text(loc, labels = "a")

No problem.


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

Peter Ehlers
U of Calgary

R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 24 20:18:48 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:01:43 EST