[R-sig-DB] RODBC Debugging

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Fri May 18 07:50:04 CEST 2012


On 17/05/2012 21:06, Christopher A. Simon wrote:
> We are trying to attach R to our ODBC driver via RODBC. Unfortunately
> we're getting Segmentation faults in odbcConnect (error detailed
> below). We would like to attach a debugger to whatever process is
> communicating with UnixODBC/our driver, but are not sure where to
> start. R itself seems to be a large bash script, ideally we could
> inject "gdb --args" before the execution of some process in that
> script to get the desired results. Any guidance is much appreciated.
>
>> library(RODBC)
>> odbcConnect("sql1010odbc",uid = "uname", pwd = "pword")
>
>   *** caught segfault ***
> address 0x100000abb, cause 'memory not mapped'
>
> Traceback:
>   1: .Call(C_RODBCDriverConnect, as.character(connection), id,
> as.integer(believeNRows))
>   2: odbcDriverConnect(st, ...)
>   3: odbcConnect("sql1010odbc")
>
You need to read some basic R documentation.  'R' is not a 'bash 
script'. not even an sh script.  But the front-end script allows e.g. R 
-d gdb to run the R executable under gdb.

-- 
Brian D. Ripley,                  ripley using 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-sig-DB mailing list