Windows 7 freezes when hitting Enter key in Rgui.exe - r

I'm having a persistent problem with Windows 7 freezing when using R. There is a specific context this happens in:
Using Windows 7 on a desktop machine with multiple displays, and having one or more Rgui.exe sessions running
Connecting to the active Windows desktop session via RDP (remote desktop), which results in resizing the display
Using R while connected via RDP (I'm not sure this step is actually involved.)
Getting back on the desktop machine and using the multiple displays again, which results in another display resizing
Then, I can type into an Rgui.exe window, and can type and edit a command, but when I hit Enter, the entire Windows session freezes, and all I can do is reboot.
This happens to me somewhere around 1 out of 2 or 3 times that I use the computer in the above sequence. Sometimes it works fine, other times it freezes. I've not noticed any pattern. I have not noticed that there is much output in the Rgui window when this happens -- I think it can happen with a pretty fresh session. I say this because there is one other report on stackexchange Windows 7 becomes unresponsive if mouse scroll wheel is used after a simulation in R of R apparently causing Windows 7 to freeze when there is a lot of output in the Rgui window.
Symptoms of the frozen machine are:
The text cursor in Rgui remains at the end of the line, i.e., there is no visible indication that Enter was typed
The mouse pointer on the screen responds to mouse movements (but not clicks) for a few seconds, but then stops responding to anything
The physical mouse and keyboard go dead (i.e., the mouse light on an optical mouse turns off, the caps lock light stops lighting)
The machine continues responds to ping
The machine continues to serve up any shared files and directories
If cygwin is installed and sshd is running, I can start up an remote shell on the machine and it works fine
The machine can be rebooted using a remote shutdown command from another machine
There is no record in any system logs of any problem relating to the freeze, or any event related to R
This has been happening to me for several years now, across multiple versions of R. I am currently using R 3.0.2 and it just happened now. It has happened to me at two different workplaces.
The only thing that I can do to be able to use the machine again is reboot it, either by pressing the power button, or doing a remote shutdown. Ctrl-Alt-Delete on the keyboard has no effect.
If anyone else has encountered this problem and found a solution, I would love to hear it.

Related

Rscript slave call doesn't exit properly

I have a Desktop Entry that calls a shiny app.
Here's my desktop entry
[Desktop Entry]
Type=Application
Comment=App
Name=App
Exec=/usr/bin/Rscript -e "shiny::runApp('~/raspberry_IP/app.R', launch.browser=TRUE)"
Icon=/home/path/to/logo/rpi_logo.png
Terminal=false
Categories=Utility
StartupNotify=true
This runs well and the Shiny application works as expected. However, when I close my browser tab, I see the process is still running.
I am running this application from Ubuntu 20.04 LTS.
If I change my terminal=false to terminal=true. I see that the output of my terminal freezes (the app no longer updates, hence no diagnostic printing). But the terminal is still active (which makes sense given the process is still running). I can CTRL+C out of it to kill it from my terminal, but that's not the desired user behavior.
I see some strategies to stop the app using stopApp() like here. This strategy uses a separate action button to kill the app, so the user has to "manually" stop it. This might work, but I believe it's natural for the user to try to close the tab or Browser (and there's no way for them to know the process is still running, unless they check).
Using this on the server side, does kill the process, but it's recommended against (see here).
session$onSessionEnded(stopApp)
In this case, because my app is running on a local machine, I think I could potentially get away with this (there is only one user at a time), but I was wondering whether there's better practice to implement.

RStudio Server on Microsoft Azure instance

I am currently running R on a Microsoft Azure instance (Ubuntu virtual machine) using RStudio as my IDE, to which I connect simply through my browser. I am trying to run some commands that take quite some time to complete from within RStudio and figured that I could simply close my tab with RStudio open and the process would keep running. However, when I try to reconnect to see how the process is doing, the page keeps loading but I am unable to see RStudio.
I have a few questions regarding running RStudio on a server:
First, am I correct in thinking that I can close my tab and keep the process running?
Second, is it normal behaviour that I am unable to connect to the server while the process is running?
Third, am I going about this the correct way or are there better ways?
Yes, you can close your tab and keep it running.
RStudio Server waits on updates from the R process to update the UI. This means that if you have a long-running computation, your tab may not fully reload until it's finished. You may also have seen this in the middle of a session: when R is busy, you can have problems saving scripts that are open in the editor pane.
Logging out in the middle of a computation should be safe, but be aware that RStudio will save your workspace and shut R down after a period of inactivity. It then reloads everything when you log back in. But this only extends to objects in memory; if you have any files saved in your temp directory, they'll have disappeared when you come back. They're probably still on the disk, but since your new R session has a new temp directory, you'll have to do a manual search for them.

