From prana at Vertica.com  Thu Mar  1 17:05:40 2012
From: prana at Vertica.com (Pratibha Rana)
Date: Thu, 1 Mar 2012 11:05:40 -0500
Subject: [Rd] mb_m buffer not cleared if parseEval fails
Message-ID: <4F4F9E54.8030005@vertica.com>

Hi,

I am using RInside for one of the applications that I'm using. The error 
that occured is as follows.

When I use  R.parseEval("xyz") if the parse fails then the mb_m is not 
cleared and hence all subsequent
calls to R.parseEval fail.

example:

when R.parseEval("stringConcatfactoryrandom") is executed the R instance 
looks like this
  (gdb) p R
$7 = (RInside &) @0x7fff13d42d10: {mb_m = {buffer = 
"stringConcatfactoryrandom"}, global_env = <incomplete type>, verbose_m 
= false, static instance_ = 0x7fff13d42d10}

since there's no function called stringConcatfactoryrandom in my R code, 
the above call fails. The I use the same R instance to call

R.parseEval("exists")    and I  get this

(gdb) p R
$8 = (RInside &) @0x7fff13d42d10: {mb_m = {buffer = 
"stringConcatfactoryrandomexists"}, global_env = <incomplete type>, 
verbose_m = false, static instance_ = 0x7fff13d42d10}

I think the buffer should be cleared after each call to parseEval


Thanks
Pratibha



[Rd] mb_m buffer not cleared if parseEval fails
Pratibha Rana