Package check result: ERROR Check: examples, Result: ERROR Running examples in ‘redatam-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: read_redatam > ### Title: Read REDATAM dictionary > ### Aliases: read_redatam > > ### ** Examples > > # Read a dictionary file (Galapagos 2015) > zip <- system.file("extdata", "galapagos.zip", package = "redatam") > dout <- paste(tempdir(), "galapagos", sep = "/") > unzip(zip, exdir = dout) > read_redatam(paste(dout, "cg15.dic", sep = "/")) Opening dictionary file... redatamlib/readers/FuzzyVariableParser.cpp:33:38: runtime error: division by zero #0 0x7f5aeee95f1d in RedatamLib::FuzzyVariableParser::ParseAllVariables(std::vector >&) redatamlib/readers/FuzzyVariableParser.cpp:33 #1 0x7f5aeee94c73 in RedatamLib::FuzzyEntityParser::ParseEntities() redatamlib/readers/FuzzyEntityParser.cpp:35 #2 0x7f5aef111440 in RedatamLib::RedatamDatabase::OpenDictionary(std::__cxx11::basic_string, std::allocator > const&) redatamlib/entities/RedatamDatabase.cpp:31 #3 0x7f5aef11301b in RedatamLib::RedatamDatabase::RedatamDatabase(std::__cxx11::basic_string, std::allocator > const&) redatamlib/entities/RedatamDatabase.cpp:18 #4 0x7f5aef145bc0 in export_redatam_to_list_(std::__cxx11::basic_string, std::allocator >) /home/hornik/tmp/CRAN_special_gcc-san/redatam.Rcheck/00_pkg_src/redatam/src/main.cpp:13 #5 0x7f5aef146d9e in _redatam_export_redatam_to_list_ /home/hornik/tmp/CRAN_special_gcc-san/redatam.Rcheck/00_pkg_src/redatam/src/cpp11.cpp:12 #6 0x7f5b0ed941d6 in R_doDotCall /home/hornik/src/R/src/main/dotcode.c:754 #7 0x7f5b0ef1cb08 in bcEval_loop /home/hornik/src/R/src/main/eval.c:8672 #8 0x7f5b0ef57193 in bcEval /home/hornik/src/R/src/main/eval.c:7505 #9 0x7f5b0ef5842a in Rf_eval /home/hornik/src/R/src/main/eval.c:1167 #10 0x7f5b0ef63e72 in R_execClosure /home/hornik/src/R/src/main/eval.c:2393 #11 0x7f5b0ef684ca in applyClosure_core /home/hornik/src/R/src/main/eval.c:2306 #12 0x7f5b0ef58cc1 in Rf_applyClosure /home/hornik/src/R/src/main/eval.c:2328 #13 0x7f5b0ef58cc1 in Rf_eval /home/hornik/src/R/src/main/eval.c:1280 #14 0x7f5b0f0630a2 in Rf_ReplIteration /home/hornik/src/R/src/main/main.c:265 #15 0x7f5b0f063d07 in R_ReplConsole /home/hornik/src/R/src/main/main.c:317 #16 0x7f5b0f063e57 in run_Rmainloop /home/hornik/src/R/src/main/main.c:1219 #17 0x559276c890c9 in main /home/hornik/src/R/src/main/Rmain.c:29 #18 0x7f5b0dc3edb9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #19 0x7f5b0dc3ee74 in __libc_start_main_impl ../csu/libc-start.c:360 #20 0x559276c89110 in _start (/home/hornik/tmp/R-d-gcc-xtra/bin/exec/R+0x1110) (BuildId: ee8fe1c64ed467ade88aaa114fdfb0b8c072a6de) *** caught illegal operation *** address 0x7f5aeee95f1e, cause 'illegal operand' Traceback: 1: export_redatam_to_list_(dictionary) 2: read_redatam(paste(dout, "cg15.dic", sep = "/")) An irrecoverable exception occurred. R is aborting now ... Illegal instruction Check: tests, Result: ERROR Running ‘testthat.R’ [3s/3s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(redatam) > > test_check("redatam") Opening dictionary file... redatamlib/readers/FuzzyVariableParser.cpp:33:38: runtime error: division by zero #0 0x7f6f13c95f1d in RedatamLib::FuzzyVariableParser::ParseAllVariables(std::vector >&) redatamlib/readers/FuzzyVariableParser.cpp:33 #1 0x7f6f13c94c73 in RedatamLib::FuzzyEntityParser::ParseEntities() redatamlib/readers/FuzzyEntityParser.cpp:35 #2 0x7f6f13f11440 in RedatamLib::RedatamDatabase::OpenDictionary(std::__cxx11::basic_string, std::allocator > const&) redatamlib/entities/RedatamDatabase.cpp:31 #3 0x7f6f13f1301b in RedatamLib::RedatamDatabase::RedatamDatabase(std::__cxx11::basic_string, std::allocator > const&) redatamlib/entities/RedatamDatabase.cpp:18 #4 0x7f6f13f45bc0 in export_redatam_to_list_(std::__cxx11::basic_string, std::allocator >) /home/hornik/tmp/CRAN_special_gcc-san/redatam.Rcheck/00_pkg_src/redatam/src/main.cpp:13 #5 0x7f6f13f46d9e in _redatam_export_redatam_to_list_ /home/hornik/tmp/CRAN_special_gcc-san/redatam.Rcheck/00_pkg_src/redatam/src/cpp11.cpp:12 #6 0x7f6f345941d6 in R_doDotCall /home/hornik/src/R/src/main/dotcode.c:754 #7 0x7f6f3471cb08 in bcEval_loop /home/hornik/src/R/src/main/eval.c:8672 #8 0x7f6f34757193 in bcEval /home/hornik/src/R/src/main/eval.c:7505 #9 0x7f6f3475842a in Rf_eval /home/hornik/src/R/src/main/eval.c:1167 #10 0x7f6f34763e72 in R_execClosure /home/hornik/src/R/src/main/eval.c:2393 #11 0x7f6f347684ca in applyClosure_core /home/hornik/src/R/src/main/eval.c:2306 #12 0x7f6f34758cc1 in Rf_applyClosure /home/hornik/src/R/src/main/eval.c:2328 #13 0x7f6f34758cc1 in Rf_eval /home/hornik/src/R/src/main/eval.c:1280 #14 0x7f6f34777756 in do_set /home/hornik/src/R/src/main/eval.c:3571 #15 0x7f6f34759294 in Rf_eval /home/hornik/src/R/src/main/eval.c:1232 #16 0x7f6f3476d463 in do_begin /home/hornik/src/R/src/main/eval.c:3000 #17 0x7f6f34759294 in Rf_eval /home/hornik/src/R/src/main/eval.c:1232 #18 0x7f6f3477ea51 in do_eval /home/hornik/src/R/src/main/eval.c:3945 #19 0x7f6f3470a758 in bcEval_loop /home/hornik/src/R/src/main/eval.c:8122 #20 0x7f6f34757193 in bcEval /home/hornik/src/R/src/main/eval.c:7505 #21 0x7f6f3475842a in Rf_eval /home/hornik/src/R/src/main/eval.c:1167 #22 0x7f6f34763e72 in R_execClosure /home/hornik/src/R/src/main/eval.c:2393 #23 0x7f6f347684ca in applyClosure_core /home/hornik/src/R/src/main/eval.c:2306 #24 0x7f6f34758cc1 in Rf_applyClosure /home/hornik/src/R/src/main/eval.c:2328 #25 0x7f6f34758cc1 in Rf_eval /home/hornik/src/R/src/main/eval.c:1280 #26 0x7f6f3477fb33 in do_eval /home/hornik/src/R/src/main/eval.c:3963 #27 0x7f6f3470a758 in bcEval_loop /home/hornik/src/R/src/main/eval.c:8122 #28 0x7f6f34757193 in bcEval /home/hornik/src/R/src/main/eval.c:7505 #29 0x7f6f3475842a in Rf_eval /home/hornik/src/R/src/main/eval.c:1167 #30 0x7f6f34763e72 in R_execClosure /home/hornik/src/R/src/main/eval.c:2393 #31 0x7f6f347684ca in applyClosure_core /home/hornik/src/R/src/main/eval.c:2306 #32 0x7f6f347795e6 in Rf_applyClosure /home/hornik/src/R/src/main/eval.c:2328 #33 0x7f6f347795e6 in R_forceAndCall /home/hornik/src/R/src/main/eval.c:2460 #34 0x7f6f3432bd92 in do_lapply /home/hornik/src/R/src/main/apply.c:75 #35 0x7f6f348d664a in do_internal /home/hornik/src/R/src/main/names.c:1410 #36 0x7f6f34709f91 in bcEval_loop /home/hornik/src/R/src/main/eval.c:8142 #37 0x7f6f34757193 in bcEval /home/hornik/src/R/src/main/eval.c:7505 #38 0x7f6f3475842a in Rf_eval /home/hornik/src/R/src/main/eval.c:1167 #39 0x7f6f34763e72 in R_execClosure /home/hornik/src/R/src/main/eval.c:2393 #40 0x7f6f347684ca in applyClosure_core /home/hornik/src/R/src/main/eval.c:2306 #41 0x7f6f34758cc1 in Rf_applyClosure /home/hornik/src/R/src/main/eval.c:2328 #42 0x7f6f34758cc1 in Rf_eval /home/hornik/src/R/src/main/eval.c:1280 #43 0x7f6f348630a2 in Rf_ReplIteration /home/hornik/src/R/src/main/main.c:265 #44 0x7f6f34863d07 in R_ReplConsole /home/hornik/src/R/src/main/main.c:317 #45 0x7f6f34863e57 in run_Rmainloop /home/hornik/src/R/src/main/main.c:1219 #46 0x5610a85a60c9 in main /home/hornik/src/R/src/main/Rmain.c:29 #47 0x7f6f3343edb9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #48 0x7f6f3343ee74 in __libc_start_main_impl ../csu/libc-start.c:360 #49 0x5610a85a6110 in _start (/home/hornik/tmp/R-d-gcc-xtra/bin/exec/R+0x1110) (BuildId: ee8fe1c64ed467ade88aaa114fdfb0b8c072a6de) *** caught illegal operation *** address 0x7f6f13c95f1e, cause 'illegal operand' Traceback: 1: export_redatam_to_list_(dictionary) 2: read_redatam(dic) 3: eval(code, test_env) 4: eval(code, test_env) 5: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) 6: doTryCatch(return(expr), name, parentenv, handler) 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 9: doTryCatch(return(expr), name, parentenv, handler) 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) 11: tryCatchList(expr, classes, parentenv, handlers) 12: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) 13: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter()) 14: test_that("reading works", { zip <- system.file("extdata", "galapagos.zip", package = "redatam") dout <- paste(tempdir(), "galapagos", sep = "/") if (file.exists(dout)) { unlink(dout, recursive = T) } if (!file.exists(dout)) { unzip(zip, exdir = dout) } dic <- list.files(dout, pattern = "\\.dic$", full.names = TRUE, recursive = TRUE) dicx <- list.files(dout, pattern = "\\.dicX$", full.names = TRUE, recursive = TRUE) res <- read_redatam(dic) expect_type(res, "list") expect_equal(length(res), 7L) d <- res$canton expect_true(is.data.frame(d)) expect_true(is.factor(d$nomcant)) expect_equal(dim(d), c(3L, 4L)) daux <- res$canton_labels_nomcant expect_true(is.factor(daux$nomcant)) expect_true(is.factor(daux$nomcant_description)) expect_equal(dim(daux), c(1L, 2L)) res2 <- read_redatam(dicx) expect_type(res2, "list") expect_equal(length(res2), 7L) d2 <- res2$canton expect_true(is.data.frame(d2)) expect_true(is.factor(d2$nomcant)) expect_equal(dim(d2), c(3L, 4L)) daux2 <- res2$canton_labels_nomcant expect_true(is.factor(daux2$nomcant)) expect_true(is.factor(daux2$nomcant_description)) expect_equal(dim(daux2), c(3L, 2L))}) 15: eval(code, test_env) 16: eval(code, test_env) 17: withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error) 18: doTryCatch(return(expr), name, parentenv, handler) 19: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 21: doTryCatch(return(expr), name, parentenv, handler) 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]) 23: tryCatchList(expr, classes, parentenv, handlers) 24: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled && !is.null(test)) { skip_empty() }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error), error = handle_fatal, skip = function(e) { }) 25: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new()) 26: source_file(path, env = env(env), desc = desc, error_call = error_call) 27: FUN(X[[i]], ...) 28: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call) 29: doTryCatch(return(expr), name, parentenv, handler) 30: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 31: tryCatchList(expr, classes, parentenv, handlers) 32: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL}) 33: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)) 34: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, error_call = error_call) 35: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel) 36: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") 37: test_check("redatam") An irrecoverable exception occurred. R is aborting now ... Illegal instruction Post-processing issues found: File: redatam-Ex.Rout redatamlib/readers/FuzzyVariableParser.cpp:33:38: runtime error: division by zero File: tests/testthat.Rout.fail redatamlib/readers/FuzzyVariableParser.cpp:33:38: runtime error: division by zero File: 00check.log redatamlib/readers/FuzzyVariableParser.cpp:33:38: runtime error: division by zero redatamlib/readers/FuzzyVariableParser.cpp:33:38: runtime error: division by zero