R session aborted

27 views
Skip to first unread message

Li Guo

unread,
May 8, 2023, 6:08:32 PM5/8/23
to nat-user
Hello all,

I recently encountered a new issue when I am trying to run fancr or fafbseg. Any command I tried from these two packages, I got a R session Aborted error with no clue how to fix this. Anyone has suggestions on this?

Bests
Li

Greg Jefferis

unread,
May 8, 2023, 8:05:56 PM5/8/23
to nat-user
Sorry to hear that. I haven't come across this. Can you give more details about error messages, your OS / R version etc. What happens if you do

```
fafbseg::dr_fafbseg()
R.version
```
Best, Greg.

Ali Aslefathi

unread,
May 8, 2023, 10:13:43 PM5/8/23
to nat-user


I'm sorry to hear that you're experiencing issues with running fancr or fafbseg in R. A "R session Aborted" error can have various causes, including system resources constraints or bugs in the R packages.

Here are a few suggestions that may help you resolve the issue:

1. Check your system resources: Your computer's memory and CPU usage may be reaching their limits, causing the R session to crash. Try closing any unnecessary programs and freeing up some memory space, and then restart R.

2. Update your R packages: Make sure that you have the latest version of fancr or fafbseg installed. You can update packages by running `update.packages()` in R or using the package manager in your R IDE.

3. Check for conflicts: It's possible that there is a conflict between the packages you are using and other packages you have installed. You can check for conflicts by running `conflicts()`, and then unload any conflicting packages by using `unloadNamespace()`.

4. Contact the package maintainers: If none of the above solutions work, you may want to reach out to the maintainers of fancr or fafbseg. They may have encountered similar issues and be able to provide guidance on how to resolve them.

I hope this helps you resolve the issue! If you have any further questions, feel free to ask.

Li Guo

unread,
May 9, 2023, 12:19:27 PM5/9/23
to Greg Jefferis, nat-user
Hello Dr. Jefferis,

Thanks for your reply. This command would also cause the crash as I showed in the screenshot. I have uninstalled and reinstalled natverse and associate packages, as well as R studio, R yesterday, still no luck. I do appreciate any suggestions to fix this.

Bests
Li
Screenshot 2023-05-09 at 8.53.20 AM.png


--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/64b5581d-4480-4d5b-9b41-79d1848930f4n%40googlegroups.com.

Li Guo

unread,
May 9, 2023, 12:25:44 PM5/9/23
to Ali Aslefathi, nat-user
Hello Ali,

Thanks for your suggestions, I do not think CPU and Memory is an issue in my computer as I attach the usage screenshot here. These two packages worked very well before. I will try the solution 2 and 3 and let you know the updates. Thank you!

Bests
Li
Screenshot 2023-05-09 at 9.13.44 AM.pngScreenshot 2023-05-09 at 9.14.06 AM.png


--
You received this message because you are subscribed to a topic in the Google Groups "nat-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nat-user/rU-KhRyHk2E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nat-user+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/nat-user/68d51e07-e059-4688-a564-a9bf1032dcf2n%40googlegroups.com.

Message has been deleted

Greg Jefferis

unread,
May 9, 2023, 12:33:07 PM5/9/23
to nat-user
Can you let me know what R.version says? Also it would be helpful to understand a bit better when this crash happens. For example your screenshot is cut off at the bottom, so I don't know what the last message was. Also you can do

debug(fafbseg::dr_fafbseg)

and then run

fafbseg::dr_fafbseg()

this will allow you to step through line by line which might help pinpoint what call is triggering the crash. Normally the kinds of things that do this are issues with compiled code e.g. in an external library that has been updated, perhaps because of an OS update.

Best,

Greg.

Li Guo

unread,
May 9, 2023, 12:38:21 PM5/9/23
to Greg Jefferis, nat-user
Hello Dr. Jefferis,

In my last email it was not cut off, the crash happened when I run fafbseg::dr_fafbseg(). I attached the output of R version here as well.

Bests
Li

Screenshot 2023-05-09 at 9.35.40 AM.pngScreenshot 2023-05-09 at 9.35.23 AM.png

Li Guo

unread,
May 9, 2023, 1:50:12 PM5/9/23
to Greg Jefferis, nat-user
Dear Dr. Jefferis,

Sorry the last email I did not run properly on the debug step. After following your suggestions, here is the outcome
Screenshot 2023-05-09 at 10.49.21 AM.png

On May 9, 2023, at 9:38 AM, Li Guo <li_...@ucsb.edu> wrote:

Hello Dr. Jefferis,

In my last email it was not cut off, the crash happened when I run fafbseg::dr_fafbseg(). I attached the output of R version here as well.

Bests
Li

<Screenshot 2023-05-09 at 9.35.40 AM.png><Screenshot 2023-05-09 at 9.35.23 AM.png>

Gregory Jefferis

unread,
May 9, 2023, 4:33:36 PM5/9/23
to Li Guo, nat-user
I recommend that you install Python with a dedicated miniconda environment just for R . There are some details in the docs for

?simple_python 

You will need to do two things. 

1. Unset the RETICULATE_PYTHON environment variable wherever you are setting it. Most likely in your .Renviron file. You can do this with

usethis::edit_r_environ()

2. Restart R and do 

simple_python("basic")

Maybe restart R once more for good measure and you should be good to go. 

Best,

Greg. 




Sent from my iPhone

On 9 May 2023, at 21:20, Li Guo <li_...@ucsb.edu> wrote:

Dear Dr.Jefferis,

Both fafbseg:::check_python() and fafbseg:::check_reticulate() trigger crash. My python setup is 

> reticulate::py_discover_config() python: /Users/liguo/opt/anaconda3/bin/python libpython: /Users/liguo/opt/anaconda3/lib/libpython3.8.dylib pythonhome: /Users/liguo/opt/anaconda3:/Users/liguo/opt/anaconda3 version: 3.8.8 (default, Apr 13 2021, 12:59:45) [Clang 10.0.0 ] numpy: /Users/liguo/opt/anaconda3/lib/python3.8/site-packages/numpy numpy_version: 1.20.1 NOTE: Python version was forced by RETICULATE_PYTHON

Would you suggest me to reinstall python here?

Bests
Li

On May 9, 2023, at 11:26 AM, Greg Jefferis <jeff...@gmail.com> wrote:

I am guessing that the problem is in:

fafbseg:::check_reticulate()

and inside that:

fafbseg:::check_python()

can you check if they trigger the crash directly?

Most likely your python installation is corrupt. Fixing this depends on knowing more about your python setup, which you can probably do with:

reticulate::py_discover_config()

but I think removing it by following the instructions when doing:

simple_python(pyinstall = "blast")

and then running 

simple_python("basic")

should get you going.

All the best,

Greg.

On 9 May 2023, at 18:49, Li Guo <li_...@ucsb.edu> wrote:

Dear Dr. Jefferis,

Sorry the last email I did not run properly on the debug step. After following your suggestions, here is the outcome

Li Guo

unread,
May 9, 2023, 5:17:48 PM5/9/23
to Gregory Jefferis, nat-user
Hello Dr. Jefferis,

I think I had the issue before with simple_python(‘basic’) that is why I did not use this before, and I have the issue again this time, could you guide me how to fix this?


Screenshot 2023-05-09 at 2.16.57 PM.png

Gregory Jefferis

unread,
May 9, 2023, 10:46:01 PM5/9/23
to Li Guo, nat-user
Hi you need python >= 3.7. Unfortunately the python 3.6 you have is too old. Recent versions of the reticulate package (>=v1.23) will install python 3.8 which is fine. I can’t quite tell if you had an old miniconda sitting there installed on disk. If so, blast it

# run this and follow instructions
simple_python(pyinstall = "blast")

and start again. If not, then check if your reticulate is recent enough, e.g.

if(packageVersion('reticulate')<'1.23')
  remotes::install_version("reticulate", version = '1.28')

If something goes wrong at this stage, there is a small possibility that your R is too old to support the latest version of reticulate (R 4.1.0 is actually 3+ years old now, although I see no reason why that should be a problem at least in theory).

Best,

Greg.

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages