Every now and then R.app stops responding to various events while a long-running command is executing. I can't scroll the console to look at earlier results, and I don't see partial results until the whole computation is complete. If I ask MacOS to switch to that window, it won't come to the top (though clicking on it does bring it up, but I need to be able to see part of it to do that). Once it finishes it returns to the console prompt and things look fine, but the same thing happens during the next long-running command. This happens every now and then, but I haven't spotted the cause. The only solution I've found is to quit the session and restart it. Does anyone know what might be causing this, or a way to fix it without ending the session? Duncan Murdoch
R.app not handling events
6 messages · Duncan Murdoch, John Fox, John Helly
Hello Duncan The problem may be related to macOS App Nap (although the persistence of the problem when R.app has the focus seems to contradict that). If so, you could either make sure that R.app retains the focus while the command executes or disable App Nap for R.app (permanently, until the option is changed) via the command, in a terminal, defaults write org.R-project.R NSAppSleepDisabled -bool YES I hope this helps, John
John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2024-12-11 12:25 p.m., Duncan Murdoch wrote: > Caution: External email. > > > Every now and then R.app stops responding to various events while a > long-running command is executing.? I can't scroll the console to look > at earlier results, and I don't see partial results until the whole > computation is complete.? If I ask MacOS to switch to that window, it > won't come to the top (though clicking on it does bring it up, but I > need to be able to see part of it to do that). > > Once it finishes it returns to the console prompt and things look fine, > but the same thing happens during the next long-running command. > > This happens every now and then, but I haven't spotted the cause.? The > only solution I've found is to quit the session and restart it. > > Does anyone know what might be causing this, or a way to fix it without > ending the session? > > Duncan Murdoch > > _______________________________________________ > R-SIG-Mac mailing list > R-SIG-Mac at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
On 2024-12-11 2:22 p.m., John Fox wrote:
Hello Duncan The problem may be related to macOS App Nap (although the persistence of the problem when R.app has the focus seems to contradict that). If so, you could either make sure that R.app retains the focus while the command executes or disable App Nap for R.app (permanently, until the option is changed) via the command, in a terminal, defaults write org.R-project.R NSAppSleepDisabled -bool YES I hope this helps, John
Thanks! I've disabled it now. Some of these commands take 5 or 10 minutes to run, and I don't want R to stay focused all that time, I want to do other stuff too. If it happens again, I guess it wasn't that. Duncan
Aloha. I don't have an answer but more info, perhaps. I experience a similar condition with Rstudio in which I can't interrupt a data-intensive command (seems) that goes off into never-never land without terminating the entire Rsession. This often means a lot of time wasted to get back to where I was. If my memory serves, I used to experience what you see in the base R environment which is partly why I started using Rstudio; since it seems to happen less often there. Ironically, now when Rstudio is 'hung', I start up base R and use it until Rstudio comes back or I give up and kill it. I'm willing to run tests if there is something useful to do. J. ---------------------------------------------------------------------------------------------------------------------- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
On Dec 11, 2024, at 07:25, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
Every now and then R.app stops responding to various events while a long-running command is executing. I can't scroll the console to look at earlier results, and I don't see partial results until the whole computation is complete. If I ask MacOS to switch to that window, it won't come to the top (though clicking on it does bring it up, but I need to be able to see part of it to do that). Once it finishes it returns to the console prompt and things look fine, but the same thing happens during the next long-running command. This happens every now and then, but I haven't spotted the cause. The only solution I've found is to quit the session and restart it. Does anyone know what might be causing this, or a way to fix it without ending the session? Duncan Murdoch _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mac__;!!Mih3wA!FmPIP0gRyQHviT3QM8zTwc6X81Eb8I-EvHog0A3THq1WuqnEWJC_ymnLaZWnCsRnSasSGluK4xw8es_hvQOpTA62$
Dear J., What you report is, I believe, a different issue. See 10.3 in the R for macOS FAQ. Best, John
On 2024-12-11 3:03 p.m., Helly, John via R-SIG-Mac wrote:
Caution: External email. Aloha. I don't have an answer but more info, perhaps. I experience a similar condition with Rstudio in which I can't interrupt a data-intensive command (seems) that goes off into never-never land without terminating the entire Rsession. This often means a lot of time wasted to get back to where I was. If my memory serves, I used to experience what you see in the base R environment which is partly why I started using Rstudio; since it seems to happen less often there. Ironically, now when Rstudio is 'hung', I start up base R and use it until Rstudio comes back or I give up and kill it. I'm willing to run tests if there is something useful to do. J. ---------------------------------------------------------------------------------------------------------------------- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660 On Dec 11, 2024, at 07:25, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: Every now and then R.app stops responding to various events while a long-running command is executing. I can't scroll the console to look at earlier results, and I don't see partial results until the whole computation is complete. If I ask MacOS to switch to that window, it won't come to the top (though clicking on it does bring it up, but I need to be able to see part of it to do that). Once it finishes it returns to the console prompt and things look fine, but the same thing happens during the next long-running command. This happens every now and then, but I haven't spotted the cause. The only solution I've found is to quit the session and restart it. Does anyone know what might be causing this, or a way to fix it without ending the session? Duncan Murdoch
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mac__;!!Mih3wA!FmPIP0gRyQHviT3QM8zTwc6X81Eb8I-EvHog0A3THq1WuqnEWJC_ymnLaZWnCsRnSasSGluK4xw8es_hvQOpTA62$ [[alternative HTML version deleted]] _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Ok. Mahalo for the re-direct. J. ---------------------------------------------------------------------------------------------------------------------- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
On Dec 11, 2024, at 10:47, John Fox <jfox at mcmaster.ca> wrote:
Dear J., What you report is, I believe, a different issue. See 10.3 in the R for macOS FAQ. Best, John
On 2024-12-11 3:03 p.m., Helly, John via R-SIG-Mac wrote:
Caution: External email. Aloha. I don't have an answer but more info, perhaps. I experience a similar condition with Rstudio in which I can't interrupt a data-intensive command (seems) that goes off into never-never land without terminating the entire Rsession. This often means a lot of time wasted to get back to where I was. If my memory serves, I used to experience what you see in the base R environment which is partly why I started using Rstudio; since it seems to happen less often there. Ironically, now when Rstudio is 'hung', I start up base R and use it until Rstudio comes back or I give up and kill it. I'm willing to run tests if there is something useful to do. J. ---------------------------------------------------------------------------------------------------------------------- John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
On Dec 11, 2024, at 07:25, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
Every now and then R.app stops responding to various events while a long-running command is executing. I can't scroll the console to look at earlier results, and I don't see partial results until the whole computation is complete. If I ask MacOS to switch to that window, it won't come to the top (though clicking on it does bring it up, but I need to be able to see part of it to do that). Once it finishes it returns to the console prompt and things look fine, but the same thing happens during the next long-running command. This happens every now and then, but I haven't spotted the cause. The only solution I've found is to quit the session and restart it. Does anyone know what might be causing this, or a way to fix it without ending the session? Duncan Murdoch _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mac__;!!Mih3wA!FmPIP0gRyQHviT3QM8zTwc6X81Eb8I-EvHog0A3THq1WuqnEWJC_ymnLaZWnCsRnSasSGluK4xw8es_hvQOpTA62$ _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at r-project.org https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mac__;!!Mih3wA!EogqsqH7d8D64yVU4nsEL_0QQrl8KvkMkXpJ5uQYsIoqFfmcyV9kggDSxuOBIAbxzTMqxRA0grcI400$