Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

R crashing when trying to establish connection to existing database #28

Open
BillPetti opened this issue Sep 4, 2018 · 4 comments
Open

Comments

@BillPetti
Copy link

I recently updated to R 3.5.1 and when I try to connect to my existing database it causes R to crash.

I can create a new database without a problem:

require(DBI)
require(RMySQL)
require(MonetDBLite)

test_db <- src_monetdblite("test_db_Monet", create = TRUE)

str(test_db)
List of 1
 $ con:Formal class 'MonetDBEmbeddedConnection' [package "MonetDBLite"] with 1 slot
  .. ..@ connenv:<environment: 0x7f9d6c79ab00> 
 - attr(*, "class")= chr [1:3] "src_monetdb" "src_sql" "src"

dbDisconnect(test_db$con, shutdown = TRUE)
rm(test_db)

I can reconnect to it as well without crashing:

test_db <- src_monetdblite("test_db_Monet", create = FALSE)
str(test_db)
List of 1
 $ con:Formal class 'MonetDBEmbeddedConnection' [package "MonetDBLite"] with 1 slot
  .. ..@ connenv:<environment: 0x7f9d6b30e270> 
 - attr(*, "class")= chr [1:3] "src_monetdb" "src_sql" "src"

The only thing that seems to work is to establish a connection to another MonetDBLite database first, and then try connecting to my existing database:

require(DBI)
require(RMySQL)
require(MonetDBLite)

test_db <- src_monetdblite("test_db_Monet", create = FALSE)
dbDisconnect(test_db$con, shutdown = TRUE)
rm(test_db)

statcast_db <- src_monetdblite("/Users/williampetti/statcast_database/statcast_db_Monet", create = FALSE)

dbListTables(statcast_db$con)

[1] "boxscore_gameday_info" "player_info"           "statcast_17"          
[4] "temp"                  "umpires_games"   

I should note the crash only occurs if I run the code in RStudio or from the R GUI. If I source a file, for example, the issue does not seem to occur.

The old database was created with a prior version of MonetDBLite and R.

Any idea what may be causing this?

@BillPetti BillPetti changed the title R crashing when trying to establish connection R crashing when trying to establish connection to existing database Sep 4, 2018
@hannes
Copy link
Contributor

hannes commented Sep 5, 2018

The GUI part of the issue puzzles me a bit...

@hannes
Copy link
Contributor

hannes commented Sep 5, 2018

Which version of MonetDBLite are you running?

@BillPetti
Copy link
Author

I tried the most current CRAN version as well as development version 0.6.1.

@hannes
Copy link
Contributor

hannes commented Sep 10, 2018

And this only happens from the GUI or RStudio, correct?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants