Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]Version 1.1.383 crashes when trying to create a new project on Windows 10 x64 #1770

Closed
xiasummer opened this issue Nov 20, 2017 · 28 comments

Comments

@xiasummer
Copy link

Don't know why. But seems it is simply very weak of this software.

And, if there is wrong when running, like a infinite loop. You click end process manually——Rstudio simlely crashes, and you have to stop the whole process with Windows Task Manager.

Why?

@jmcphers
Copy link
Member

Sorry, we haven't been able to reproduce this issue. Can you share any more details about the crash?

@xiasummer
Copy link
Author

Hi,
Yes, of course. I do think it very strange.

  • For a Empty Rstudio which just started with no projects, click create new projects——Doooon, Crash, No reactions. Actually you can only "Open" a Project.

  • When I already have a project working on, click New Project, also crash.

  • When it went wrong in running a loop or building packages, if you click the red point(which will stop R running manually), Dooooon, it crashes.


Always, I have to stop the session by Windows Task Manager, because clicking the "X" of Rstudio on the head right, can only get a waiting circle forever. And never close the program.

Also, if it crashes, you can not save the file editing, but it just stays there, you can click buttoms of Rstudio, but nothing happens.

Quite strange.

@kylevoyto
Copy link

kylevoyto commented Nov 21, 2017

The contributing guidelines on filing bugs could be helpful:

  1. If at all possible, include a minimal working example which will reproduce the bug. If you're unable to reproduce consistently, then please do your best to provide us a set of actions, or other steps that seem to be correlated with the issue you are seeing. (You specified a lot of this in the previous post.)
  2. Indicate your operating system, exact version of RStudio (from Help | About RStudio) and the output of sessionInfo() in R. (You already specified Windows 10 x64 and RStudio version 1.1.383, but the R details could help.)
  3. If appropriate, include screenshots, any relevant log files, and a diagnostic report.

Thanks

@xiasummer
Copy link
Author

xiasummer commented Nov 21, 2017

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936
[2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936

attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base

other attached packages:
[1] plotly_4.7.1 ggplot2_2.2.1 RQuantLib_0.4.2

loaded via a namespace (and not attached):
[1] Rcpp_0.12.13 bindr_0.1
[3] magrittr_1.5 munsell_0.4.3
[5] viridisLite_0.2.0 colorspace_1.3-2
[7] R6_2.2.2 rlang_0.1.4
[9] httr_1.3.1 plyr_1.8.4
[11] dplyr_0.7.4 tools_3.4.2
[13] grid_3.4.2 data.table_1.10.4-3
[15] gtable_0.2.0 htmltools_0.3.6
[17] lazyeval_0.2.1 assertthat_0.2.0
[19] digest_0.6.12 tibble_1.3.4
[21] bindrcpp_0.2 tidyr_0.7.2
[23] purrr_0.2.4 htmlwidgets_0.9
[25] RND_1.2 glue_1.2.0
[27] compiler_3.4.2 scales_0.5.0
[29] jsonlite_1.5 pkgconfig_2.0.1

diagnostics-report.txt

Nothing to do with the location, I just tried setting to Eng with

Sys.setlocale("LC_ALL","English")

But all the problems are still there.

@jmcphers
Copy link
Member

@xiasummer It sounds like what you're experiencing is more a hang than a crash. Is your home directory stored on a network? If it is, would you be willing to try our daily build to see if that resolves your issue?

https://dailies.rstudio.com/

@xiasummer
Copy link
Author

xiasummer commented Nov 21, 2017

@jimhester Actually, all on my local computer. And the daily build version is still can't work properly, and all the problems I presented are still there.

Second thought, I think it may be caused by the R program I installed?


sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2

diagnostics-report.txt

@jmcphers
Copy link
Member

It's easy enough to test! Does 1.0 work for you? You can download a copy of 1.0.153 here:

https://support.rstudio.com/hc/en-us/articles/206569407-Older-Versions-of-RStudio

@xiasummer
Copy link
Author

xiasummer commented Nov 21, 2017

@jmcphers @kylevoyto Thank you, but still not working, no mater the 1.0 or 0.99 version.But I see

A very interesting thing:

When I just started Rstudio, the processes which are running
image

But when I click New project, The Rstudio just hang~ Then the processes which are running

image

Does that mean that Rstudio wants to change to a new instance but something stuck there?

@xiasummer
Copy link
Author

Truely, any advice?

@xiasummer xiasummer changed the title Version 1.1.383 ALWAYS crashes when trying to create a new project on Windows 10 x64 [Bug]Version 1.1.383 ALWAYS crashes when trying to create a new project on Windows 10 x64 Nov 30, 2017
@kevinushey
Copy link
Contributor

That seems surprising that make is running. It's hard to speculate why it might be doing this -- perhaps in an attempt to build or install a package on startup? Do you have anything in your .Rprofile or similar that might be trying to download / install R packages on startup? (I don't think RStudio would normally do this on its own)

@xiasummer
Copy link
Author

xiasummer commented Dec 4, 2017

You mean the Rprofile in "C:\Program Files\R\R-3.4.2\library\base\R"

It is

### This is the system Rprofile file. It is always run on startup.
### Additional commands can be placed in site or user Rprofile files
### (see ?Rprofile).

### Copyright (C) 1995-2015 The R Core Team

### Notice that it is a bad idea to use this file as a template for
### personal startup files, since things will be executed twice and in
### the wrong environment (user profiles are run in .GlobalEnv).

.GlobalEnv <- globalenv()
attach(NULL, name = "Autoloads")
.AutoloadEnv <- as.environment(2)
assign(".Autoloaded", NULL, envir = .AutoloadEnv)
T <- TRUE
F <- FALSE
R.version <- structure(R.Version(), class = "simple.list")
version <- R.version            # for S compatibility

## for backwards compatibility only
R.version.string <- R.version$version.string

## NOTA BENE: options() for non-base package functionality are in places like
##            --------- ../utils/R/zzz.R

options(keep.source = interactive())
options(warn = 0)
# options(repos = c(CRAN="@CRAN@"))
# options(BIOC = "http://www.bioconductor.org")

options(timeout = 60)
options(encoding = "native.enc")
options(show.error.messages = TRUE)
## keep in sync with PrintDefaults() in  ../../main/print.c :
options(scipen = 0)
options(max.print = 99999)# max. #{entries} in internal printMatrix()
options(add.smooth = TRUE)# currently only used in 'plot.lm'
options(stringsAsFactors = TRUE)
if(!interactive() && is.null(getOption("showErrorCalls")))
    options(showErrorCalls = TRUE)

local({dp <- Sys.getenv("R_DEFAULT_PACKAGES")
       if(identical(dp, "")) ## it fact methods is done first
           dp <- c("datasets", "utils", "grDevices", "graphics",
                   "stats", "methods")
       else if(identical(dp, "NULL")) dp <- character(0)
       else dp <- strsplit(dp, ",")[[1]]
       dp <- sub("[[:blank:]]*([[:alnum:]]+)", "\\1", dp) # strip whitespace
       options(defaultPackages = dp)
    })

## Expand R_LIBS_* environment variables.
Sys.setenv(R_LIBS_SITE =
           .expand_R_libs_env_var(Sys.getenv("R_LIBS_SITE")))
Sys.setenv(R_LIBS_USER =
           .expand_R_libs_env_var(Sys.getenv("R_LIBS_USER")))

local({
    if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_CPU")))
        setSessionTimeLimit(cpu = tl)
    if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_ELAPSED")))
        setSessionTimeLimit(elapsed = tl)
})

.First.sys <- function()
{
    for(pkg in getOption("defaultPackages")) {
        res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE,
                       character.only = TRUE)
        if(!res)
            warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
                    call. = FALSE, domain = NA)
    }
}

## called at C level in the startup process prior to .First.sys
.OptRequireMethods <- function()
{
    pkg <- "methods" # done this way to avoid R CMD check warning
    if(pkg %in% getOption("defaultPackages"))
        if(!require(pkg, quietly = TRUE, warn.conflicts = FALSE,
                    character.only = TRUE))
            warning('package "methods" in options("defaultPackages") was not found',
                    call. = FALSE)
}

if(nzchar(Sys.getenv("R_BATCH"))) {
    .Last.sys <- function()
    {
        cat("> proc.time()\n")
        print(proc.time())
    }
    ## avoid passing on to spawned R processes
    ## A system has been reported without Sys.unsetenv, so try this
    try(Sys.setenv(R_BATCH=""))
}
###-*- R -*-

## this will break if R is on a network share
.Library <- file.path(chartr("\\", "/", R.home()), "library")
.Library.site <- Sys.getenv("R_LIBS_SITE")
.Library.site <- if(!nchar(.Library.site)) file.path(R.home(), "site-library") else unlist(strsplit(.Library.site, ";"))
.Library.site <- .Library.site[file.exists(.Library.site)]

if(!nzchar(Sys.getenv("R_LIBS_USER")))
    Sys.setenv(R_LIBS_USER=
               file.path(Sys.getenv("R_USER"), "R",
                         "win-library",
                         paste(R.version$major,
                               sub("\\..*$", "", R.version$minor),
                               sep=".")
                         ))

invisible(.libPaths(c(unlist(strsplit(Sys.getenv("R_LIBS"), ";")),
                      unlist(strsplit(Sys.getenv("R_LIBS_USER"), ";"))
                      )))

local({
    popath <- Sys.getenv("R_TRANSLATIONS", "")
    if(!nzchar(popath)) {
        paths <- file.path(.libPaths(), "translations", "DESCRIPTION")
        popath <- dirname(paths[file.exists(paths)][1])
    }
    bindtextdomain("R", popath)
    bindtextdomain("R-base", popath)
    bindtextdomain("RGui", popath)
    assign(".popath", popath, .BaseNamespaceEnv)
})

if(nzchar(Sys.getenv("R_PAPERSIZE"))) {
    options(papersize = Sys.getenv("R_PAPERSIZE"))
} else {
    if(grepl("(canada|united.states)", Sys.getlocale("LC_MONETARY"),
             ignore.case = TRUE)) options(papersize = "letter")
    else options(papersize = "a4")
}

options(pager = if(length(grep("--ess", commandArgs()))) "console" else "internal",
        useFancyQuotes = (.Platform$GUI == "Rgui"),
        pdfviewer = Sys.getenv("R_PDFVIEWER", file.path(R.home("bin"), "open.exe")))

if(.Platform$GUI == "Rgui")
    Sys.setenv(GFORTRAN_STDOUT_UNIT = "-1", GFORTRAN_STDERR_UNIT = "-1")

local({
    br <- Sys.getenv("R_BROWSER", NA_character_)
    if(!is.na(br)) options(browser = br)
    tests_startup <- Sys.getenv("R_TESTS")
    if(nzchar(tests_startup)) source(tests_startup)
    ca_cert <- Sys.getenv("CURL_CA_BUNDLE", NA_character_)
    if(!is.na(ca_cert) &&
       file.exists(ca_path <- file.path(R.home("etc"), "curl-ca-bundle.crt")))
        Sys.setenv(CURL_CA_BUNDLE = ca_path)
})

@kevinushey
Copy link
Contributor

I mean a file called .Rprofile, typically placed within your home directory, or within the directory of the project that you're running with. You can see some other documentation for this in ?Startup, e.g.

 Then, unless '--no-init-file' was given, R searches for a user
 profile, a file of R code.  The path of this file can be specified
 by the 'R_PROFILE_USER' environment variable (and tilde expansion
 will be performed).  If this is unset, a file called '.Rprofile'
 is searched for in the current directory or in the user's home
 directory (in that order).  The user profile file is sourced into
 the workspace.

@xiasummer
Copy link
Author

Actually I don't have such file in my computer, I think it must be the default file like
C:\Program Files\R\R-3.4.2\etc\Rprofile.site

# Things you might want to change

# options(papersize="a4")
# options(editor="notepad")
# options(pager="internal")

# set the default help type
# options(help_type="text")
  options(help_type="html")

# set a site library
# .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library")

# set a CRAN mirror
# local({r <- getOption("repos")
#       r["CRAN"] <- "http://my.local.cran"
#       options(repos=r)})

# Give a fortune cookie, but only to interactive sessions
# (This would need the fortunes package to be installed.)
#  if (interactive()) 
#    fortunes::fortune()

@jrthompson54
Copy link

I think I'm seeing a slighyly different but related issue in that the problem only occurs when projects are involved (Win10 64bit; 16G RAM; RStudio 1.1.383; R3.4.3). I can open projects OK, but after opening a project, file dialogs become excruciatingly slow. File open and file new dialogs show a spinning icon and it either takes several minutes for the actual file dialog to appear or, more typically, I impatiently kill the RStudio task after several minutes and start over. Ctrl S to save a file also hangs. Since I mostly work within projects, it took me some time to make this connection, but if I don't open a project, I can work on the same files and file dialogs consistently operate nearly instantly. The frustrating part is this behavior is not consistent. Sometimes I have a good day or several days where operation is fine. Then the interminable delays come back. On a bad day, rebooting does not seem to clear the problem. Deleting the .rproj file and recreating the project doesn't help. When the problem is active, all projects behave this way. Once this starts happening, RStudio also hangs when hitting the X to close the application. It says it is closing but never does actually quit. Must kill via task manager.

Don't spend time responding to this just yet. I'm taking the suggestion above to downgrade to v1.0 and, due to the intermittent nature of this in my experience, I'll have to run the downgraded version for some number of days before I'm sure the problem has gone away.

@jmcphers
Copy link
Member

jmcphers commented Jan 6, 2018

@jrthompson54 That sounds like #1592, which is problem we have fixed in our preview release. Want to give it a try to see if it fixes things for you?

https://www.rstudio.com/products/rstudio/download/preview/

@jrthompson54
Copy link

The descriptions of behaviors on #1592 resonate. I work on a corporate laptop that does have half a dozen mapped network drives most of which are listed as disconnected. But all the files I'm working on are local to drive C:. At one point, I suspected the mapped drives might be an issue and deleted all the mapped drives which did not clear the problem.

In any case, I installed the preview release and for good measure reset the state. On first attempt, opening files with a project loaded is sluggish vs opening same files without a project loaded (~10s vs nearly instantly), so much better than before. Given the intermittent nature of my issue, I'll report back in a few days.

Thanks for the awesome response time.

@kevinushey
Copy link
Contributor

I believe the issue with RStudio failing to launch in these environments is now resolved with v1.1.419 (and above), but there is likely still more to be done to handle slowness when using RStudio with networked filesystems.

I'm going to close this issue for now, but please feel free to re-open if you're still encountering problems!

@xiasummer
Copy link
Author

xiasummer commented Jan 30, 2018

I upgraded and tried.

But, actually, the problem still remains. When I click "New Project", Rstudio will stop working. And cannot be closed except with the task manager.

image

@dfalty dfalty reopened this Feb 22, 2018
@logworthy
Copy link

logworthy commented Mar 1, 2018

@xiasummer, I have the exact same issue! Fresh install, trying to create a new project for the first time and it always hangs.

After trying to create a new project:
image

Normal use:
image

No idea why make would be running!? Anyway, when I right-click on the make.exe in task manager, I can see that it is coming from my Rtools install location. I removed it from that location (it doesn't appear anywhere else in my PATH), and magically I can now create projects again.

@kevinushey
Copy link
Contributor

Strange! If we can figure out why make.exe is getting invoked by RStudio, then we should hopefully be able to fix the issue.

Does this occur in all kinds of new projects, or only certain kinds (e.g. R Package projects)?

@logworthy
Copy link

logworthy commented Mar 1, 2018 via email

@kevinushey
Copy link
Contributor

Just to confirm, RStudio is responsive before clicking on the New Project button; it's only after clicking New Project that RStudio becomes unresponsive?

@logworthy
Copy link

logworthy commented Mar 2, 2018 via email

@kevinushey
Copy link
Contributor

Thanks for the extra information. We'll try and see if there's something we're doing in that code path that might trigger a call to make as you're seeing.

@xiasummer
Copy link
Author

xiasummer commented Mar 24, 2018

Finally, I know why now. That's because a have installed Mingw and Rtools is not properly installed.

I reinstalled Rtools and have it added to the path values.
Then I deleted Mingw from the Path values.

And then I deleted the Mingw folder. (From what I see, you have to delete the folder, even you have deleted the Path value.)

Finally it works fine in making fine now.

@xiasummer xiasummer changed the title [Bug]Version 1.1.383 ALWAYS crashes when trying to create a new project on Windows 10 x64 [Bug]Version 1.1.383 crashes when trying to create a new project on Windows 10 x64 Mar 24, 2018
@jrthompson54
Copy link

I've had a similar file dialog-associated hang problem for ~ 6 months or so. In my case, I can open a project, but on the next attempt to open a file, the file dialog opens and becomes unresponsive... usually taking longer than my patience (5-10 minutes) but if I wait long enough it eventually responds. The delay seems to impact any file open or file save operation. No delays or hangs occur if I open the same files without a project loaded.

A colleague pointed me to a rather obscure solution. Each of my projects is also a git repo. Normally git init creates a hidden .git folder. In several of my affected projects, the .git folder was no longer hidden. Don't know how this happens yet. I use command line git commands to commit and push. In any case, re-hiding the .git folder clears the problem (only need to set the hidden attribute to the .git folder, not the contents). I fixed this problem with half a dozen projects so far, so it seems to be a reproducible solution for my issue.

So if you're experiencing file dialog hangs on windows, check for an un-hidden .git folder and re-hide it if necessary (rt click/properties).

My setup is win10-64bit 16G system, RStudio v1.1.442 (but also happened with 1.0.153 and 1.1.408), R3.4.4. I don't have mingw installed.

@IssieWinney
Copy link

@jrthompson54 I was having problems for some time, and your solution has just fixed it. Thank you so much!

It began with git hanging on push. Then one project began to hang on saving files, and for a couple of weeks the whole project was hanging on opening and would crash the entire RStudio session. The problem spread to the rest of my projects in the last week. Task manager was the only way to stop RStudio, and sometimes the RStudio window would close but leave processes running in the task manager.

The problem is solved on my machine by hiding the .git folder in the project folder, and can be made to come back by unhiding the .git folder.

I am using Git v2.10.2 with RStudio 1.1.442 but had the same problem with previous versions of RStudio. Machine is running Windows 10 pro x64, version 10.0.16299, computer is a 4-core Dell.

sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.3.2 yaml_2.1.14

@jmcphers
Copy link
Member

In any case, re-hiding the .git folder clears the problem (only need to set the hidden attribute to the .git folder, not the contents).

We've fixed this issue in RStudio 1.1.447. You can download it here:

https://www.rstudio.com/products/rstudio/download/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants