adilapapaya / rpostgresql

Automatically exported from code.google.com/p/rpostgresql
0 stars 0 forks source link

[Memory overflow] Access Vioaltion - application crash #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a table that contains "unknown" type
For ex:
create table foobar as select 'a string' as astring, null as anull;

2.IN Rgui, launch the following script

library(RPostgreSQL)
condb=dbConnect(PostgreSQL(),user="...",password="...",dbname="test",host="...",
port="5432")

for (counter in 1:1500) {
  foobar=dbGetQuery(condb,statement="select * from foobar")
}

What is the expected output? 
the application terminates without any problem , but it will have 1500 warnings 
( unrecognized PostgreSQL field type unknown (id:750) in column 0)

What do you see instead?
Rgui is crashed .

What version of the product are you using? On what operating system?
R 3.0.2 (64), RPostgresql 0.4, windows 7 64b

Please provide any additional information below.
i have debugged with windbg and voila the result:the attached file

Original issue reported on code.google.com by SieuT...@gmail.com on 14 Nov 2014 at 5:21

Attachments:

GoogleCodeExporter commented 9 years ago
Just a note that the reported example does not cause any unexpected problem 
with recent mac versions as noted below.

-------------- write version info ----------------------
ProductName:    Mac OS X
ProductVersion: 10.9.5
BuildVersion:   13F34

RPostgreSQL svn version: 273

psql (PostgreSQL) 9.4rc1

R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)

> library(RPostgreSQL)
Loading required package: DBI
> 
> 
condb=dbConnect(PostgreSQL(),user="...",dbname="RPostgreSQL_Test",host="localhos
t",port="5432")
> foobar=dbGetQuery(condb,statement="select * from foobar")
Warning messages:
1: In postgresqlExecStatement(conn, statement, ...) :
  RS-DBI driver warning: (unrecognized PostgreSQL field type unknown (id:705) in column 0)
2: In postgresqlExecStatement(conn, statement, ...) :
  RS-DBI driver warning: (unrecognized PostgreSQL field type unknown (id:705) in column 1)
> for (counter in 1:1500) {
+   foobar=dbGetQuery(condb,statement="select * from foobar")
+ }
There were 50 or more warnings (use warnings() to see the first 50)

> print(foobar)
   astring anull
1 a string  <NA>
> 

Original comment by ne...@neiltiffin.com on 26 Nov 2014 at 12:04

GoogleCodeExporter commented 9 years ago
I ran it on Debian 7 and got the same error:
segmentation fault
.

Regards,
Truc

Original comment by SieuT...@gmail.com on 30 Nov 2014 at 12:15