RfastOfficial / Rfast

A collection of Rfast functions for data analysis. Note 1: The vast majority of the functions accept matrices only, not data.frames. Note 2: Do not have matrices or vectors with have missing data (i.e NAs). We do no check about them and C++ internally transforms them into zeros (0), so you may get wrong results. Note 3: In general, make sure you give the correct input, in order to get the correct output. We do no checks and this is one of the many reasons we are fast.
143 stars 19 forks source link

Rfast causes R to hang #16

Closed jkeuskamp closed 2 years ago

jkeuskamp commented 4 years ago

using the rowMins function causes the 'Rsession' process to become unstable. Within a short period of time after using rowMins, R becomes unresponsive without obvious reason. It always happens upon execution of a statement, but it doesn't seem exactly reproducable i.e. sometimes the same run of statements may run fine, while other times it hangs immediately.

This problem makes this package unusable in my case. This problem occurred with the latest version of base (3.6.3) installed on macOS 10.15.2 with the following packages loaded:

"base"       "data.table" "datasets"   "dplyr"      "dtplyr"     "forcats"    "ggplot2"    "graphics"  
"grDevices"  "lubridate"  "methods"    "openxlsx"   "pacman"     "progress"   "purrr"      "readr"     
"readxl"     "recipes"    "stats"      "stringr"    "tibble"     "tibbletime" "tidyr"      "tidyverse" 
"timetk"     "units"      "utils"      "xts"        "zoo"
ManosPapadakis95 commented 4 years ago

Can you give me the examples that crashed R?

jkeuskamp commented 4 years ago

Seems to be completey random, even dim(df) crashed Rsession at as some point.

From: Manos Papadakis notifications@github.com Reply to: RfastOfficial/Rfast reply@reply.github.com Date: Saturday, 21 March 2020 at 11:50 To: RfastOfficial/Rfast Rfast@noreply.github.com Cc: "Keuskamp, J.A. (Joost)" J.A.Keuskamp@uu.nl, Author author@noreply.github.com Subject: Re: [RfastOfficial/Rfast] Rfast causes R to hang (#16)

Can you give me the examples that crashed R?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RfastOfficial/Rfast/issues/16#issuecomment-602026186, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHKBHDXBWFOCOWKM7Z2DMDRISLW3ANCNFSM4LQPLCGQ.

ManosPapadakis95 commented 4 years ago

It crashes in a specific command that you use rowMins? That doesn't make any sense. If you can't reproduce error then it might not be Rfast's problem. We have checked the function and it works perfectly. Any idea what to do?

jkeuskamp commented 4 years ago

Rsession crashes within minutes after using rowMins, even if I do not load the Rfast package. Although it always crashes upon execution of an expression, there is seemingly no pattern in what expressions are used.

I a report of a very similar (the same?) issue on the CRAN copy of Rfast: https://github.com/cran/Rfast/issues/2. At this moment I am not in the position to construct a reproducable example, but I may try and do so at a later time.

From: Manos Papadakis notifications@github.com Reply to: RfastOfficial/Rfast reply@reply.github.com Date: Sunday, 22 March 2020 at 14:57 To: RfastOfficial/Rfast Rfast@noreply.github.com Cc: "Keuskamp, J.A. (Joost)" J.A.Keuskamp@uu.nl, Author author@noreply.github.com Subject: Re: [RfastOfficial/Rfast] Rfast causes R to hang (#16)

It crashes in a specific command that you use rowMins? That doesn't make any sense. If you can't reproduce error then it might not be Rfast's problem. We have checked the function and it works perfectly. Any idea what to do?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RfastOfficial/Rfast/issues/16#issuecomment-602204660, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAHKBHGNXGSGZSN5XM7XDVDRIYKN5ANCNFSM4LQPLCGQ.

ManosPapadakis95 commented 4 years ago

I don't know how to help.... If you find any example that R crashes let me know.

tjfarrar commented 4 years ago

I am also having some such problems. For instance, if I call

Rfast::mat.mult(diag(4), diag(5)) it not only throws an error (as it should) but crashes the R session. I am running R version 3.6.2 (64-bit) on Windows 8. I tried also in R-devel with same result. It happens in RStudio and in RGui.

Even some matrices with conformable dimensions also caused such a crash. For example, X <- matrix(data = runif(100 * 2), nrow = 100, ncol = 2) Rfast::mat.mult(Rfast::transpose(X), X)

The error thrown is

Mat::col(): index out of bounds

The R session crashes with a dialogue:

Runtime Error! Rgui.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Maybe this is not an issue with your package per se, but I have never had this happen with any other R function.

ManosPapadakis95 commented 4 years ago

I am also having some such problems. For instance, if I call

Rfast::mat.mult(diag(4), diag(5)) it not only throws an error (as it should) but crashes the R session. I am running R version 3.6.2 (64-bit) on Windows 8. I tried also in R-devel with same result. It happens in RStudio and in RGui.

Even some matrices with conformable dimensions also caused such a crash. For example, X <- matrix(data = runif(100 * 2), nrow = 100, ncol = 2) Rfast::mat.mult(Rfast::transpose(X), X)

The error thrown is

Mat::col(): index out of bounds

The R session crashes with a dialogue:

Runtime Error! Rgui.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Maybe this is not an issue with your package per se, but I have never had this happen with any other R function.

I have already fix this bug for the next update.

tjfarrar commented 4 years ago

I have already fix this bug for the next update.

When can we expect the next update on CRAN? Is it possible to make the development version available on Github in the meantime? I see that it is still only version 1.9.9 that is available on Github (same as on CRAN).

ManosPapadakis95 commented 4 years ago

I have already fix this bug for the next update.

When can we expect the next update on CRAN? Is it possible to make the development version available on Github in the meantime? I see that it is still only version 1.9.9 that is available on Github (same as on CRAN).

I don't know... Download github version. I have fix it.

tjfarrar commented 4 years ago

Thanks. A suggestion would be to follow the naming conventions for development versions of a package, e.g. 1.9.9.9001. See here. Otherwise people will assume that version 1.9.9 on Github is identical to version 1.9.9 on CRAN.

nassuphis commented 3 years ago

rowOrder() still causes a crash, i used the github version actually, i got this error after a long freeze:

Error: C stack usage 7971028 is too close to the limit

ManosPapadakis95 commented 3 years ago

That's doesn't make any sense. I have the same version of rowOrder for a long time. Could you please kindly check it again?

Στις Σάβ, 30 Ιαν 2021, 18:25 ο χρήστης nassuphis notifications@github.com έγραψε:

rowOrder() still causes a crash, i used the github version

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RfastOfficial/Rfast/issues/16#issuecomment-770238440, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPP3FMUSSQCX7MVOJFRWU3S4QXH7ANCNFSM4LQPLCGQ .

nassuphis commented 3 years ago

on it. will report back once i have a repeatable example.