Skip to content

Problem with rtest.c

4 messages · David Melchior, Brian Ripley

#
I have some problems with the rtest.c example under gnuwin32\front-ends

I am able to build it and it runs without problems. But when I give it a command that isn't defined it crashes. This only happens when I build it in then complicate case where it uses R_ReplDLLdo1().

Any help would be appreciated.

Ps. Sorry my poor English

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 30 Mar 2001, David Melchior wrote:

            
command that isn't defined it crashes. This only happens when I build it in then
complicate case where it uses R_ReplDLLdo1().

(Why would you do that?  It is supposed to terminate, if not crash.)
It's just example code to test the building: the README file says
that you need to handle interrupts, and you will also (if you use the
full case) need to arrange how error conditions are handled.

This did work once (terminate normally on error) but it has not been tested
recently.  If you want to do things like this you will need to debug it on
your own system.

You did not say which version of R you are using.
#
I forgot to mention that I have chanced the code to
  Rp->R_Interactive = TRUE;
When R_Interactive is FALSE there is no problem and the programme terminate like it is supposed to do.
I guess my problem is that I don't handle the error conditions right. Therefore I would like to know if there exits any examples that explain how to do this and if it is possible to do only by calls to the r.dll. The main reason that I play around with rtest.c is that I was trying to build something similarly with Delphi (where I only have access to the R.dll ) and ran into the same problems.
R version:
platform i386-pc-mingw32
arch     x86
os       Win32
system   x86, Win32
status
major    1
minor    2.2
year     2001
month    02
day      26
language R




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Sat, 31 Mar 2001, David Melchior wrote:

            
like it is supposed to do.

That's crucial, and README does warn you about it.
Therefore I would like to know if there exits any examples that explain
how to do this and if it is possible to do only by calls to the r.dll.
The main reason that I play around with rtest.c is that I was trying
to build something similarly with Delphi (where I only have access to
the R.dll ) and ran into the same problems.

As I said before, use the DCOM interface unless you know what you are doing.
There is an example of an error handler, of course, the R code
itself.  But beyond that I don't think you can reasonably ask for
help.


Please teach your mailer to wrap lines.