opentims
opentims copied to clipboard
opentimsr: crash/segfault when downloading bruker.so twice
Hi, the following code will reproducibly crash your R session:
library(opentimsr)
so_folder <- tempdir()
so_file <- download_bruker_proprietary_code(so_folder, method = "wget")
setup_bruker_so(so_file)
so_file <- download_bruker_proprietary_code(so_folder, method = "wget")
setup_bruker_so(so_file)
My guess is that R doesn't like it if a used *.so gets overwritten.
=> Possibly this can be solved if download_bruker_proprietary_code()
refuses to overwrite the file.
More complex would probably be to check to not overwrite a loaded *.so file.
Yours, Steffen
Hi,
What would be the use-case and expected behaviour of such code? In other words, what are you trying to do here? Because I'm kind of tempted to respond with a "yeah, don't do that then" ;)
Though of course that should be a proper error message, not a segfault.
"Don't do that" is exactly the correct answer. It was an oversight, we learned that now :-) But with the check it would be more robust, so indeed very low on the priority list. Yours, Steffen