Code Monkey home page Code Monkey logo

Comments (7)

simonbyrne avatar simonbyrne commented on July 18, 2024

Hmm, if I insert a rprint("gc()") call in the middle, that seems to fix things. Does this mean it's a memory leak somewhere?

from rcall.jl.

panlanfeng avatar panlanfeng commented on July 18, 2024

The code runs well on my OS X 10.10.3 with Julia 0.3.7, RCall 0.1.2.

from rcall.jl.

randy3k avatar randy3k commented on July 18, 2024

I get the message at random. Not sure how to reproduce it. Your code runs well some time but not another.

Error in plot.new() : the base graphics system is not registered

from rcall.jl.

randy3k avatar randy3k commented on July 18, 2024

It is related to the variable baseRegisterIndex in C

unsafe_load(cglobal((:baseRegisterIndex,RCall.libR),Int32))

The normal value of baseRegisterIndex should be >=0. However, due to unknown reason, the value was changed to -1, which lead to the error.

A way to change it to -1 that I know of is

ccall((:Rf_KillAllDevices,RCall.libR), Int32, ())

from rcall.jl.

simonbyrne avatar simonbyrne commented on July 18, 2024

I think the problem may have been that the finalizer was being called prematurely. Hopefully this works correctly now. Please reopen if there are further problems.

from rcall.jl.

randy3k avatar randy3k commented on July 18, 2024

Good catch. It should be the reason. As Rf_endEmbeddedR calls Rf_KillAllDevices which sets baseRegisterIndex to -1.

from rcall.jl.

simonbyrne avatar simonbyrne commented on July 18, 2024

Yeah, I guess the crazy nature of the bug should have been a clue it was gc related.

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.