R Studio crashing not at initialization. Error: Error occurred during transmission - r

Some context on my environment:
I am running R Studio in a docker container called rocker/verse.
I downloaded this dataset from Kaggle, which has about 470 MB.
When working with it, at some point RStudio restart. It does't happen after a specific call, and I've seen the same problem when working with other projects. Though it is not related to my code, I am posting it bellow.
library(data.table)
fraud<- fread("path.csv")
fraud1<- sort(sample(nrow(fraud), nrow(fraud)*.7))
train<- fraud[fraud1, ]
test<-fraud[-fraud1, ]
Usually on the console this message is printed:
Error: Error occurred during transmission
And, this pop up is also showed:
I have no idea what is causing it. I would appreciate any help.

Delete the .Rhistory files associated with the installation and any open project.

You have a problem with your user data files for Rstudio. Follow the hints given here: https://community.rstudio.com/t/rstudio-server-error-occurred-during-transmission/84258 and here: https://support.rstudio.com/hc/en-us/articles/218730228-Resetting-a-user-s-state-on-RStudio-Server.

Related

wine, console program, gtk error messages

From the linux console I run a windows console tool using:
wine console_tool.exe ....
The console tool does not involve any windows. It's output is just textual.
Some output is added repeatedly after a given delay time.
However, besides the output of the console_tool.exe I get repeatedly the following error message also interleaved with the other output:
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I already tried to export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 but then the only change is that the error message changes:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
I also attempted to apt install the :i386 version of the libgtk3-nocsd.so.0 but it doesn't seem to exists.
I don't know why a console application may trigger a gtk error message. This is beyond my knowledge.
My preferred goal would be to tell wine that the .exe does not use windows and it does not need to not use gtk for windows emulation at all. However, as this may not be possible, my second preferred goal would be to solve the gtk issue.
Can you help me achieve at least one of those goals?
I do not know what the error messages mean. However, the wineconsole command runs console executable using wine. Example:
wineconsole console_tool.exe

How to solve "bad restore file magic number" when trying to load data?

I tried to load data to my R working directory and receive this error:
Error: bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘classize.RData’ has magic number 'RDX3'
Use of save versions prior to 2 is deprecated
I googled it and tried many options, unsuccessfully.
My Rstudio version is: 1.2.5033 (The error was happening before updating as well)
I create a new project, in the new directory, I put the data file
The data file is "classize.RData"
I have another alternative which is "classize.RDS" with the sugesstion to use readRDS(file = "classize.RDS"). When using this command, I receive that error:
cannot read workspace version 3 written by R 3.6.1; need R 3.5.0 or newer
This is in the context of a statistical course at university and my teacher assistant is unable to help me out, and whitout resolving this issue, I cannot move forward in the resolution of the needed exrecices. So please, couly you help me resolve that problem.
ps: all the students have access to the same data, It's just for me that it's not working, therefore the file should not be corrupted.

Information shows in browser, not "R Help" pane, when using StatET

I am using Eclipse 2018-09 and StatET 3.6.1. I have two R environments: one for R 3.3.2, another for R 3.5.1. When I execute a command like ?lm to call up a help page in v3.3.2, the page appears in the StatET "R Help" pane, as I want it to. But when I execute the same command to call up a help page in v3.5.1, the console tells me "starting httpd help server," and the help page loads in my browser. How can I get help to load in the "R Help" pane when using v3.5.1?
The problem arises whether or not I run Eclipse as an administrator, and whether or not I "Auto Run" R 3.5.1 upon booting. And as far as I can tell, the configurations for the two versions of R are nearly identical:
Both are running Windows 10 and JRE 1.8.0_121.
Both with version 2.1 of the rj package.
For both, I've checked every box in "Run Configurations > R Console > R Console > Eclipse Integration," including "Enable R Help for StatET."
For both, options("help_type") == 'html'.
Inspection of the different log files that I get when using Auto Run with the two versions of R suggests that there is some sort of StatET config problem that has to do with Derby. These messages appear only when I boot R 3.5.1:
!ENTRY de.walware.statet.r.core 4 -1 2018-11-16 02:50:29.092
!MESSAGE An error occurred when initializing DB for model.
!STACK 1
org.eclipse.core.runtime.CoreException: An error occurred when loading embedded DB (Derby + DBCP)
DB ConnectionURL=[path redacted]\eclipse-workspace\.metadata\.plugins\de.walware.statet.r.core\db
[...]
Caused by: java.sql.SQLException: Another instance of Derby may have already booted the database C:\[path redacted]\eclipse-workspace\.metadata\.plugins\de.walware.statet.r.core\db.
[...]
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database C:\[path redacted]\eclipse-workspace\.metadata\.plugins\de.walware.statet.r.core\db.
But I don't know what to make of this problem or how to fix it.
Stephan Wahlbrink, the creator of StatET, recommended running this command at startup:
registerS3method("print", "help_files_with_topic", rj::print.help_files_with_topic)
I ran the command, and it solved the problem.
(Stephan added that the Derby errors that I saw in the logs were unrelated to the problem of displaying help in the "R Help" pane.)

Error when installing the 'graphics' package (but not others) in R

