microsoft / RTVS

R Tools for Visual Studio.
MIT License
390 stars 118 forks source link

Microsoft R Host always stop working #4307

Open Shidiq opened 6 years ago

Shidiq commented 6 years ago

Please briefly describe what you were doing that led to the issue, if applicable: Microsoft R Host always stop working

image

image

Details: Source Microsoft R Host

Summary Stopped working

Date ‎4/‎7/‎2018 6:15 AM

Status Ready for upload

Description Faulting Application Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\R Tools for Visual Studio\Microsoft.R.Host.exe

Problem signature Problem Event Name: APPCRASH Application Name: Microsoft.R.Host.exe Application Version: 1.3.31012.1601 Application Timestamp: 5a4ea255 Fault Module Name: ntdll.dll Fault Module Version: 10.0.17133.1 Fault Module Timestamp: e49d47fd Exception Code: c00000fd Exception Offset: 0000000000035d91 OS Version: 10.0.17133.2.0.0.256.121 Locale ID: 1033 Additional Information 1: 0c5f Additional Information 2: 0c5fa48a403d3d14fa77ebf43cc5eb4b Additional Information 3: 0b9f Additional Information 4: 0b9f07d35cb90b91681d7231da9f2116

Files that help describe the problem minidump.mdmp WERInternalMetadata.xml WERInternalRequest.xml memory.csv sysinfo.txt AppCompat.txt WERDataCollectionStatus.txt memory.hdmp

...

If you have any screenshots demonstrating the issue, please include them as well to help us diagnose it better.

Additional information:

OS Information Version: Microsoft Windows NT 10.0.17133.0

RTVS Information: Assembly: Microsoft.VisualStudio.R.Package, Version=1.3.40104.1351, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Active R URI: Microsoft R Open (3.4.3.0): C:\Program Files\Microsoft\R Open\R-3.4.3\

smortaz commented 6 years ago

Hi. Can you please send us the RTVS logs? It’s in the RTVS menu. Thx

On Fri, Apr 6, 2018 at 4:24 PM Shidiq Nur Hidayat notifications@github.com wrote:

Please briefly describe what you were doing that led to the issue, if applicable: Microsoft R Host always stop working

[image: image] https://user-images.githubusercontent.com/23032122/38448121-3261c4ac-3a2c-11e8-9c46-4dc485f281ba.png

[image: image] https://user-images.githubusercontent.com/23032122/38448115-24e0ac62-3a2c-11e8-9fc2-b290a6cc4190.png

Details: Source Microsoft R Host

Summary Stopped working

Date ‎4/‎7/‎2018 6:15 AM

Status Ready for upload

Description Faulting Application Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\R Tools for Visual Studio\Microsoft.R.Host.exe

Problem signature Problem Event Name: APPCRASH Application Name: Microsoft.R.Host.exe Application Version: 1.3.31012.1601 Application Timestamp: 5a4ea255 Fault Module Name: ntdll.dll Fault Module Version: 10.0.17133.1 Fault Module Timestamp: e49d47fd Exception Code: c00000fd Exception Offset: 0000000000035d91 OS Version: 10.0.17133.2.0.0.256.121 Locale ID: 1033 Additional Information 1: 0c5f Additional Information 2: 0c5fa48a403d3d14fa77ebf43cc5eb4b Additional Information 3: 0b9f Additional Information 4: 0b9f07d35cb90b91681d7231da9f2116

Files that help describe the problem minidump.mdmp WERInternalMetadata.xml WERInternalRequest.xml memory.csv sysinfo.txt AppCompat.txt WERDataCollectionStatus.txt memory.hdmp

...

If you have any screenshots demonstrating the issue, please include them as well to help us diagnose it better.

Additional information:

OS Information Version: Microsoft Windows NT 10.0.17133.0

RTVS Information: Assembly: Microsoft.VisualStudio.R.Package, Version=1.3.40104.1351, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Active R URI: Microsoft R Open (3.4.3.0): C:\Program Files\Microsoft\R Open\R-3.4.3\

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/RTVS/issues/4307, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtUVDuRZbh0VI44zEqGrXQyDGEDDVadks5tl_klgaJpZM4TK0uE .

Shidiq commented 6 years ago

@smortaz here my RTVS logs. Thanks.

RTVS_2018407_061318_pid12688.log

MikhailArkhipov commented 6 years ago

The error code is 'stack overflow'. Does code work in RGUI?

Shidiq commented 6 years ago

@MikhailArkhipov yes, the code work well in RGUI and RStudio witout any errors. I try using Visual Studio, but from the first open R in visual studio, R Host Stop working when I write code.

Here the log when start: RTVS_2018407_060104_pid11868.log

Nekochef commented 6 years ago

I have had similar issue for a long time. After VS was opened and project was loaded, the CPU usage of Microsoft R Host (there were two instances of Microsoft R Host, I mean one of them) would suddenly climb up to about 30%, though I didn't do any thing. Then it seemed that the R Host is crashed, and the windows problem reporting process appeared, and finally disappeared. During this procedure, the memory use of R host would climb from 0 to approximately 500MB in seconds, I think this can be a stack overflow problem. That phenomenon happened repeatedly by an 1-minute interval, but I can use RTVS to run code blocks without a problem.

image

image

image

RTVSLogs.zip

Additional information:

OS Information Version: Microsoft Windows NT 10.0.16299.0

RTVS Information: Assembly: Microsoft.VisualStudio.R.Package, Version=1.3.40104.1351, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Active R URI: R 3.4.3: C:\Program Files\R\R-3.4.3

Shidiq commented 6 years ago

@Nekochef unfortunately, it's not working on me. Thanks.

2018-04-11_061635

@smortaz sorry, this it the file log. Thanks. RTVSLogs.zip

Nekochef commented 6 years ago

Hi @Shidiq , have you tried to change the default library paths?

Just create a new folder for your library, and find Rprofile.site in %R directory%\etc\, then add .libPaths("Your Folder Path") in a new line. You may need to run your text editor as administrator. This will change your default library path, thus you'll have to reinstall all the packages needed, but for me, this time it really solved my issue. When taking no action, VS and RTVS won't use any CPU or memory.

I think it is due to some incompatible packages, because since I first installed R, I didn't change my library path, there might be too many packages that can affect each other in some ways, or at least incompatible to RTVS. I even reinstalled my system (personal files were kept), then reinstalled VS 2017 but the crashes kept happening, then I realised that the only thing remained was my library path.

Hope it can help.

Shidiq commented 6 years ago

Hi @Nekochef thank you very much. It works great on me. CPU stable and no error again.

2018-04-11_155727

Thank you.

MikhailArkhipov commented 6 years ago

Will look into this for 15.7 P5. Looks like intellisense process is recursing and crashing.

priscian commented 6 years ago

I'm having the same problem as @Shidiq before the change in .libPaths(). I'd prefer not to reinstall my R libraries, because I maintain separate dev & release versions with a lot of packages. I'll have to avoid RTVS for now because of the high CPU issue, but I'm hoping to make VS my primary IDE for R development ASAP.

priscian commented 6 years ago

Incidentally, is it possible in Workspaces to set the library path through "R command line arguments"? From PowerShell, I can do:

R[gui].exe --vanilla R_LIBS_USER=C:/Users/jim/Documents/R/library/devel

to put my non-R_HOME library first on the search path inside the R session, but RTVS doesn't seem to allow command-line assignment of environment vars, which makes it difficult to use personal libraries. (--vanilla above seems to work, however, with RTVS.)

priscian commented 6 years ago

Hi, just checking to see whether there's a plan to resolve this issue. MS R Host is still pegging the CPU, crashing, repeat. Unfortunately, this problem brings my intention to use RTVS to a dead stop; I can't have to pare down the number of R packages in my libraries just to use RTVS.

priscian commented 5 years ago

I just upgraded to VS Community 15.8.7 and checked out RTVS—it appears that this issue still exists. I'm hoping that resolution is still on the docket. Cheers.

priscian commented 5 years ago

Checking in again. Are there any plans to resolve this problem?