I updated R, Rstudio and many packages a couple weeks ago and am now running into a weird scenario I can't figure out.
When I run a query on a Redshift cluster via dbGetQuery, as long as it's a valid query with no errors, things work fine and as expected. If the query returns an error (like missing a group by or typo), rather than returning the error, RStudio throws the “R session aborted” screen with the bomb.
I ran the query in an R console and received the following:
*** caught segfault ***
address 0xa8d60, cause 'memory not mapped'
Traceback:
1: postgresqlExecStatement(conn, statement, ...)
2: dbSendQuery(con, statement, ...)
3: dbSendQuery(con, statement, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(dbSendQuery(con, statement, ...))
9: postgresqlQuickSQL(conn, statement, ...)
..... (removed the query)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Any idea what might be going on?
Thanks!