<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi again,<br>
<br>
Later on I realised I had made some fundamental programming errors
resulting in the mentioned segfault entirely not related to rcpp.
(fixed now by the way).<br>
I know that does not earn me many brownie points, so my apologies
for my sloppy code. ;)<br>
<br>
Thus far I can say that I still really like the rcpp package and
keep thinking of new ways I could use it.<br>
<br>
Berry<br>
<br>
<br>
<br>
On 03/20/2013 11:15 PM, Berry Kriesels wrote:<br>
</div>
<blockquote cite="mid:514A34E6.10803@exisoft.nl" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi everybody,<br>
<br>
Just now I was playing around with Rcpp in combination with Qt (I
have found an excellent example on this). And decided to have a
go(small dummyproject) at this myself. Problem is that the
application segfaults when I run it.<br>
<br>
QtR.h <br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a moz-do-not-send="true" href="http://pastebin.com/AXT144SK">http://pastebin.com/AXT144SK</a><br>
<br>
QtR.cpp<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a moz-do-not-send="true" href="http://pastebin.com/JUUuCFN2">http://pastebin.com/JUUuCFN2</a><br>
<br>
main.cpp<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a moz-do-not-send="true" href="http://pastebin.com/yWUmDL17">http://pastebin.com/yWUmDL17</a><br>
<br>
mainwindow.cpp<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a moz-do-not-send="true" href="http://pastebin.com/gE84ZtxH">http://pastebin.com/gE84ZtxH</a><br>
<br>
I create an instance of my QtR class called qtr which creates an
RInside session in the constructor. In my mainwindow.cpp I
reference to my instance of qtr and then invoke the loadData
method. In the loadData method I try to use
m_R.parseEvalQ("cat("+fname_no_ext+"',file='outfile.txt',sep='\n')");<br>
<br>
This results in a segfault. <br>
<br>
However when I remove this line from the loadData method and add
the
m_R.parseEvalQ("cat("+fname_no_ext+"',file='outfile.txt',sep='\n')");
line to the constructor of QtR which is invoked in main.cpp it
runs without trouble.<br>
<br>
I probably am making a very obvious mistake. But I seem unable to
see the issue at this point myself. <br>
<br>
Berry<br>
<br>
PS <br>
<br>
I have used pastebin for readability, or would everybody prefer
the code within the e-mail?<br>
<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Rcpp-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></pre>
</blockquote>
<br>
</body>
</html>