pierucci / heemod

:chart_with_upwards_trend:Markov Models for Health Economic Evaluations
https://pierucci.org/heemod/
Other
41 stars 25 forks source link

Tests segfault on my laptop #117

Closed pierucci closed 8 years ago

pierucci commented 8 years ago

My laptop is a 64bit Linux (Lubuntu). No problem on my MS Windows 32bit computer at work.

Test tabular input: ............................
 *** caught segfault ***
address 0xc80a0010, cause 'memory not mapped'

Traceback:
 1: get0(oNam, envir = ns)
 2: getExportedValue(pkg, name)
 3: lazyeval::all_dots
 4: mutate_.tbl_df(parameters, .dots = x)
 5: dplyr::mutate_(parameters, .dots = x)
 6: FUN(X[[i]], ...)
 7: lapply(x, f)
 8: eval_state_list(get_states(model), parameters)
 9: eval_model(model = model, parameters = parameters, cycles = cycles,     init = init, method = method)
10: eval_newdata(., model = uneval_model, old_parameters = old_parameters)
11: eval(expr, envir, enclos)
12: eval(args[[j]]$expr, envir = env)
13: do_.rowwise_df(., .mod = ~eval_newdata(., model = uneval_model,     old_parameters = old_parameters))
14: dplyr::do_(., .mod = ~eval_newdata(., model = uneval_model, old_parameters = old_parameters))
15: function_list[[i]](value)
16: freduce(value, `_function_list`)
17: `_fseq`(`_lhs`)
18: eval(expr, envir, enclos)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: newdata %>% dplyr::rowwise() %>% dplyr::do_(.mod = ~eval_newdata(.,     model = uneval_model, old_parameters = old_parameters)) %>%     dplyr::bind_cols(newdata)
22: eval_model_newdata(x = model, model = n, newdata = newdata)
23: eval(expr, envir, enclos)
24: eval(lhs, parent, parent)
25: eval_model_newdata(x = model, model = n, newdata = newdata) %>%     dplyr::rowwise() %>% dplyr::do_(~get_total_state_values(.$.mod)) %>%     dplyr::bind_cols(newdata) %>% dplyr::ungroup()
26: run_probabilistic(model_runs, resample = inputs$param_info$psa_params,     N = inputs$model_options$n)
27: eval_models_from_tabular(inputs, run_psa = run_psa, run_demo = run_demo)
28: run_models_tabular(location = system.file("tabular/thr", package = "heemod"))
29: eval(expr, envir, enclos)
30: eval(code, test_env)
31: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
32: doTryCatch(return(expr), name, parentenv, handler)
33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
34: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
35: doTryCatch(return(expr), name, parentenv, handler)
36: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
37: tryCatchList(expr, classes, parentenv, handlers)
38: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
39: test_code(desc, code, env = parent.frame())
40: test_that("Running model from files works.", {    result <- run_models_tabular(location = system.file("tabular/thr",         package = "heemod"))    expect_identical(names(result), c("models", "model_runs",         "dsa", "psa", "demographics"))    expect_output(print(result$model_runs), "new -223.5199 0.04497522 -4969.845",         fixed = TRUE)    expect_output(print(result$dsa), "A sensitivity analysis on 6 parameters.",         fixed = TRUE)    expect_output(print(result$demographics), "An analysis re-run on 62 parameter sets.",         fixed = TRUE)})
41: eval(expr, envir, enclos)
42: eval(exprs, env)
43: source_file(path, new.env(parent = env), chdir = TRUE)
44: force(code)
45: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
46: FUN(X[[i]], ...)
47: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
48: force(code)
49: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
50: test_files(paths, reporter = reporter, env = env, ...)
51: testthat::test_dir(test_path, filter = filter, env = env, ...)
52: force(code)
53: withr::with_envvar(r_env_vars(), testthat::test_dir(test_path,     filter = filter, env = env, ...))
54: devtools::test()
An irrecoverable exception occurred. R is aborting now ...
pierucci commented 8 years ago

The bug is intermittent. I did not find a way to reproduce it reliably. The problem probably comes from my laptop. Closing the issue for now.