Skip to content
Prev 26341 / 398502 Next

New SVG Graphics Device for R

On Mon, 16 Dec 2002, T Jake Luciani wrote:

            
Using undocumented non-public entry points in the R internals.  The
traceback is (whyever do people not report this basic information: see the
rw-FAQ for how?)

Call stack:
0048241B  R.dll:0048241B  free
004CA292  R.dll:004CA292  GEdestroyDevDesc
004F10F6  R.dll:004F10F6  Rf_selectDevice
0051B1FE  R.dll:0051B1FE  do_devoff
005049B4  R.dll:005049B4  do_internal
...

so the R graphics internals are calling R's internal free on memory
allocated by your device, which allocated the memory from msvcrt.dll and
not from the internal malloc.

Solution: build in the source tree of R and add -lRm to Makevars
(and you might as well have configure.win and Makevars.win whilst you are
at it).  That gives you access to R's internal malloc.