Closed smortaz closed 8 years ago
It should be possible to write a test on this. Run host, eval these one by one, then hit history back. This is going to be nice stress and general functionality test.
Microsoft.R.Host.exe!rhost::util::errors_to_exceptions<void
(void) >(rhost::grdevices::ide::plot::render_from_snapshot::l2::void (void) protected_eval) Line 192 C++ Microsoft.R.Host.exe!rhost::grdevices::ide::plot::render_from_snapshot() Line 257 C++ Microsoft.R.Host.exe!rhost::grdevices::ide::plot_history::render_from_snapshot() Line 377 C++ Microsoft.R.Host.exe!rhost::grdevices::ide::ide_device::history_previous() Line 744 C++ Microsoft.R.Host.exe!rhost::grdevices::ide::ide_graphicsdevice_previous_plot::__l2:: l2::SEXPREC *() Line 849 C++ Microsoft.R.Host.exe!rhost::util::exceptions_to_errors<SEXPREC * (void) >(rhost::grdevices::ide::ide_graphicsdevice_previous_plot:: (void) f) Line 149 C++ Microsoft.R.Host.exe!ide_graphicsdevice_previous_plot(SEXPREC * args) Line 851 C++
Exception thrown at 0x00007FFAAC87A1C8 in Microsoft.R.Host.exe: Microsoft C++ exception: rhost::util::r_error at memory location 0x000000023768C6F8. Unhandled exception at 0x00007FFAAC87A1C8 in Microsoft.R.Host.exe: Microsoft C++ exception: rhost::util::r_error at memory location 0x000000023768C6F8.
I wrote a test that executes all the said plots. It required some plotting code restructuring so I will merge when master branch opens. Meanwhile I will send CF.
note that the 11th (or 12th) that crashes VS when doing history, also gets an error when 1st plotting it. the error is probably related to history getting messed up.
Yes I see it. That is a beauty of automated testing ;-)
Shorter repro:
plot(state.name)
plot(state.region)
Hit plot history back.
Ctrl-enter each plot in the list below.
Hit history button back. Around 11th or 12th time, you see the error in the repl & then the crash.
plot(AirPassengers) plot(BJsales) plot(BJsales.lead) plot(BOD) plot(CO2) plot(ChickWeight) plot(DNase) plot(EuStockMarkets) plot(Formaldehyde) plot(HairEyeColor) plot(Harman23.cor) plot(Harman74.cor) plot(Indometh) plot(InsectSprays) plot(JohnsonJohnson) plot(LakeHuron) plot(LifeCycleSavings) plot(Loblolly) plot(Nile) plot(Orange) plot(OrchardSprays) plot(PlantGrowth) plot(Puromycin) plot(Seatbelts) plot(Theoph) plot(Titanic) plot(ToothGrowth) plot(UCBAdmissions) plot(UKDriverDeaths) plot(UKgas) plot(USAccDeaths) plot(USArrests) plot(USJudgeRatings) plot(USPersonalExpenditure) plot(UScitiesD) plot(VADeaths) plot(WWWusage) plot(WorldPhones) plot(ability.cov) plot(airmiles) plot(airquality) plot(anscombe) plot(attenu) plot(attitude) plot(austres) plot(beaver1) plot(beaver2) plot(cars) plot(chickwts) plot(co2) plot(crimtab) plot(discoveries) plot(esoph) plot(euro) plot(euro.cross) plot(eurodist) plot(faithful) plot(fdeaths) plot(freeny) plot(freeny.x) plot(freeny.y) plot(infert) plot(iris) plot(iris3) plot(islands) plot(ldeaths) plot(lh) plot(longley) plot(lynx) plot(mdeaths) plot(morley) plot(mtcars) plot(nhtemp) plot(nottem) plot(npk) plot(occupationalStatus) plot(precip) plot(presidents) plot(pressure) plot(quakes) plot(randu) plot(rivers) plot(rock) plot(sleep) plot(stack.loss) plot(stack.x) plot(stackloss) plot(state.abb) plot(state.area) plot(state.center) plot(state.division) plot(state.name) plot(state.region) plot(state.x77) plot(sunspot.month) plot(sunspot.year) plot(sunspots) plot(swiss) plot(treering) plot(trees) plot(uspop) plot(volcano) plot(warpbreaks) plot(women)