Giter Club home page Giter Club logo

Comments (13)

dpavlushko avatar dpavlushko commented on May 20, 2024

Looks like problem with installation/upgrade of arcgisbinding.
Lets troubleshoot it first. start Rgui.exe and evaluate following commands (first example in ?arc.write doc):

library(arcgisbinging);library(arcgisbinging)
## Example #1. write a shapefile
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
d[1,] <- 0.6
arc.write(tempfile("ca_new", fileext=".shp"), d)

If you have problem to execute it then close all sessions of R, including Rgui, ArcGIS, RStudio, VSCode etc. Delete existing arcgisbinding package (check C:\Users\rata\Documents\R\R-3.6.0\library\arcgisbinding) Download arcgisbinding_1.0.1.232.zip. Start fresh instance of Rgui.exe and from menu>Packages>"Install packages from local file..." navigate to Download folder and pick arcgisbinding_1.0.1.232.zip file. Re-do Example #1.

from r-bridge.

ratnanil avatar ratnanil commented on May 20, 2024

library(arcgisbinging)

was that a typo? why call the library twice? Was omitting arc.check_product() intentional?

I ran the following lines in Rgui.exe (64-bit) and it didn't crash:

library(arcgisbinding)
arc.check_product()
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
d[1,] <- 0.6
arc.write(tempfile("ca_new", fileext=".shp"), d)

from r-bridge.

dpavlushko avatar dpavlushko commented on May 20, 2024

Short solution - change output location from "C:/Users/scratch.gdb/nc" to other where you have permission to write a new file. Like "C:/Users/rata/scratch.gdb/nc" or file.path(tempdir(), scratch.gdb/nc

I'll try to fix hard crash by the next release.

from r-bridge.

ratnanil avatar ratnanil commented on May 20, 2024

change output location from "C:/Users/scratch.gdb/nc" to other where you have permission to write a new file.

Tried this within RStudio IDE, still results in a hard crash

from r-bridge.

scdub avatar scdub commented on May 20, 2024

Thanks for trying that out, sorry to hear it didn't work. It possibly could be a DLL conflict between the R environment and ArcGIS, though we haven't been able to reproduce it yet on our end. Could you see if you can reproduce this crash in just an Rgui.exe session? Could you also try @dpavlushko's sample code, adding in a library(sf) call and see if that crashes? sf should be statically linked to its own copy of GDAL/GEOS/PROJ, but wanted to see if any of the above has an effect.

from r-bridge.

ratnanil avatar ratnanil commented on May 20, 2024

This is really confusing. I just ran the following lines in Rgui and RStudio, and neither crashed!

library(arcgisbinding)
arc.check_product()
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
d[1,] <- 0.6
arc.write("C:/Users/rata/Downloads/test.gdb/data",d)

from r-bridge.

atle1 avatar atle1 commented on May 20, 2024

Im having a maybe related problem, but it seems to have been fixed by installing arcgisbinding_1.0.1.232.zip as you suggested. Prior I was using the most recent version.

At first I thought the problem was specific to rstudio as I was getting an error related to libobjects_pro.dll when trying to load arcgisbinding from rstudio. I could could load from the R Console without error, both 64 and 32 bit, most of the time. I say most of the time as there were 1 instance where I got the same error in the Console. So I agree this is confusing!

However, I got an persistent error when using either arc.write or arc.open in the Console. I'm sorry I don't recollect what the error was. Finally, ArcGIS Pro was crashing within seconds when trying to run an R script. This is my first R script i ArcGIS so difficult to assess if it was something with my R code or ArcGIS, but given all of the above I'm guessing it's arcgisbinding that's the problem.

Hopefully this is helpful, please let me know if you need more info.

from r-bridge.

a-brasch avatar a-brasch commented on May 20, 2024

This issue is certainly confusing. Sometimes arc.write works as expected for me, and other times it crashes RStudio (abort session).
I am running version 1.0.1.237. Anyone have further guidance since the last post?
Thank you

from r-bridge.

ChristopherTracey avatar ChristopherTracey commented on May 20, 2024

I'm having a very similar issue running 1.0.1.241 with frequent RStudio crashes.

from r-bridge.

ggold602 avatar ggold602 commented on May 20, 2024

I am having a similar issue. Downloaded arcgisbinding a few days ago but started working with it today. Now getting fatal errors when I run Rstudio code with arcgisbinding in it. Sometimes even before loading the package. Uninstall/reinstall of R and Rstudio did not fix issue. Could it be related to the environment I set up in ArcGIS pro?

(I am a beginner)

from r-bridge.

zeb-yoko avatar zeb-yoko commented on May 20, 2024

EDIT: resolved my fatal error. Newest version of arcgisbinding allows ability to import from ArcPro and manipulate data other ways in R, just not arc.write to a .gdb

from r-bridge.

scdub avatar scdub commented on May 20, 2024

For anyone affected by this, can you see if you're able to reproduce in just the plain RGUI interface? And if you do get a crash in RStudio, there should be a crash dump located at %LOCALAPPDATA%\R\crashpad_database\reports which is generated, which hopefully we can access. RStudio will get these crashes so we don't see them on our end, and we're not able to reproduce this locally on a few different machines.

from r-bridge.

zeb-yoko avatar zeb-yoko commented on May 20, 2024

So, I'm going to follow up my edited follow-up. I can get it to run arc.write without fatal error, but only in administrator mode, and after running the test code mentioned and provided by @ratnanil :

`library(arcgisbinding)
arc.check_product()
fc <- arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding"))
d <- arc.select(fc, 'ozone')
class(d)
d[1,] <- 0.6
arc.write(tempfile("ca_new", fileext=".shp")'

After running that, arc.write works for my personal code if in the same session. Without running that first in a session, I get fatal error when trying to run arc.write line

from r-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.