R session aborted r encountered a fatal error

I was using RStudio for a long time and it was ok with me, but before one day when I try to compile a code, it gives this message "R encountered a fatal error" and it forces me to restart RStudio a...

I was using RStudio for a long time and it was ok with me, but before one day when I try to compile a code, it gives this message «R encountered a fatal error» and it forces me to restart RStudio again and the problem still.

the code I used just call two libraries:

library(Rtsne)
library(ggplot2)

And this I was run it before multiple time and it’s ok.

Any help, please?

asked Sep 2, 2018 at 15:35

LamaMo's user avatar

16

This issue can occur in many instances and the causes might be multiple. I run a very large dataset relating to the single cell transcriptome, and the error can occur unexpectedly and randomly. Sometimes this will happen but can be fixed after restart the session, sometimes this will not happen running the same code.

answered Jul 13, 2021 at 3:19

Z. Zhang's user avatar

Z. ZhangZ. Zhang

6254 silver badges14 bronze badges

I experienced the same «R session aborted» after updating R. I thought it was R’s fault, then I tested the script in terminal and everything worked fine. I tried reinstalling Rstudio (same version) and it still failed.
The issue was solved by installing the lastest Rstudio from https://dailies.rstudio.com/.

answered May 24, 2021 at 18:39

Nip's user avatar

NipNip

3774 silver badges11 bronze badges

I have encountered this problem when running the first chunk in every RMD file I create, specifically when clicking the ‘run current chunk’ arrow sign.

One way to avoid this is to run the first chunk after highlighting the code in lines, and simply clicking the ‘run selected lines’ command on the top right-hand corner. From my experience the subsequent chunks can be run without issue by clicking the ‘run chunk’ arrow.

answered Aug 14, 2021 at 13:30

siegfried's user avatar

siegfriedsiegfried

4401 gold badge5 silver badges16 bronze badges

1

Hi,

I have R version 3.4.3 on Mac OS 10.11.6 (El Capitan) installed. I installed Keras by executing:

install.packages("keras")
install_keras()

However, I was prompted the following error message:

Error: Prerequisites for installing TensorFlow not available.

Execute the following at a terminal to install the prerequisites:

$ sudo /usr/bin/easy_install pip
$ sudo /usr/local/bin/pip install —upgrade virtualenv

Hence, I executed both lines in the Mac Terminal. While doing so a warning message popped up stating:

The directory ‘/Users/xxx/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag

Nevertheless, both commands seemed to run through successful. Afterwards I executed install_keras() again and everything seemed to install correctly.

A new R session was started and after loading the Keras library and executing:
imdb = dataset_imdb(num_words = 10000)
I got a warning message, which said:

FutureWarning: Conversion of the second argument of issubdtype from ‘float’ to ‘np.floating’ is depreciated…

Furthermore, the R session encountered a fatal error and R restarted.

R session Aborted, R encountered a fatal error. The session was terminated.

From here on I tried a lot of different things to fix the problem, but nothing helped. I installed Anaconda and tried install_keras(method="conda") after removing and reinstalling the keras package. I also tried uninstalling python completely, reinstalled R but nothing changed.

Interestingly on an other Mac machine where I run R 3.4.2 on Mac OS 10.12.6 (Sierra) I got Keras to work. However, I installed Anaconda3 right away and chose install_keras(method="conda") right away after installing the package. Hence, I did not get the error message

Error: Prerequisites for installing TensorFlow not available.

Execute the following at a terminal to install the prerequisites:

$ sudo /usr/bin/easy_install pip
$ sudo /usr/local/bin/pip install —upgrade virtualenv
in the first place.

Besides, a complete reinstall of Mac OS X, which is not really a convenient option I don’t know what to do about this. Do you have any ideas about this issue?

I would much appreciate the help since I need to use this package for my master thesis.

*Edit: After even more Googling this guy on Stackoverflow seems to have the same issue as I. However, noone has responded yet…
https://stackoverflow.com/questions/49101859/when-trying-to-run-any-keras-code-r-session-aborts

*Edit 2: The following two lines also crash R:

library(tensorflow)
tf_config()

Содержание

  1. Fatal Error at Startup on Windows #11666
  2. Comments
  3. R Session Startup Failure Report
  4. RStudio Version
  5. Error message
  6. Process Output
  7. System details
  8. Steps to reproduce the problem
  9. Describe the problem in detail
  10. Describe the behavior you expected
  11. R studio fatal error when loading data Ubuntu 18.04 #5080
  12. Comments
  13. System details
  14. Steps to reproduce the problem
  15. Describe the problem in detail
  16. Describe the behavior you expected
  17. Screenshots from crash report
  18. Crash report metadata
  19. journal error
  20. SegvAnalysis
  21. Below is what I did for testing
  22. RStudio error when opening projects:
  23. RStudio error when opening projects:
  24. Comments
  25. fatal error when Binding not found #2494
  26. Comments
  27. System details
  28. Steps to reproduce the problem
  29. Describe the problem in detail
  30. RStudio fails with «The R Session had a fatal error» and «site can’t be reached» after upgrade to 1.2 #2313
  31. Comments
  32. System details
  33. Steps to reproduce the problem
  34. Describe the problem in detail
  35. Describe the behavior you expected
  36. I think I’m correct that the wrong libR.dylib is being loaded. Copying notes from Slack.

Fatal Error at Startup on Windows #11666

R Session Startup Failure Report

RStudio Version

RStudio 2022.07.1+554, «Spotted Wakerobin» (7872775, 2022-07-22) for Windows

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36

Error message

The R session had a fatal error.

2022-07-26T10:28:10.699854Z [rsession-ParmeshGajjar] ERROR system error 2 (The system cannot find the file specified) [path: C:/Program Files/RStudio/R/modules/SessionCpp.R]; OCCURRED AT class rstudio::core::Error __cdecl rstudio::r::SourceManager::sourceTools(const class rstudio::core::FilePath &) src/cpp/r/RSourceManager.cpp:45

Process Output

The R session exited with code 2.

System details

Steps to reproduce the problem

Describe the problem in detail

Describe the behavior you expected

Open R studio without problem

  • [X ] I have read the guide for submitting good bug reports.
  • [ X] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

The text was updated successfully, but these errors were encountered:

@pg320 Thank you for raising issue! A couple of questions:

  1. What version of R are you using?
  2. Did this work in previous versions of RStudio, especially 2022.07.0+548?

2022-07-26T10:28:10.699854Z [rsession-ParmeshGajjar] ERROR system error 2 (The system cannot find the file specified) [path: C:/Program Files/RStudio/R/modules/SessionCpp.R]; OCCURRED AT class rstudio::core::Error __cdecl rstudio::r::SourceManager::sourceTools(const class rstudio::core::FilePath &) src/cpp/r/RSourceManager.cpp:45

Does this file exist? C:/Program Files/RStudio/R/modules/SessionCpp.R

The error implies to me either that your RStudio installation is corrupt, or (maybe) some sort of permissions issue preventing RStudio from reading these files on startup.

It seems like something went wrong during installation of RStudio, but I’m not sure what. I would recommend:

  1. Restart your computer (just to be certain no RStudio files are in use),
  2. Uninstall the old version of RStudio,
  3. Install a new copy of RStudio.

I have the same problem. Installed the latest version
RStudio 2022.07.2+576
«Spotted Wakerobin», September 21st, 2022
It worked for a while but now I can’t open it and I get the same above error, can’t find SessionCpp.R (which does not exist).

Источник

R studio fatal error when loading data Ubuntu 18.04 #5080

rStudio will crash while loading data online via package quantmod. The error saying rStudio has encountered a fatal error and need to restart.

I tried both desktop version and server version, and having the same problem.

System details

Steps to reproduce the problem

Describe the problem in detail

Describe the behavior you expected

Screenshots from crash report

Crash report metadata

journal error

SegvAnalysis

The text was updated successfully, but these errors were encountered:

Cannot reproduce. RStudio 1.2.1555, R 3.5.3 (also from MS), Windows 10.

I’m not able to reproduce with R from the Debian repositories on my Ubuntu 18.04 VM.

The crash appears to be in the crypto libraries ( ssl3_cleanup_key_block() ) so I suspect this is either an issue with the version of OpenSSL on your system or with something with Microsoft R Open.

@monstaaa What happens when you run this in standalone R?

Thank you all for the information.

So after some testing, I can conclude that rStudio is not responsible for this crash. It is Microsoft-r(3.5.3 for Ubuntu 18). Maybe it is due to OpenSSL as @kevinushey said, but it is irrelevant here.

Below is what I did for testing

OS: Ubuntu 18.04
rStudio: 1.2.1555
GPU driver: 390 // default by Ubuntu

Источник

RStudio error when opening projects:

R encountered a fatal error.

The session was terminated. #1673

RStudio error when opening projects:

R encountered a fatal error.

I am getting an error when trying to open a project in RStudio. I get the message:

R encountered a fatal error.

The session was terminated.
And RStudio fails to open.

We are using RStudio in the class we are teaching and almost half of the students have encountered the same error (across different OS)

The text was updated successfully, but these errors were encountered:

I have the same issue when opening .Rproj files. RStudio (Version 1.0.153) opens fine as long as I am not opening projects.

Happy to provide more information about the packages being used in my projects, please let me know if you need them.

If you haven’t already, you might want to ensure you have the latest release of RStudio installed (v1.1.383): https://www.rstudio.com/products/rstudio/download/#download

If you’re using the data.table package in your projects, there’s currently an issue that can cause RStudio session crashes (with version 1.10.4-2). You might try installing the development version with:

@rkhetani: In that project, there should be a hidden folder called .Rproj.user . If you temporarily move that folder out of the way, does the startup issue go away?

In addition, there might be a saved workspace in that directory that’s failing to restore, called .RData . Does moving that file to a different location resolve the issue?

You can also try resetting RStudio’s state altogether.

Источник

fatal error when Binding not found #2494

System details

Steps to reproduce the problem

Describe the problem in detail

RStudio crashes if dplyr can’t find specified column

Executing the code above in RGui works and gives:

The text was updated successfully, but these errors were encountered:

I wasn’t able to reproduce this — an error is successfully thrown for me with RStudio v1.2.462. Can you provide any other information?

You mention your OS is macOS but suggest it works in RGui, but that’s a Windows-only application. Or did you mean R.app? (I wasn’t able to reproduce with the latest daily of RStudio on Windows either)

I just downgraded to RStudio 1.1.442 and the crash still occurs.

My session info from a fresh RStudio start:

What else could I provide you?

I followed the steps you’ve written here and 1) started Rstudio, 2) lldb 3) typed «attach -name session» and then RStudio crashes again. Does this help you?

You’ll need to type c to continue execution after the SIGSTOP , then attempt to run the crashing code. After the crash (you might see SIGSEGV or similar) entering bt should give the rest of the information we need.

You might also want to just try making sure all of your R packages are up to date:

I would but there is no chance: RStudio crashes immediately after starting «attach . «

Packages are all updated

You might try using something like:

and then launching a new instance of RStudio — this invocation will tell lldb to wait and attach to the next process called rsession that gets launched. (RStudio seems to behave better in that case).

I also think RStudio v1.2 is a bit more reliable when attempting to attach a debugger.

Hope this helps a bit more:

You need to enter c to continue execution after the debugger is attached, then run the R code causing the crash, and enter bt to get the back trace.

thanks for clarifying (never debugged with lldb). one moment

Alright, we now know the crash is happening within dplyr , but it’s hard to say why.

Does reinstalling dplyr and its dependencies help?

Did you install any of these packages from sources, or are you using binaries from CRAN? If you’re installing from source, what toolchain are you using?

The fact that the failure occurs when converting a C++ exception into an R condition suggests this might be due to the mixing of different toolchains (e.g. the system toolchain + R’s clang4 toolchain, or perhaps Homebrew’s llvm , or a different toolchain altogether)

I generally install from source with the following Makevars content:

I’m currently reinstalling dplyr by source again.

If you’re using g++ , then the error is almost certainly due to a mixing of gcc ‘s libstdc++ and the default macOS C++ standard library ( libc++ , also used by clang ). Because RStudio requests libc++ on load, that standard library gets loaded in lieu of libstdc++ and so things blow up. If you’re running things from the terminal, then I imagine everything uses libstdc++ and so no issues occur.

Unfortunately, I don’t think this is something we can easily work around in RStudio.

Is there a reason why you’re using gcc rather than clang ?

Is there a reason why you’re using gcc rather than clang?

Yes, I occasionally needed to compile the same code on multiple platforms and I thought using the same compiler avoids «numerical|computational» issues (for my hydraulic simulations. ).

For the record, I installed dplyr with the «gcc» toolchain again from source and RStudio still crashes.
After switching Makevars to

and reinstalling dplyr from source, Studio doesn’t crash anymore. Wow, thanks Kevin. That was impressive.

Источник

RStudio fails with «The R Session had a fatal error» and «site can’t be reached» after upgrade to 1.2 #2313

System details

Steps to reproduce the problem

Install RStudio 1.2. Launch it.

Describe the problem in detail

Get the following:

Describe the behavior you expected

RStudio should start.

The text was updated successfully, but these errors were encountered:

Did you recently upgrade R as well, or only RStudio in this case? Our theory in the past is that this is caused by inadvertently mixing different R versions on launch.

I hit this one back in February. the only change was upgrading to 1.2, reverting back to 1.1 fixed this issue. I was able to use 1.2 by removing all R versions from /Library/Frameworks/R.framework/Versions/ and reinstalling R, otherwise I would hit:

Running: R version 3.4.1 (2017-06-30) — «Single Candle»

I really want to understand how R / RStudio gets into this state as a number of users have encountered this issue over the past couple years, and «try deleting R and RStudio and then reinstalling» isn’t really the best prescription.

I suspect this is the code that’s failing to run:

Lines 433 to 437 in 79c176e

// install R tools
FilePath toolsFilePath = s_options. rSourcePath . complete ( » Tools.R » );
Error error = r::sourceManager (). sourceTools (toolsFilePath);
if (error)
return error ;

In other words, our attempt to source the Tools.R file is failing.

Can we pause the rsession at the time when the crash occurs, and see what packages / libraries are loaded? Are we loading the same libR.so + associated R libraries that we expect to be loading?

I think I’m correct that the wrong libR.dylib is being loaded. Copying notes from Slack.

With RStudio v1.2:

Note that we’re implicitly linking to R 3.0.x. If the user has R 3.0.x installed on their machine, I suspect RStudio will inadvertently load that version of R on launch rather than the one actually requested at runtime.
@hadley: do you have R 3.0.x installed? (edited)
If this is the reason why things are blowing up now, I suspect we got away with it in the past because we linked to a super-old version of R that nobody actually had installed on their machines

kevin [12:36 PM]
Okay, I can reproduce the crash. I think I’m right in my assessment. If you install R 3.0.3, then switch back to R 3.x.y, then you’ll see that crash on launch.
I’ll copy this to the issue.

I’m using Mac and I was also able to use 1.2 by removing all old versions from from /Library/Frameworks/R.framework/Versions/

I assume that the new version of Rstudio doesn’t know which R to use when there’re multiple paths exist.

Источник

Hi,

I’m using Ubuntu 14.04 and R version 3.2.2 with RStudio version 0.99.484 and my session crash when I’m using featureCounts from Rsubread version 1.20.2 package.

I used featureCounts with no problems using mus_musculus.grcm38.82.gtf GTF archive from Ensembl over 12 miRNA-Seq BAM files. This is the code:

newcount = featureCounts(
    files=c("1077_C274.bam", "1078_C283.bam",
        "1079_C3_MAC-277.bam", "1080_M1-MA-269.bam",
        "1081_M2-MA-239.bam", "1082_M3-MA-305.bam",
        "1083_CM1-363.bam", "1084_CM2-369.bam",
        "1085_CM3-MAC-360.bam", "1086_MM1-MA-376.bam",
        "1087_MM2-MA-383.bam", "1088_MM3-MA-342.bam"),
    annot.ext="Mus_musculus.GRCm38.82.gtf",
    isGTFAnnotationFile=TRUE)

I tried to repeat that but with a SAF file obtained from mmu.gff3 from miRBase. The file I created (using awk mostly) looks like:

GeneID    Chr    Start    End    Strand
MI0021869    chr1    12425986    12426106    +
MIMAT0025084    chr1    12426016    12426038    +
MI0000249    chr1    20679010    20679082    +
MIMAT0017004    chr1    20679017    20679039    +
MIMAT0000239    chr1    20679055    20679076    +
MI0000821    chr1    20682769    20682887    +
MIMAT0017083    chr1    20682797    20682818    +
MIMAT0000769    chr1    20682834    20682855    +
MI0000144    chr1    23272269    23272339    +
MIMAT0000128    chr1    23272274    23272295    +
MIMAT0000129    chr1    23272315    23272336    +
MI0000548    chr1    23291701    23291784    +
MIMAT0000514    chr1    23291714    23291736    +

Both R and Rstudio crash when I used this code:

countmiRNAs = featureCounts(
    files=c("1077_C274.bam", "1078_C283.bam",
        "1079_C3_MAC-277.bam", "1080_M1-MA-269.bam",
        "1081_M2-MA-239.bam", "1082_M3-MA-305.bam",
        "1083_CM1-363.bam", "1084_CM2-369.bam",
        "1085_CM3-MAC-360.bam", "1086_MM1-MA-376.bam",
        "1087_MM2-MA-383.bam", "1088_MM3-MA-342.bam"),
    annot.ext="miRNAs_mmu")

I also used featureCounts version 1.5.0 from the Subread package from sourceforge. It gives me a segfault error.

Surprisingly, RStudio crashes even when I use the first code I posted. I thought it was something about the memory usage but it keeps low. I tried deleting some objects from the workspace and reinstalling the package, but nothing changed.

A friend gave me her annotation file and 1 of her BAM files and featureCounts worked fine. I did not change nothing of the original BAM files.

Have you ever crossed with this issue? Any idea about fixing it? Maybe creating a new SAF file in some other way?

Thanks in advance and sorry for my english. If you need more info or it is incomplete, I’d be glad to update.

Edit: Using a BAM file with no header featureCounts runs with no problem. The header of one of the BAM files looks like:

@HD    VN:1.4    GO:none    SO:coordinate
@SQ    SN:chr1    LN:195471971
@SQ    SN:chr2    LN:182113224
@SQ    SN:chr3    LN:160039680
@SQ    SN:chr4    LN:156508116
@SQ    SN:chr5    LN:151834684
@SQ    SN:chr6    LN:149736546
@SQ    SN:chr7    LN:145441459
@SQ    SN:chr8    LN:129401213
@SQ    SN:chr9    LN:124595110
@SQ    SN:chr10    LN:130694993
@SQ    SN:chr11    LN:122082543
@SQ    SN:chr12    LN:120129022
@SQ    SN:chr13    LN:120421639
@SQ    SN:chr14    LN:124902244
@SQ    SN:chr15    LN:104043685
@SQ    SN:chr16    LN:98207768
@SQ    SN:chr17    LN:94987271
@SQ    SN:chr18    LN:90702639
@SQ    SN:chr19    LN:61431566
@SQ    SN:chrX    LN:171031299
@SQ    SN:chrY    LN:91744698
@SQ    SN:chrM    LN:16299

ADD COMMENT

• link

updated 6 months ago by

38k

written 7.2 years ago by

PSB

0

Понравилась статья? Поделить с друзьями:
  • Query parse error
  • Qt session management error could not open network socket
  • Qt designer как изменить фон
  • Qqmlapplicationengine failed to load component network error
  • Qgis как изменить язык