[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-db
Subject:    [R-sig-DB] R crash when closing DB connection from command-line
From:       Karl Ove Hufthammer <karl () huftis ! org>
Date:       2010-01-13 11:13:31
Message-ID: MPG.25b7c9429e12fe6a9896cd () news ! gmane ! org
[Download RAW message or body]

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

_______________________________________________
R-sig-DB mailing list -- R Special Interest Group
R-sig-DB@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-db
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic