-----Original Message-----
From: Rangrej, Jagadish
Sent: Friday, February 22, 2002 5:41 PM
To: 'r-help at stat.math.ethz.ch'
Subject: R crashes when .Fortran embeded function, is called
twice in R
Hello,
I have few functions in fortran.. whose dll is generated and
integrated with C:\Pro..files\R\..library\...libs
Then I load the dll etc.. and call a R function, which inturn
call the function in dll, using .Fortran
Skeleton .Fortran call in R function:
1. Set data (allocation ..)
2. call the routine to evaluate (some simulation)
3. unset data ( deallocation etc..)
Problem : 1st time I call, it works fine and gives the answer
as expected. If I call it second time without going out of R,
then it fails and crashes the R saying unknown error with Rgui.
FYI: I got calls to write/print which writes to the logfile
instead to the screen so no question of error due to
printing, I think, I also checked with allocation and
deallocation sequence in setdata and unsetdata resp., it
should work as expected.
I will be very much thankful to you for helping me resolve
this problem.
Thanks,
-Jag
Jagadish Rangrej ( Statistician )
CHEO Research Institute, Ottawa, ON
613-7383951