跟踪SEGR故障的根本原因
我正在使用Shiny和ggplot2编写一个非常复杂的仪表板,它是用R编写的 在编写的那一刻,一切正常,但经过一段时间(数据每天更新)后,它开始在呈现特定页面时出错 我可以通过打开带有12个ggplot图的特定选项卡来重现这个问题 发生故障时的控制台输出如下所示:跟踪SEGR故障的根本原因,r,ggplot2,shiny,R,Ggplot2,Shiny,我正在使用Shiny和ggplot2编写一个非常复杂的仪表板,它是用R编写的 在编写的那一刻,一切正常,但经过一段时间(数据每天更新)后,它开始在呈现特定页面时出错 我可以通过打开带有12个ggplot图的特定选项卡来重现这个问题 发生故障时的控制台输出如下所示: dashboard_1 | address 0x194b1, cause 'memory not mapped' dashboard_1 | dashboard_1 | Traceback: dashboard_1 | 1: ma
dashboard_1 | address 0x194b1, cause 'memory not mapped'
dashboard_1 |
dashboard_1 | Traceback:
dashboard_1 | 1: mapply(FUN = f, ..., SIMPLIFY = FALSE)
dashboard_1 | 2: Map(build_grob, plot$layer, data)
dashboard_1 | 3: ggplot_gtable(data)
dashboard_1 | 4: print.ggplot(result$value)
dashboard_1 | 5: print(result$value)
dashboard_1 | 6: eval(expr, envir, enclos)
dashboard_1 | 7: eval(expr, pf)
dashboard_1 | 8: withVisible(eval(expr, pf))
dashboard_1 | 9: evalVis(expr)
dashboard_1 | 10: capture.output(print(result$value))
...
dashboard_1 | 65: tryCatchOne(expr, names, parentenv, handlers[[1L]])
dashboard_1 | 66: tryCatchList(expr, classes, parentenv, handlers)
dashboard_1 | 67: tryCatch(evalq((function (handle, binary, message) { for (handler in .wsconns[[as.character(handle)]]$.messageCallbacks) { result <- try(handler(binary, message)) if (inherits(result, "try-error")) { .wsconns[[as.character(handle)]]$close() return() } }})("62978544", FALSE, "{\"method\":\"update\",\"data\":{\"daterange:shiny.date\":[\"2014-04-26\",\"2015-04-26\"],\"group_by\":\"weeks\"}}"), <environment>), error = .rcpp_error_recorder)
dashboard_1 | 68: withCallingHandlers(tryCatch(evalq((function (handle, binary, message) { for (handler in .wsconns[[as.character(handle)]]$.messageCallbacks) { result <- try(handler(binary, message)) if (inherits(result, "try-error")) { .wsconns[[as.character(handle)]]$close() return() } }})("62978544", FALSE, "{\"method\":\"update\",\"data\":{\"daterange:shiny.date\":[\"2014-04-26\",\"2015-04-26\"],\"group_by\":\"weeks\"}}"), <environment>), error = .rcpp_error_recorder), warning = .rcpp_warning_recorder)
dashboard_1 | aborting ...
dashboard_1 | Segmentation fault
rmreports_dashboard_1 exited with code 139
dashboard_1|地址0x194b1,导致“内存未映射”
仪表盘|1|
仪表板|1|回溯:
仪表板1:mapply(FUN=f,…,SIMPLIFY=FALSE)
仪表板1 | 2:地图(构建、绘图、图层、数据)
仪表板1 | 3:ggplot表格(数据)
仪表板1 | 4:print.ggplot(结果$value)
仪表板1 | 5:打印(结果$value)
仪表板1 | 6:评估(expr、envir、ENVAL)
仪表板1 | 7:评估(expr,pf)
仪表板| 1 | 8:带可见(eval(expr,pf))
仪表板1 | 9:评估(expr)
仪表板1 | 10:捕获输出(打印(结果$value))
...
仪表板| 1 | 65:tryCatchOne(expr、name、parentenv、handlers[[1L]]
仪表板| 1 | 66:tryCatchList(expr、class、parentenv、handlers)
dashboard_1 | 67:tryCatch(evalq((函数(句柄,二进制,消息){for(handler in.wsconns[[as.character(句柄)]]]$.messageCallbacks){result我正在搜索您的问题,并能够找到此线程。
这表示尝试用“devtools”更新“dplyr”。
“devtools::install_github(“hadley/dplyr”,build_vignettes=FALSE)”你能在shiny之外复制这个吗?这可能指向一个ggplot错误。无论如何,在C代码级别调试东西是非常依赖操作系统的,你不提你的操作系统(或R版本…)不幸的是,我无法在RStudio中一个接一个地复制执行ggplot的bug,看起来这个bug是shiny和ggplot的合作。我能够在MacOS X(dev)和Ubuntu14.10(prod)上复制这个问题。谢谢,我将尝试使用这种方法来处理ggplot2,看看它是否有效