[R-sig-Geo] assertion failure on call to r.cost & v.what.rast

Roger Bivand Roger.Bivand at nhh.no
Wed Dec 15 18:42:07 CET 2010


On Wed, 15 Dec 2010, Colin Bleay wrote:

> I am running a script in R that calls functions in grass from a iterative 
> loop.
>
> This works fine but every so often I get an assertion failure.
>
> This does not appear to be a function of the data I am sending to the grass 
> executable.

Colin,

Please repost this on grass-stats:

http://grass.osgeo.org/statsgrass/index.php

as it is only marginally an R question. You may be able to put your 
execGRASS() calls in a try(), but I suspect that because it is running 
through system(), the answer is perhaps on the GRASS side, and may not be 
practical or easy. It may well be that the GRASS program is trying to use 
resources on your computer that Kerberos has locked - the g_mechListLock 
variable does not seem to be used in GRASS, and the g_initialize.c file 
seems to be part of Kerberos, not GRASS. How this works on Windows is not 
for regular humans to know about, I'm afraid.

Is your machine running under a tight security regime, perhaps? Can you 
try out your script on a different computer not using networked disk 
drives? It could also be a function of the environment in which the GRASS 
Windows binaries were built. Can you try having the repeated calls to 
execGRASS() separated by pauses, or have it do something else to let 
Kerberos recover its posture?

Roger

>
> The assertion failure throws up a window allowing me to 'abort', 'retry' or 
> 'ignore'.
>
> If i 'retry' it then asks me to close the program (the grass executable) and 
> then the R script carries on as usual. i.e. the retry works and I will end up 
> with all my data.
>
> The problem i have is that I wish to let this r script run over night but i 
> cannot as I have to be there to supervise it, to 'retry' the commands.
>
> so my questions are:
>
> 1. Does any body have any idea why these assertion failures are occuring?
> 2. Does anybody have any idea how I might be able to catch these failures so 
> that I can get R to retry the grass executable rather than myself.
>
> the error the grass executable throws is:
>
> "Assertion failed!
> Program: C\GRASS_64\bin\RCOST~1.EXE
> File:r:\pismere\athena\auth\krb5\scr\li..\g_initialize.c
> Line:76
>
> Expression: (&(&g_mechListLock)->os)->is_locked==1"
>
>
>
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list