r-rust / gifski

R wrapper for the 'gifski' Rust Cargo crate.
Other
73 stars 4 forks source link

segfaults with paths with ~ #5

Closed jefferis closed 6 years ago

jefferis commented 6 years ago

Great package @jeroen – have already used it several times. I get a segfault with:

png_path <- file.path(tempdir(), "frame%03d.png")
png(png_path)
par(ask = FALSE)
for(i in 1:10)
  plot(rnorm(i * 10), main = i)
dev.off()
png_files <- sprintf(png_path, 1:10)
gifski(png_files, gif_file="~/Desktop/gifski-segfault.gif")

adding something like:

gif_file <- normalizePath(gif_file, mustWork = F)

here could protect against this.

jeroen commented 6 years ago

Hmm interesting. That would solve the immediate problem, but it should never crash in the first place...