[R-sig-DB] R crash when closing DB connection from command-line
Karl Ove Hufthammer
k@r| @end|ng |rom hu|t|@@org
Wed Jan 13 12:13:31 CET 2010
I'm experiencing a rather curious crash related to accessing a database
in R 2.10.1 on Windows. I'm using RODBC on an Oracle database, which
works fine, but closing the database connection from the command-line
leads to a crash:
library(RODBC)
db = odbcConnect("dbname", uid="username", pwd="password")
close(db)
When I run the above lines inside R, everything is fine. If I store the
commands in a file and then source the file, everything is fine. But if
I run the file using
Rterm --file=test.R
RTerm.exe crashes, with the following Windows error message (my
translation from Norwegian Nynorsk):
The instruction in "0x7c9109f9" referenced adress "0xffffffff". The
memory could not be "read". Click OK to terminate the program.
The problem seems not to be related to the amount of time between
opening the connection and closing it, BTW, as it still occurs 100% of
the time if I add a 'Sys.sleep(5)' between 'odbcConnect' and 'close'.
Any ideas that the problem could be? Here's some system information from
a clean start of R:
> sessionInfo()
R version 2.10.1 (2009-12-14)
i386-pc-mingw32
locale:
[1] LC_COLLATE=Norwegian-Nynorsk_Norway.1252 LC_CTYPE=Norwegian-
Nynorsk_Norway.1252 LC_MONETARY=Norwegian-Nynorsk_Norway.1252
[4] LC_NUMERIC=C LC_TIME=Norwegian-
Nynorsk_Norway.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
--
Karl Ove Hufthammer
More information about the R-sig-DB
mailing list