Hi Dirk,<br><br>The problem has been solved after I downloaded Rcpp from svn repository, and build it on my computer.<br><br>Thank you for your help<br><br>Cong Li<br><br><div class="gmail_quote">On Tue, Dec 4, 2012 at 11:52 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 4 December 2012 at 23:33, Cong Li wrote:<br>
| Hi, Dirk<br>
|<br>
| Ok, I see. I will try it.<br>
| Thank you very much.<br>
| And I am sorry for relying on the wrong place.<br>
<br>
</div>Thanks -- and here is a cleaner diff from rev4047.<br>
<br>
I found/fixed that very shortly after we rolled 0.10.2 (which fixed a real<br>
rather than cosmetic error and had to be released).<br>
<br>
As we said, this is purely cosmetic but a little irratice. Just rebuild Rcpp<br>
with thus small change and all is well.<br>
<br>
Dirk<br>
<br>
<br>
Modified: pkg/Rcpp/inst/include/Rcpp/iostream/Rostream.h<br>
===================================================================<br>
--- pkg/Rcpp/inst/include/Rcpp/iostream/Rostream.h 2012-11-27 01:34:59 UTC (rev 4046)<br>
+++ pkg/Rcpp/inst/include/Rcpp/iostream/Rostream.h 2012-11-27 14:21:42 UTC (rev 4047)<br>
@@ -38,7 +38,12 @@<br>
std::ostream( new Rstreambuf(output) ),<br>
buf( static_cast<Rstreambuf*>( rdbuf() ) )<br>
{}<br>
- ~Rostream(){ delete buf ; }<br>
+ ~Rostream() {<br>
+ if (buf != NULL) {<br>
+ delete buf;<br>
+ buf = NULL;<br>
+ }<br>
+ }<br>
};<br>
<br>
// declare global variable<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
|<br>
| Cong Li<br>
|<br>
| On Tue, Dec 4, 2012 at 9:51 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br>
|<br>
|<br>
| Please reply on-list.<br>
|<br>
| On 4 December 2012 at 21:37, Cong Li wrote:<br>
| | Hi Dirk<br>
| |<br>
| | Thank you very much for your answer. It really helps.<br>
| |<br>
| | I want to call R from C++ in my project. If this is only a problem of R<br>
| version<br>
| | conflict,<br>
| | could I just ignore this "segmentation fault" info for the time being,<br>
| since I<br>
| | found that it seemed to impose no negative effect on c++ part, besides R<br>
| | calling, of my program(based on my experiment)?<br>
|<br>
| Yes indeed, see my follow-up on-list. Or you could quickly rebuild Rcpp<br>
| using<br>
| this version of the Rostream destructor:<br>
|<br>
| ~Rostream() {<br>
| if (buf != NULL) {<br>
| delete buf;<br>
| buf = NULL;<br>
| }<br>
| }<br>
|<br>
| Dirk<br>
|<br>
| | I am looking forward to the new version releasing, and thank you for your<br>
| | excellent jobs.<br>
| |<br>
| | Best Regards<br>
| |<br>
| | Cong Li<br>
| |<br>
| | On Tue, Dec 4, 2012 at 9:12 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br>
| |<br>
| |<br>
| | Hi Cong,<br>
| |<br>
| | On 4 December 2012 at 19:15, Cong Li wrote:<br>
| | | Hi guys<br>
| | |<br>
| | | I am a novice to RInside, and I met a problem when trying to run<br>
| RInside<br>
| | | example in "standard" folder.<br>
| | |<br>
| | | It is that a segmentation fault error happened every time when I<br>
| was<br>
| | trying to<br>
| | | execute the compiled example program in the "standard" folder. My<br>
| OS is<br>
| | ubuntu<br>
| | | 12.04, and I am using R 2.15.2 and g++ 4.6.3.<br>
| | |<br>
| | | It seems that the executions of the examples were fine, but<br>
| somehow<br>
| | errors<br>
| | | happened when then main function was trying to return.<br>
| | |<br>
| | | Can someone help me with this issue.<br>
| |<br>
| | It is a change in R 2.15.2 which requires a change in RInside which<br>
| I have<br>
| | yet to release (as another, unrelated, error) is holding this back.<br>
| If<br>
| | you<br>
| | use R 2.15.1 it all works too.<br>
| |<br>
| | Sorry for this, and the new RInside should be there "soon", or I<br>
| should at<br>
| | least commit my fixes to SVN.<br>
| |<br>
| | Dirk<br>
| |<br>
| | --<br>
| | Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
| |<br>
| |<br>
|<br>
| --<br>
| Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
|<br>
|<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</div></div></blockquote></div><br>