Hi,
Since I have installed both the latest version of Tinn-R (4.2.4.0) and that of Microsoft R Open (3.3.0), R crashes every time I run a 'clear all' command (default shortcut F12 in Tinn-R). This is a problem within Tinn-R, I think, because R does not crash if I copy and run the very same command myself in the R console: "rm(list=ls()); graphics.off()". Therefore, I suspect the bug is related to the dynamic interaction/connection betwenn Tinn-R and R. Maybe that issue does not occur with standard R directly from CRAN, but even if it is so, that would be nice if you could resolve this bug (systematic fatal R APPCRASH'es) for MRO&TinnR users, which are to become increasingly numerous I think.
More specifically, I've just found a workaround, which may guide you toward a cleaner way to fix this issue for good. As I suspected the problem to be due to the R object Explorer within Tinn-R Tools panels (CTRL+F8), I've simply changed the focused panel to 'Misc' instead of 'R', and from that moment, R would not crash anymore! So that's it: R Explorer causes the issue, when closing lots of 'windows' devices. And I think I know why. When a device is closed, focus is returned to the previous window, which may be Tinn-R, in which case R Explorer may try to refresh/update its list, which is not a good thing to perform during a 'clear all' task...
Here is a code to generate many variables and devices, a prequisite for the APPCRASH bug to occur:
#Creation of dummy variables and basic plot devices:
for(i in 1:100) assign(sprintf("var%d", i), rnorm(n=i))
for(j in 1:30) {
dev.new()
plot(1:5)
}
if(F) {
#to test manually:
rm(list=ls()); graphics.off()
graphics.off(); rm(list=ls())
#Curiously, both work without any R crash...
}
#BUT IF I USE THE F12 shortcut: ouch! R crashes! :-(
(Also, in case it matters, my Computational synchronization (delay) [in Tinn-R general settings] is set to 100 ms.)
Could you check it out and find a robust fix for this bug, please?
Thanks a lot.
Cheers.
Marc (alias marQIsoft)