I am a starter in R and new to StackOverflow and this is the first time I raise a question, I hope i'm following all the rules...
Anyway. I got R (3.5.0 version) and R-Studio on my laptop with Win 10 Home installed (under the same parent folder 'D:\') and reset the temporary file directory to a folder in D:\ so that the Chinese in C:\Users\中文\documents (which is the default place for tempo files) doesn't affect the connection btw R-studio and R (I was told any relevant directory has to be in English to make R-Studio work).
The problem is, I cannot install the 'graphics' package when I run
install.packages('graphics')
The resulting error says something like this:
>Error in install.packages : Updating loaded packages
>Restarting R session...
>Error in gzfile(file, "wb") : cannot open the connection
>Error saving session (options): R code execution error
>WARNING: Forcing suspend of process in spite of all session data not being fully saved.
It's quite weird since the 'graphics' package is pretty basic and as a matter of fact I haven't found anyone reporting such errors on the internet.
It also bothers me that other packages like 'forecast' and 'XML' can be successfully installed without any error report.
I've looked at some similar questions on StackOverflow, having error reports with "Error in gzfile(file, "wb") : cannot open the connection", but they all seem to have something else to complete the sentence. In my case it just stops the error description with "cannot open the connection". Also I couldn't find people having similar problems with "Error saving session (options): R code execution error".
I do realize that this is quite unusual. I can't even find the proper tags other than r for this question. Although it seems that no one has trouble with the 'graphics', this problem is really bothering me and I hope someone can give possible solutions. Thanks a lot.

How can I resurrect my Windows Store app after several packages fail to load?

The last time I had my Windows Store app open (last night), I had a XAML error in it. I (tried to) open it tonight to try to fix it, but got all kinds of errors about things not being able to be loaded. Here are the important excerpts from the ActivityLog.xml file:
460
2014/12/25 01:39:17.198
Error
VisualStudio
SetSite failed for package [LocalHistoryPackage]
{3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5}
80131500
No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Text.ITextDocumentFactoryService
RequiredTypeIdentity Microsoft.VisualStudio.Text.ITextDocumentFactoryService
. . .
935
2014/12/25 01:43:39.091
Error
VisualStudio
SetSite failed for package [LocalHistoryPackage]
{3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5}
80131500
No exports were found that match the constraint:
ContractName
Microsoft.VisualStudio.Text.ITextDocumentFactoryService
RequiredTypeIdentity
Microsoft.VisualStudio.Text.ITextDocumentFactoryService
. . .
937
2014/12/25 01:43:39.092
Warning
VisualStudio
Package failed to load; error message suppressed by skip flag
{3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5}
. . .
966
2014/12/25 01:43:52.147
Error
VisualStudio
SetSite failed for package [Microsoft.VisualStudio.Editor.Implementation.EditorPackage]
{E269B994-EF71-4CE0-8BCD-581C217372E8}
80131500
No exports were found that match the constraint:
ContractName
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
RequiredTypeIdentity
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
I shut VS down, reopened it and the project and, although I didn't see all those err msgs, and the project was ostensibly open, there was nothing in the Solution Explorer (no files displayed). I tried opening MainPage via File > Open, but that just resulted in another err msg.
The only other thing that changed the last time I had the project open was that I updated SQLite from version 3.8.7.1 to 3.8.7.2
What could be the solution (no pun intended)?
UPDATE
On trying to shut down Visual Studio, I got over and over again: "No exports were found that match the constraint...(bla bla bla)" until I had to stop it via Ctrl+Alt+Del
UPDATE 2
Here's what's even more bizarre: I can open the project and, although Solution Explorer is completely empty/no files
visible, if I build the project via Ctrl+Shift+B, it does give me the errors in the Error List (XAML errors in MainPage.xaml).
2-clicking them brings up nothing in the editor, though.
If I try to open MainPage.xaml, I get this:
But, although I just saved this file (the screen shot above), the date on it is 10/19/2014 - more than two months in the past. What the...?!?
What must I do to get this back to normal?
UPDATE 3
I do see this with the Team Explorer tab open (this app is not under version control):
Page '3185ed96-1cbd-4381-a439-636973542e50' not found.
I fixed the XAML issue by opening MainPage.xaml in Notepad ++ and changing the XAML around. I was then able to successfully build the app in Visual Studio, but trying to run the app caused VS to crash and then start up again (still with no files in Solution Explorer).
UPDATE 4
Now I get, "Package Designer Package failed to load" when I try to open MainPage.xaml via File > Open in VS 2013...
UPDATE 5
Now I can run the app (sort of); F5 causes the splash screen to display, and then it just goes gray-black. When I Alt+F4 to shut that down, VS starts back up again (apparently after shutting down - I intended to only shut down my running app, not Visual Studio.
AutoHistory tells me:
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.Exception: Exception of type 'System.Exception' was thrown.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid&
context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Anyway, I then notice that I do have a (literal) red flag, and mashing it shows me an "Renew your developer license" message.
I was able to update my dev license, but my solution is still wacky in the same ways as before.
UPDATE 6
Answering Walt Ritscher, I get this in AutoHistory on starting VS (no solution opened):
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.Exception: Exception of type 'System.Exception' was thrown.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Then, when opening another project that was working fine the last time I had it open, it, too, shows no files in the Solution Explorer. If I try to run it, I get that same "No exports were found" err msg.
So VS itself is hosed, it seems. What need I do? Uninstall/reinstall?
It seems likely that your VS install is hosed. You can try a repair first, before doing a reinstall.
last week I have faced the similar problem with my Visual Studio . I think these problems occurs due to the Pc Cleaners/Pc problem fixer and others like that. I just reinstalled the windows and visual studio and the same code executed fine.
So VS itself is hosed, it seems. What need I do? Uninstall/reinstall?
I would definitely try that. However, first I would copy the project to another machine with VS installed and try there. If it works on another machine then there is a problem on the first machine, possibly VS, possibly some extension or add-in. If it doesn't work on another machine then there is a problem with the code.

Resources