arcgisbinding in RStudio, fatal error

4367
13
Jump to solution
05-17-2019 03:06 AM
zhitaozhu
New Contributor

Hello everyone! Everytime I use arcgisbinding(e.g. arc.write arc.open) in RStudio, I would encounter a reminder that "R session aborted. R enountered a fatal error. The seesion was terminated". Is there anyone knowing how to deal with this problem? Thank you!

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

You are most welcome!

You can reach the environment variables by following the steps in this video, up to 0:48. Then can you please look for R_HOME, R_TMP and R_TEMP in system environment variables and user environment variables?

If you are using ArcGIS Pro 2.3.2, then I would recommend clicking on Project Ribbon --> Options --> Geoprocessing (tab)

Can you share a screenshot of what you see under R-ArcGIS Support? For future reference note that this now our preferred way to install and update the bridge.

One question? If you running the bridge in a script after library(arcgisbinding) are  you calling arc.check_product()?

View solution in original post

0 Kudos
13 Replies
by Anonymous User
Not applicable

Hello Zhitao,

A couple of questions to understand what might be the issue:

1-) Were you able to setup the R-ArcGIS by following the steps here or Pro's R-ArcGIS Bridge tab for setup? If you are getting an error message during setup from Pro or the script tool can you please share the message?

2-) Which version of R are you using?

3-) Can you check which version of R R-Studio is binding to by clicking Tools --> Global Options? Can you confirm that this is the version of R you setup the bridge for?

4-) Lastly what do you see under R_HOME, R_TMP and R_TEMP environment variables? We have been having issues for users who uninstalled old versions of ArcGIS software and installed new ones corrupting the R_TMP.

Please let me know and I will be happy to help you through the process.

0 Kudos
zhitaozhu
New Contributor

Thank you for your reply very much!

I installed the R-ArcGIS by following the instruction for "ArcGIS Pro 1.1+" . Specifically, I download the installing package from the github website and install it by adding and running toolbox in ArcGIS Pro 2.3.2, and installed it successfully (receiving no warning or error message).

My R version is 3.6.0, RStudio version is 1.2.1335, and ArcGIS binding version is 1.0.1.232. I have check the version of R in RStudio (Tool-Global Options) and ArcGIS Pro (by running "R Installation Details"), and they are the same.

Could you please provide more instructions about how to check what under R_HOME, R_TMP and R_TEMP environment variables? I feel a little confused about this operation. I have uninstalled ArcGIS Desktop of lower version and then installed ArcGIS Desktop 10.7 currently. For ArcGIS Pro, I just installed it once (never uninstalled it), and the current version is 2.3.2.

What is a little weird is that when I write "arc.write" in a function, and run the function in a parallel operation, no bug is reported. However, when I directly use the function, or directly run the line of code (eg: arc.write(XXX)), the fatal error appears every time.

0 Kudos
by Anonymous User
Not applicable

You are most welcome!

You can reach the environment variables by following the steps in this video, up to 0:48. Then can you please look for R_HOME, R_TMP and R_TEMP in system environment variables and user environment variables?

If you are using ArcGIS Pro 2.3.2, then I would recommend clicking on Project Ribbon --> Options --> Geoprocessing (tab)

Can you share a screenshot of what you see under R-ArcGIS Support? For future reference note that this now our preferred way to install and update the bridge.

One question? If you running the bridge in a script after library(arcgisbinding) are  you calling arc.check_product()?

0 Kudos
zhitaozhu
New Contributor

I have checked the user and system environment variables, but unfortunately I cannot find those called "R_HOME", "R_TMP","R_TEMP".  I can find "TMP" and "TEMP" in both user and system environment variables.

The following is the screenshot of the R-ArcGIS Support:

In R, I always call arc.check_product() immediately after after library(arcgisbinding).

Thank you very much!

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Zhitao,

Are you still having the issue with the R session crashing? Could you see if it reproduces from a plain R session as well?

Thanks!

Shaun

0 Kudos
zhitaozhu
New Contributor

Hi, Shaun,

I have tried arc.write in both plain R and RStudio today, and it works now!

Thank you for your reply very much!

Zhitao

0 Kudos
EllieLinden
New Contributor II

What was your solution for this? I'm encountering the same problem where R crashes whenever I try to run the arc.write function. I've tried using both plain R and RStudio.

0 Kudos
zhitaozhu
New Contributor

Actually I did not completely solve this problem... I was a little confused as it sometimes worked but sometimes failed, when I directly ran arc.write. But when I put the codes related to arc.write into a function and then ran this function in Parallel, I could successfully and stably use the arc.write funtion. Maybe you can try it in Parallel. This is only my practice experience but I still cannot understand why...

0 Kudos
AlexBrasch
New Contributor III

Hi zhitao zhu‌,
Can you elaborate on putting arc.write into a function and how you're running "in Parallel"? I am also having this issue. Sometimes arc.write functions appropriately and other times it keeps aborting the R session. I am running in RStudio, the bridge it setup correctly, and all other arcgisbinding functions appear to be working correctly.

0 Kudos