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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Problem with rtest.c
4 messages · David Melchior, Brian Ripley
On Fri, 30 Mar 2001, David Melchior wrote:
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(). (Why would you do that? It is supposed to terminate, if not crash.)
Any help would be appreciated.
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.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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(). (Why would you do that? It is supposed to terminate, if not crash.)
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.
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.
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.
You did not say which version of R you are using.
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:
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(). (Why would you do that? It is supposed to terminate, if not crash.)
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. That's crucial, and README does warn you about it.
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.
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. 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.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._