make a jupyter notebook run even if the page is closed

I love notebooks. I love them so much that I have many of them running at the same time, often in different browsers, sometimes on different remote clients. I miss one feature: when I close the tab corresponding to a running notebook, it warns that the corresponding run will be stopped.
My question:
How do I make a jupyter notebook resume it's run even if the page is closed ?
such that I can:
re-open the tab in another browser (possibly on a remote computer such as a tablet),
restart a browser when it needs to,
close those with long running time for later inspection.
From what I understand, the client-server architecture could make that possible, but that there may be issues with multiple concurrent runs...
PS: I created an issue on GitHub
In fact, this was answered in the github issue:
takluyver commented on 26 Apr 2017: Anything already running in the
notebook will keep running, and the kernel it started for that will
stay running - so it won't lose your variables. However, any output
produced while the notebook isn't open in a browser tab is lost; there
isn't an easy way to change this until we have the notebook server
able to track the document state, which has been on the plan for ages.
Thanks!

IBM Domino Designer JavaScript editor lags in virtual environment

I have installed Domino Designer in a Windows VM on VirtualBox on OS X.
When I start entering code in the JavaScript editor, Domino starts to work for every letter I type. The hourglass icon appears and the network symbol on the status bar flashes. This operation takes up to several seconds for every letter I type.
If I try to type anything before the hourglass disappears, the keyboard may hang up and the result is a long list of the same letters that I have to delete again (causing the hourglass to appear for each letter I delete again).
I have tried to disable functionality like "Content Assist", "Quick Diff" and other helpful stuff without luck.
I would really appreciate hints or tips to make this nightmare vanish...
I've not used domino designer, but first thought would be that your VM isn't handling the processing required by the designer.
What are the specs on you windows VM? Did you allocate enough RAM, for example? Make sure they match the requirements to run the designer:
http://www-969.ibm.com/software/reports/compatibility/clarity-reports/report/html/softwareReqsForProduct?deliverableId=1351628933716&osPlatform=Windows
Thanks to Joel for leading me into the right path.
I did several things, and together it now seems that I have a much better environment. I still see the hour glass from time to time, but it does not mess up my code anymore, and most of the time it does not bother me.
What I did was the following:
Changed the memory settings for Domino in this file:
[notes dir]\framework\rcp\deploy\jvm.properties
New values:
vmarg.Xmx=-Xmx1024m
vmarg.Xms=-Xms512m
vmarg.Xmca=-Xmca512k
Then I changed the virtual memory of my guest Windows install to a fixed swap file of 4096 MB.
At least I connected my Mac to a faster network using Thunderbolt to Ethernet cable adapter. I don't think the last thing did any difference, but at least I now have a faster and more reliable network connection.

Visual Studio + Qt Addin, PC freeze when building

this is a more unusual question so give me a hint when stack overflow isn't the right place for it. ;)
I have a problem with Visualstion 2012 where it freezes every so often when I compile my project.
I am currently working on a Qt project so the Qt add-in is installed. I am sure you can't remote-fix my problem but I would like to ask what could cause such freezes.
Here are some important infos:
the PC doens't freeze every time I compile (seems to be a bit random)
the freeze takes from 5 to 15 minutes. In most cases, it ends with the screen switching to black and then back to "normal"
I often try to open the task manager which returns an exit code after the freeze which says that the task manager couldn't start
the PC comes back to life after 5-15 minutes but many applications (incl VS) aren't responding for additional ~5 minutes.
the hardware components are fine for what I can tell. (I tested HDD and RAM, temps are fine)
I hope you can give me a hint where the cause of the freezes could be hiding. ;)
You could start by analyzing what is unique about your system.
Perhaps you are using an unusual source control system, anti-virus, network connections, mapped drives or some weird form of integration that nobody else uses. My guess is that this may be your source control integration or some server connection that is triggering an unusual locking condition.

Resources