Coder Social home page Coder Social logo

Comments (7)

randy3k avatar randy3k commented on June 2, 2024

I guess it was caused by insufficient memory in R, it works fine if we run gc() regularly.

using RCall
for( i in 1:1000 ) 
    println(i)
    rcall(:gc)
    rcopy(string("c(", join( [rand() * j for j in  1:1000], "," ), ")"))
end

Please note that you created a long string and it is passed to R to be parsed and evaluated. R needs to keep it temporarily. If a lot of such variables are created at the same time, it causes R to crash.

I also wonder why gc() is not fired automatically if there is not sufficient memory.

from rcall.jl.

simonbyrne avatar simonbyrne commented on June 2, 2024

Hmm, that is odd.

from rcall.jl.

mdcfrancis avatar mdcfrancis commented on June 2, 2024

This is the simplest reproduction, in the real case we have a collection of fairly large R object which we are calling from Julia with a map. Every so often it crashes, it does look like it may be a gc issue.

from rcall.jl.

randy3k avatar randy3k commented on June 2, 2024

It seems that dc7975e fixes this.

gc actually has been fired, but it is fired in a wrong time. It wrongly collects the string going to be parsed in rparse_p. To fix it, st is protected now.

from rcall.jl.

randy3k avatar randy3k commented on June 2, 2024

@mdcfrancis
could you confirm that it is fixed?

from rcall.jl.

simonbyrne avatar simonbyrne commented on June 2, 2024

Please reopen if this is still an issue.

from rcall.jl.

mdcfrancis avatar mdcfrancis commented on June 2, 2024

Sorry for not replying - yes I see that this fixed this case.

from rcall.jl.

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.