R session aborted when reading feather file from Julia

I’m trying to output a DataFrame as a Feather file from a Julia script and then import it into R. When I try to load it, though, R crashes (RGui closes out immediately, RStudio gives me an “R session aborted: R encountered a fatal error” popup). I can reproduce it using this MWE:

using DataFrames, Feather
df = DataFrame(a = ["foo", "bar", "baz"], b = randn(3))
Feather.write("test.feather", df)

In R:

library(feather)
read_feather("test.feather")

I can read and write feather files from R without problems, so it seems there is something getting lost in translation from the Julia side. Anybody have any ideas?

On Windows 10, using:
Julia v1.1.1, DataFrames v0.18.3, Feather v0.5.2
R v3.6.0, feather v0.3.3

A workaround using RCall:

using RCall
R"library(feather)"
R"write_feather($df, 'test.feather')"
1 Like

Another fix is to pin flatbuffers to version 0.4.0. See https://github.com/JuliaData/FlatBuffers.jl/issues/38
And the references there in.

2 Likes

Possibly relevant blog post. It looks like improvements to the R implementation of Feather are now available from the arrow package. It would probably be worth trying arrow::read_feather to see if this is still an issue.