Sure, just let me know when the fix is ready. I have a 64bit Linux machine at home and a 64bit Windows 7 machine at work with RTools, so I can check it on both machines.<br><br><div class="gmail_quote">On Tue, Jan 3, 2012 at 1:01 AM, Matthew Dowle <span dir="ltr"><<a href="mailto:mdowle@mdowle.plus.com">mdowle@mdowle.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Yes, it's likely the same issue. Making progress on it now can<br>
reproduce, thanks to Chris. There is another crash bug already fixed in<br>
1.7.8 but that's probably not the one you're seeing (looking at your<br>
minimal code, thanks). If you wanted to practice upgrading to 1.7.8 by<br>
installing RTools on Windows and building the package it would be really<br>
useful to have you confirm the fix works (when ready), as well as Chris<br>
(Linux), before releasing to CRAN. Unfortunately R-Forge's nightly<br>
binary build isn't very reliable, but RTools makes it very easy to<br>
compile packages from source on Windows.<br>
<span class="HOEnZb"><font color="#888888"><br>
Matthew<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, 2012-01-02 at 15:41 +0100, Christoph Jäckel wrote:<br>
> Hi Chris,<br>
><br>
><br>
> thanks for your reply. I was not aware that you were able to give<br>
> Matthew code that breaks. So hopefully it's the same issue and Matthew<br>
> can figure something out. Unfortunately, I'm struggling enough with R<br>
> already and I'm completely useless when it comes to C...I guess I<br>
> should put that on my todo-list for 2012 ;-)<br>
><br>
> On Mon, Jan 2, 2012 at 3:31 PM, Chris Neff <<a href="mailto:caneff@gmail.com">caneff@gmail.com</a>> wrote:<br>
> I worked with Matthew a lot and we found that the code I<br>
> managed to<br>
> give him would not crash on 32-bit, but would on 64-bit (on<br>
> both 2.12<br>
> and 2.14). It looks like you are running 64-bit as well, so<br>
> you may<br>
> very well be seeing the same issue I am. I'll let him respond<br>
> with<br>
> more though :)<br>
><br>
> On 2 January 2012 03:40, Christoph Jäckel<br>
> <<a href="mailto:christoph.jaeckel@wi.tum.de">christoph.jaeckel@wi.tum.de</a>> wrote:<br>
> > Note: I posted this on Nabble before, but it keeps telling<br>
> me that it has<br>
> > not been accepted by the mailing list. So this might be a<br>
> duplicate.<br>
> ><br>
> > Hi together,<br>
> ><br>
> > I recently encountered severe problems with R (see my post<br>
> on stackoverflow<br>
> ><br>
> here: <a href="http://stackoverflow.com/questions/8616862/r-terminates-with-error-message-this-application-has-requested-the-runtime-to-t" target="_blank">http://stackoverflow.com/questions/8616862/r-terminates-with-error-message-this-application-has-requested-the-runtime-to-t</a>).<br>
> > Spending the whole day digging further into the problem, I<br>
> was able to<br>
> > produce rather minimal code that crashes my RStudio session.<br>
> I confirmed<br>
> > this on two different machines (see details at the end). If<br>
> I run this code<br>
> > in my Linux Terminal, I get the following error:<br>
> ><br>
> > *** caught segfault ***<br>
> > address (nil), cause 'unknown'<br>
> ><br>
> > Traceback:<br>
> > 1: as.data.frame.Date(x[[i]], optional = TRUE)<br>
> > 2: as.data.frame(x[[i]], optional = TRUE)<br>
> > 3: data.frame(ID = rep(1:100, each = n/100), intTime =<br>
> rep(1:(n/100),<br>
> > times = 100), FYE = lDate1 + 1:n)<br>
> ><br>
> > So it looks like a similar problem to caneff's<br>
> ><br>
> problem: <a href="http://r.789695.n4.nabble.com/Random-segfaults-td4195472i20.html" target="_blank">http://r.789695.n4.nabble.com/Random-segfaults-td4195472i20.html</a><br>
> ><br>
> > So my two questions are:<br>
> > 1. Can you confirm this? (Sometimes, I have to run the code<br>
> a couple of<br>
> > times to get R to crash)<br>
> > 2. What is the cause? (Interestingly, I need to add the line<br>
> DT[, reportDate<br>
> > := NA] to get the code breaking, although this line seems<br>
> completely<br>
> > irrelevant for the further computations. For me, R closes<br>
> when the last line<br>
> > is run.)<br>
> ><br>
> > Rather minimal code:<br>
> ><br>
> > get_diff_month <- function(actualDate, baseDate) {<br>
> ><br>
> > #Because data.table also has a month function<br>
> > return(month(actualDate) - month(baseDate) +<br>
> 12*(year(actualDate) -<br>
> > year(baseDate)))<br>
> > }<br>
> > library(data.table)<br>
> ><br>
> > n <- 100000<br>
> > lDate1 <- as.Date("1jan1900", "%d%b%Y")#dmy("1Jan1900")<br>
> > lDate2 <- as.Date("1jan1901", "%d%b%Y")#dmy("1Jan1901")<br>
> > df <- data.frame(ID = rep(1:100, each=n/100),<br>
> > intTime = rep(1:(n/100), times=100),<br>
> > FYE=lDate1 + 1:n)<br>
> > DT <- as.data.table(df)<br>
> > DT[rbinom(n, size=1, prob=0.05)==1, FYE:=NA]<br>
> > DT[, reportDate := NA] #Bad line: comment it out and nothing<br>
> breaks!<br>
> > DT[, intFYE := get_diff_month(FYE, as.Date("1jan1900",<br>
> "%d%b%Y"))]<br>
> > intDT <- DT[ , list(FYE, intTime, ID)]<br>
> > newDates <- intDT[, intTime] - 1<br>
> > intDT[, intTime := newDates]<br>
> > #Set keys<br>
> > key(DT) <- c("ID", "intTime")<br>
> > key(intDT) <- c("ID", "intTime")<br>
> > DT <- merge(DT, intDT, all.x=TRUE)<br>
> > DT[, intFYE_Next := get_diff_month(FYE.y,<br>
> as.Date("1jan1900", "%d%b%Y"))]<br>
> ><br>
> > sessionInfo() 1:<br>
> ><br>
> > R version 2.13.2 (2011-09-30)<br>
> > Platform: x86_64-pc-linux-gnu (64-bit)<br>
> ><br>
> > locale:<br>
> > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C<br>
> > LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8<br>
> LC_MONETARY=C<br>
> ><br>
> > [6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8<br>
> LC_NAME=C<br>
> > LC_ADDRESS=C LC_TELEPHONE=C<br>
> > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C<br>
> ><br>
> > attached base packages:<br>
> > [1] stats graphics grDevices utils datasets<br>
> methods base<br>
> ><br>
> > other attached packages:<br>
> > [1] data.table_1.7.7<br>
> ><br>
> > loaded via a namespace (and not attached):<br>
> > [1] tools_2.13.2<br>
> ><br>
> > sessionInfo() 2:<br>
> ><br>
> ><br>
> > R version 2.14.0 (2011-10-31)<br>
> > Platform: x86_64-pc-mingw32/x64 (64-bit)<br>
> ><br>
> > locale:<br>
> > [1] C<br>
> ><br>
> > attached base packages:<br>
> > [1] stats graphics grDevices utils datasets<br>
> methods base<br>
> ><br>
> > other attached packages:<br>
> > [1] data.table_1.7.7<br>
> ><br>
> > loaded via a namespace (and not attached):<br>
> > [1] tools_2.14.0<br>
> ><br>
> > Thanks Christoph<br>
> ><br>
> > --<br>
> ><br>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
> ><br>
> > Christoph Jäckel (Dipl.-Kfm.)<br>
> ><br>
> ><br>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
> ><br>
> > Research Assistant<br>
> ><br>
> > Chair for Financial Management and Capital Markets |<br>
> Lehrstuhl für<br>
> > Finanzmanagement und Kapitalmärkte<br>
> ><br>
> > TUM School of Management | Technische Universität München<br>
> ><br>
> > Arcisstr. 21 | D-80333 München | Germany<br>
> ><br>
> > Mailto: <a href="mailto:christoph.jaeckel@wi.tum.de">christoph.jaeckel@wi.tum.de</a> | Web: <a href="http://www.fm.wi.tum.de" target="_blank">www.fm.wi.tum.de</a><br>
> ><br>
> > Phone: <a href="tel:%2B49%2089%20289%2025487" value="+498928925487">+49 89 289 25487</a> | Fax: <a href="tel:%2B49%2089%20289%2025488" value="+498928925488">+49 89 289 25488</a><br>
> ><br>
> ><br>
> ><br>
> > Head of Chair:<br>
> ><br>
> > Univ.-Prof. Dr. Christoph Kaserer<br>
> ><br>
> ><br>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
> ><br>
> > E-Mail Disclaimer<br>
> ><br>
> > Der Inhalt dieser E-Mail ist vertraulich und ausschliesslich<br>
> > fuer den bezeichneten Adressaten bestimmt. Wenn Sie nicht<br>
> > der vorgesehene Adressat dieser E-Mail oder dessen Vertreter<br>
> > sein sollten, so beachten Sie bitte, dass jede Form der<br>
> > Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder<br>
> > Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir<br>
> > bitten Sie, sich in diesem Fall mit dem Absender der E-Mail<br>
> > in Verbindung zu setzen.<br>
> ><br>
> > The information contained in this email is confidential. It<br>
> is<br>
> > intended solely for the addressee. Access to this email by<br>
> > anyone else is unauthorized if you are not the intended<br>
> > recipient, any form of disclosure, reproduction,<br>
> distribution<br>
> > or any action taken or refrained from in reliance on it, is<br>
> > prohibited and may be unlawful. Please notify the sender<br>
> > immediately.<br>
> ><br>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
> ><br>
><br>
> > _______________________________________________<br>
> > datatable-help mailing list<br>
> > <a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>
> ><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br>
><br>
><br>
><br>
><br>
> --<br>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
><br>
> Christoph Jäckel (Dipl.-Kfm.)<br>
><br>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
><br>
> Research Assistant<br>
><br>
> Chair for Financial Management and Capital Markets | Lehrstuhl für<br>
> Finanzmanagement und Kapitalmärkte<br>
><br>
> TUM School of Management | Technische Universität München<br>
><br>
> Arcisstr. 21 | D-80333 München | Germany<br>
><br>
> Mailto: <a href="mailto:christoph.jaeckel@wi.tum.de">christoph.jaeckel@wi.tum.de</a> | Web: <a href="http://www.fm.wi.tum.de" target="_blank">www.fm.wi.tum.de</a><br>
><br>
> Phone: <a href="tel:%2B49%2089%20289%2025487" value="+498928925487">+49 89 289 25487</a> | Fax: <a href="tel:%2B49%2089%20289%2025488" value="+498928925488">+49 89 289 25488</a><br>
><br>
><br>
><br>
> Head of Chair:<br>
><br>
> Univ.-Prof. Dr. Christoph Kaserer<br>
><br>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
><br>
> E-Mail Disclaimer<br>
><br>
> Der Inhalt dieser E-Mail ist vertraulich und ausschliesslich<br>
> fuer den bezeichneten Adressaten bestimmt. Wenn Sie nicht<br>
> der vorgesehene Adressat dieser E-Mail oder dessen Vertreter<br>
> sein sollten, so beachten Sie bitte, dass jede Form der<br>
> Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder<br>
> Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir<br>
> bitten Sie, sich in diesem Fall mit dem Absender der E-Mail<br>
> in Verbindung zu setzen.<br>
><br>
> The information contained in this email is confidential. It is<br>
> intended solely for the addressee. Access to this email by<br>
> anyone else is unauthorized if you are not the intended<br>
> recipient, any form of disclosure, reproduction, distribution<br>
> or any action taken or refrained from in reliance on it, is<br>
> prohibited and may be unlawful. Please notify the sender<br>
> immediately.<br>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> datatable-help mailing list<br>
> <a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br>
<br>
<br>
</div></div></blockquote></div><br>