GithubHelp home page GithubHelp logo

malloc/memory error about archive HOT 3 CLOSED

r-lib avatar r-lib commented on June 12, 2024
malloc/memory error

from archive.

Comments (3)

jimhester avatar jimhester commented on June 12, 2024 1

I can reproduce this, I know what the issue is, I misinterpreted the API for archive_read_data_block(); am working on a fix.

from archive.

coolbutuseless avatar coolbutuseless commented on June 12, 2024

After adding an explicit close(con) (as suggested in order to fix #18) it's clearer now that the error probably occurs in the process of closing the connection.

I.e. the first 6 lines of code in the following example run fine. The seventh line which closes the connection throws the memory error.

con <- archive::archive_write(archive = "archive.tar", file="first")
saveRDS(mtcars, con)
close(con)
con <- archive::archive_read(archive = "archive.tar", file='first')
zz <- readRDS(con)
isOpen(con)  # FALSE. con automatically opened/closed by 'readRDS'
close(con)
R(68759,0x7fffac92c380) malloc: *** error for object 0x109a85200: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

from archive.

jimhester avatar jimhester commented on June 12, 2024

Thank you for the minimal example, it made fixing this easier, should now be working as expected.

from archive.

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.