[R] R 2.15.0 and 2.14.2 crash on the same code that runs on 2.14.1

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Jun 3 16:55:31 CEST 2012


Since this appears to be Windows (not explicitly said), the likely 
change is the compilers used for R >= 2.14.2 differ from those used for 
2.14.1.  The posting guide does ask for 'at a minimum' information with 
good reason.  How big the change was depends on whether this was 32- or 
64-bit Windows.

Unfortunately there are a lot of badly written packages out there which 
write in memory they should not.  As time goes on compilers get better 
at optimizing, and that means they are better at keeping things in 
places in memory close to hand that are more liable to get clobbered.

The only really effective way to find such things is to use valgrind, 
and that means to use Linux (or perhaps Mac OS X, but that's flaky and 
with a lot more overhead than on Linux).  See R CMD check --use-valgrind.

And of course a new compiler may have a new set of bugs: but so far 
we've uncovered about 50 errors in packages and none in the compiler.

On 03/06/2012 14:46, Rainer Hurling wrote:
> On 03.06.2012 09:17 (UTC+2), peter dalgaard wrote:
>>
>> On Jun 3, 2012, at 07:40 , Ebrahim Jahanshiri wrote:
>>
>>> Dear list,
>>>
>>> My code runs on 2.14.1 smoothly (with no error) but makes R crash on
>>> 2.14.2
>>> and 2.15.0 with the usual windows message about "R for windows GUI
>>> front-end has stopped working..." and as such I dont have any access
>>> to R
>>> to get any error or warning message (if any). It crashes on random
>>> parts of
>>> the code any time that I run it.
>>> The code consists of EDA and spatial regression and various loops
>>> and optimizations. The goal of the code is to perform a complete
>>> analysis
>>> on various datasets.
>>> Please take a look at the code here :
>>> https://sites.google.com/site/geosciej/Home/STAR_ter1.R?attredirects=0&d=1
>>>
>>
>> You are not likely to find people willing to debug 15553 lines of code
>> for you, and they are certainly not going to do it "by eye", without
>> the datasets!
>>
>> One thing that jumps out is that you start off by loading five
>> external packages, either of which might be the true owner of the
>> problem. Even if the actual crash hits in the stats.dll, the
>> underlying issue could well be memory corruption occurring some time
>> earlier.
>>
>> Things to try:
>>
>> Run under Rterm in a command window instead of Rgui. That should at
>> least tell you how far you got before the crash, maybe even a proper
>> traceback.
>>
>> Carefully try disabling parts of the code until the issue goes away.
>> The last item removed might hold the clue. If you can cut it down to
>> something small(-ish) and reproducible, people might be in a better
>> position to help you.
>>
>> Is it really a random crash, or does the crash point move every time
>> you change the code slightly? If the former, you might have physical
>> computer problems or you might be running close to your memory limit.
>
> Just a guess:
> One more thing you could try is to rebuild your packages under 2.15.0.
> One often forgets to update them after a version change of R:
>
> update.packages(checkBuilt=TRUE, dependencies=TRUE, ask='graphics')
>
> Rainer Hurling
>
>> -Peter D.
>>
>>>
>>> It seems that the results that comes out of 2.15.0 is more valid for my
>>> work.
>>>
>>> I cant think of anything that makes the code crash on the latest
>>> versions.
>>>
>>> Here is the error message from windows:
>>>
>>> Problem Event Name: APPCRASH
>>> Application Name: Rgui.exe
>>> Application Version: 2.150.58871.0
>>> Application Timestamp: 4f75a0ca
>>> Fault Module Name: stats.dll
>>> Fault Module Version: 2.150.58871.0
>>> Fault Module Timestamp: 4f75a1c9
>>> Exception Code: c0000005
>>> Exception Offset: 000237c5
>>> OS Version: 6.1.7601.2.1.0.256.48
>>> Locale ID: 1033
>>> Additional Information 1: 0a9e
>>> Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
>>> Additional Information 3: 0a9e
>>> Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
>>>
>>>
>>>
>>> I appreciate your help,
>>>
>>> Thank you
>>> Ebrahim Jahanshiri
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list