RStudio GUI crash by use of manipulateWidget function

crash-report

#1

Hi,

after upgrading Rstudio to the newest version 1.1.453, I experience GUI crash when using the manipulateWidget function with the following code:

manipulateWidget(dygraph(Fdata.dg[as.POSIXct(range[1])<=index(Fdata.dg) & as.POSIXct(range[2]) >= index(Fdata.dg),c("01","02","03")],main="Test",group="TestGroup")
%>% dyAxis("y", label = "Y-Axis Test", valueRange = c(0,100)) %>% dyLegend(width=500) %>%
dyOptions(colors = mycol[which(colnames(Fdata.dg) %in% series)],titleHeight = 60) %>%
dyRoller(rollPeriod=1) %>% dyRangeSelector(),
range = mwDateRange(value=c(index(first(Fdata.dg)),index(last(Fdata.dg))+86400),label="Timerange"),
series = mwSelect(colnames(Fdata.dg),value="01",multiple = T),
.viewer = "window" )

save.image()

Fdata is a xts object containing three columns of numeric data in a time series.
When the save.image statement is active, then sourcing the script crashes the GUI every time.
Without the save.image(), the crash comes frequently after closing the shiny window.

The previous version of Rstudio did not show up any problems with this.

Thanks for help

Environment: Windows 7 SP1 32 bit, R 3.5.0, manipulateWidget 0.9.0


#2

Hi woec. Welcome to community. Sorry about your troubles. In terms of diagnosing your issues, could you provide some additional info from the RStudio IDE team's RStudio Crash Guide?


#3

Good Morning,

below I submit additional infos requested:

Output of sessionInfo() executed in standard R-console:

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.2.1       xlsx_0.5.7          xlsxjars_0.6.1      rJava_0.9-10        latticeExtra_0.6-28 RColorBrewer_1.1-2 
[7] lattice_0.20-35    

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17     grid_3.5.0       plyr_1.8.4       gtable_0.2.0     scales_0.5.0     pillar_1.2.3     rlang_0.2.1     
 [8] lazyeval_0.2.1   munsell_0.4.3    compiler_3.5.0   colorspace_1.3-2 tibble_1.4.2

Below, the testcode, which crashes the RStudio GUI

library(xts)
library(dygraphs)
library(manipulateWidget)


mycol<-c("magenta","red","blue","green","grey","brown","orange","purple","cyan","brown")

manipulateWidget(dygraph(Fdata.dg[as.POSIXct(range[1])<=index(Fdata.dg) & as.POSIXct(range[2]) >= index(Fdata.dg),c("01","02","03")],main="Test",group="TestGroup") 
                 %>% dyAxis("y", label = "Y-Axis Test", valueRange = c(0,100)) %>% dyLegend(width=500) %>%
                   dyOptions(colors = mycol[which(colnames(Fdata.dg) %in% series)],titleHeight = 60) %>% 
                   dyRoller(rollPeriod=1)  %>% dyRangeSelector(),
                 range = mwDateRange(value=c(index(first(Fdata.dg)),index(last(Fdata.dg))+86400),label="Timerange"),
                 series = mwSelect(colnames(Fdata.dg),value="01",multiple = T),
                 .viewer = "window" )

save.image()

Below the RStudio GUI crash message:
image

No crashdump is written

Remark: The crash does not appear if the code is executed within a native R-console.

Thank you for help
woec


#4

The problem described is still present in the last version of RStudio (1.1.456).
Is there any idea how to get it away?
Thanks.
woec


#5

I'm not able to replicate the error/crash because Fdata.dg isn't provided. Is there anyway you can similate data to make a minimal reprex? (FAQ: What's a reproducible example (`reprex`) and how do I do one?)


#6

Good Morning,

below, I supply again the script causing the crash, with Fdata Dataset included:

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Austria.1252  LC_CTYPE=German_Austria.1252   
[3] LC_MONETARY=German_Austria.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Austria.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.2.1       xlsx_0.5.7          xlsxjars_0.6.1      rJava_0.9-10       
[5] latticeExtra_0.6-28 RColorBrewer_1.1-2  lattice_0.20-35    

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17     grid_3.5.0       plyr_1.8.4       gtable_0.2.0     scales_0.5.0    
 [6] pillar_1.2.3     rlang_0.2.1      lazyeval_0.2.1   tools_3.5.0      munsell_0.4.3   
[11] yaml_2.1.19      compiler_3.5.0   colorspace_1.3-2 tibble_1.4.2

Because I am not allowed to upload attachment data, I supply the Fdata.tst dataframe here:

             Timestamp       01       02       03
1  2017-10-25 11:04:00 79.55042 78.21286 76.67976
2  2017-10-25 11:34:00 77.41050 76.58322 79.23907
3  2017-10-25 12:04:00 81.18282 79.55527 77.26058
4  2017-10-25 12:34:00 81.35120 80.10400 78.10967
5  2017-10-25 13:04:00 78.65614 78.15043 76.52348
6  2017-10-25 13:34:00 76.20578 75.59241 74.16936
7  2017-10-25 14:04:00 78.34335 76.70768 76.20107
8  2017-10-25 14:34:00 75.90913 75.07214 73.55536
9  2017-10-25 15:04:00 74.05904 74.66309 73.75871
10 2017-10-25 15:34:00 71.70573 72.19779 70.29303

The script:

library(xts)
library(dygraphs)
library(manipulateWidget)

mycol<-c("magenta","red","blue","green","grey","brown","orange","purple","cyan","brown")

Fdata.tst.dg<-xts(Fdata.tst[,-1],Fdata.tst$Timestamp)

manipulateWidget(dygraph(Fdata.tst.dg[as.POSIXct(range[1])<=index(Fdata.tst.dg) & as.POSIXct(range[2]) >= index(Fdata.tst.dg),c("01","02","03")],main="Test",group="TestGroup") 
                 %>% dyAxis("y", label = "Y-Axis Test", valueRange = c(0,100)) %>% dyLegend(width=500) %>%
                   dyOptions(colors = mycol[which(colnames(Fdata.tst.dg) %in% series)],titleHeight = 60) %>% 
                   dyRoller(rollPeriod=1)  %>% dyRangeSelector(),
                 range = mwDateRange(value=c(index(first(Fdata.tst.dg)),index(last(Fdata.tst.dg))+86400),label="Timerange"),
                 series = mwSelect(colnames(Fdata.tst.dg),value="01",multiple = T),
                 .viewer = "window" )

save.image()

sourcing this script, RStudio crashes reproducible each time at the line "save.image"

Thank you
woec