I have a rather large chunk of code that breaks sometimes, as far as I can see randomly, with the error message:
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
Some research showed me that this seems to be a Windows/C runtime
message when abort
is called (see for example this link). This drives me nuts: Since it is not an error thrown by R
I have no idea where to look. Does anyone have any clue where R
or maybe data.table
(if that's possible that a package calls the abort
function in C runtime
[??]) calls the abort
function?
Here are some further information:
- The problem is independent from the machine: I tried it on two different machines, it crashed on both of them sometimes.
- The problem is independent on the R version: I tried it with
2.13.1
,2.13.2
, and2.14.0
. - Both machines run Windows 7 (64 bit).
- The problem seems to be related to the size of my
data.tables
. When I artificially reduce the size of the biggerdata.table
, the code runs like a charm. Interestingly, however, one machine has far more RAM than the other (16 GB compared to 6 GB). This additional RAM, however, doesn't really help, at least it seems so. - The problem is not reproducible and breaks at different sections in my code. I noticed this because my code is run in a Sweave document, so I can open the .tex file after R has crashed and it always stops at a different position. However, it always seems to be when a
data.table
operation is called (that doesn't mean a lot though because my code relies heavily ondata.table
). However, even when I don't call Sweave, but just run the code, it breaks sometimes as well. So it does not seem to be related to Sweave. - It has nothing to do with the editor I'm using. I use
RStudio
, but reproduced this behavior by running the code in a plain R command window.
That's basically all possible explanations I've come up with. So it would be great if anyone has any hints on where this error could come from or what else I could check.
PS: I won't be at my machine the next couple of days, so I hope you forgive me when I don't give feedback immediately. Nevertheless, I wanted to post this question before Xmas, otherwise I couldn't enjoy it with my beloved R
suffering and I'm sitting at home, not trying to cure it...
UPDATE
I looked further into the issue and after a while, I got a rather minimal example with data.table
that breaks my R session. If this issue is fixed and it solves the crash of R as described here (note that this is a big if because the example I posted on the data.table list just breaks my R session and does not end it with the error message I described here), I will write an answer here and accept it.