Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with 'cacheKey' in .rs.WorkingDataEnv and .rs.CachedDataEnv #13188

Closed
4 tasks done
DesiQuintans opened this issue Jun 1, 2023 · 125 comments
Closed
4 tasks done

Error with 'cacheKey' in .rs.WorkingDataEnv and .rs.CachedDataEnv #13188

DesiQuintans opened this issue Jun 1, 2023 · 125 comments
Assignees
Labels

Comments

@DesiQuintans
Copy link

DesiQuintans commented Jun 1, 2023

❗❗ There is a fix for this issue❗❗
The latest release now contains the fix for this issue. Please download the latest version(RStudio 2023.06.1+524) from https://posit.co/

System details

RStudio Edition : Desktop
RStudio Version : 2023.06.0 Build 418
OS Version      : Windows 11
R Version       : 4.3.0

Steps to reproduce the problem

I'm not sure I can reproduce this on demand, it seems to come up randomly.

Describe the problem in detail

At the end of seemingly any block of code, there is a chance of throwing these two errors:

Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
  invalid first argument
Error in assign(cacheKey, frame, .rs.CachedDataEnv) : 
  attempt to use zero-length variable name

I'm sorry I can't be of more help; I haven't divined any pattern to this error. But since the environment it's happening in is named ".rs.", I figured it might be caused by the daily build of RStudio I'm using. I'm using this version because the public build keeps crashing because of the dataframe autocompletion preview when I'm working with large data.

Describe the behavior you expected

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
@DesiQuintans DesiQuintans added bug new New incoming issues, ready for initial review. labels Jun 1, 2023
@kevinushey

This comment was marked as resolved.

@DesiQuintans

This comment was marked as duplicate.

@mbedward

This comment was marked as duplicate.

@daxiagithub

This comment was marked as duplicate.

@CallumDataDrive

This comment was marked as duplicate.

@mabar1

This comment was marked as duplicate.

@mwr824

This comment was marked as duplicate.

@mdhall272

This comment was marked as duplicate.

@daxiagithub

This comment was marked as duplicate.

@Peeetman

This comment was marked as duplicate.

@kevinushey

This comment was marked as duplicate.

@nipnipj

This comment was marked as duplicate.

@rosybegar

This comment was marked as duplicate.

@jparedes-m

This comment was marked as duplicate.

@kevinushey

This comment was marked as duplicate.

@mdhall272

This comment was marked as duplicate.

@shearerpmm

This comment was marked as duplicate.

@nipnipj

This comment was marked as duplicate.

@fognyc

This comment was marked as duplicate.

@Chr96er

This comment was marked as duplicate.

@sharon-wang
Copy link
Member

I was able to reproduce this with 2023.06.0+421 on Mac 13.1

  1. Trigger error from data.frame preview with multiple AsIs fails #13215
    1. Run df <- data.frame(X = I(matrix(c(1,0,0,1),2)), W = I(matrix(c(1,-1,-1,1),2))) in console
    2. Type df in console, then hit tab key to trigger autocomplete
    3. Get error
      Error in .subset2(x, i, exact = exact) : subscript out of bounds
      Error in if (maxRows != -1 && nrow(data) > maxRows) data <- head(data,  : 
        missing value where TRUE/FALSE needed
      
  2. Run rm(list = ls()) in console
    • Get error
      Error in exists(cacheKey, where = .rs.WorkingDataEnv, inherits = FALSE) : 
        invalid first argument
      

@jonvanausdeln was able to reproduce using these steps on Windows as well

@robbienukes

This comment was marked as duplicate.

@kevinushey
Copy link
Contributor

Thanks @sharon-wang!

As a workaround, I think you can add the following to your ~/.Rprofile:

options(rstudio.help.showDataPreview = FALSE)

and then restart the RStudio session and confirm that getOption("rstudio.help.showDataPreview") reports FALSE.

@daxiagithub

This comment was marked as duplicate.

@DesiQuintans

This comment was marked as resolved.

@fulvionedel

This comment was marked as duplicate.

@d2i-23

This comment was marked as duplicate.

@kevinushey kevinushey added this to the Patch 2023.06.1 milestone Jun 10, 2023
@jonvanausdeln
Copy link

@zxc307 , what version of RStudio are you using?
A fix for this issue should be in an upcoming patch.

If you would like to try it, it's available in the Daily Builds , starting with build 2023.06.1+437. If the fix works for you, please write a comment here letting us know! Please note that daily builds are for testing purposes only and they are not meant for production. This fix is still undergoing testing.

@jwe4ec

This comment was marked as duplicate.

@jonvanausdeln
Copy link

@jwe4ec , thank you for the report and repro steps. I've opened a new issue (#13291) to track this problem.

@charissywong

This comment was marked as duplicate.

@snowpong

This comment was marked as resolved.

@kevinushey
Copy link
Contributor

What functionality is lost (if any) if we turn off showDataPreview as suggest by @kevinushey above?

The only thing that's lost is the inline data preview that displays in the completion help popup, when a data.frame is selected in the completion list.

@sushrutshitoot

This comment was marked as duplicate.

@jonvanausdeln

This comment was marked as duplicate.

@LewisT1987

This comment was marked as duplicate.

@kevinushey
Copy link
Contributor

@LewisT1987 did you read the instructions posted in the OP of this issue thread?

@b11235
Copy link

b11235 commented Jun 29, 2023

I was having serious problems with this issue. I installed RStudio 2023.06.1 build 438 last night. So far, the problem has not happened again. Thanks for fixing this!!

RStudio Edition : Desktop
RStudio Version : 2023.06.1 build 438
OS Version : Windows 10
R Version : 4.3.0

@mayhaw

This comment was marked as duplicate.

@jonvanausdeln
Copy link

@mayhaw, this has been fixed, please see the very top of this issue thread.

@michael6010
Copy link

@jonvanausdeln, followed your suggestion and it worked for me. Thanks.
https://dailies.rstudio.com/rstudio/desert-sunflower/electron/macos/2023-08-0-daily-53/

@15mmerits

This comment was marked as duplicate.

@twest820

This comment was marked as duplicate.

@Steve-Koller

This comment was marked as resolved.

@jonvanausdeln
Copy link

@Steve-Koller , there are Mac builds available on the Dailies page that fix the issue. It is undergoing final testing and will be officially released soon.

If you would like to try it, it's available in the Daily Builds , starting with build 2023.06.1+437. If the fix works for you, please write a comment here letting us know! Please note that daily builds are for testing purposes only and they are not meant for production. This fix is still undergoing testing.

@jonvanausdeln
Copy link

@15mmerits , if you are still seeing the issue after trying the Daily build, please open a new issue with your details (error message, RStudio Version , R Version)

@Chris-Larkin

This comment was marked as duplicate.

@jonvanausdeln
Copy link

@Chris-Larkin , what version of RStudio are you using?

@Chris-Larkin
Copy link

@jonvanausdeln Version 2023.06.0+421 (2023.06.0+421)

@jonvanausdeln
Copy link

@Chris-Larkin , as mentioned in the description of this issue, we have a fix for this issue. It will be released in the next patch.

If you would like to try it, it's available in the Daily Builds , starting with build 2023.06.1+437. If the fix works for you, please write a comment here letting us know! Please note that daily builds are for testing purposes only and they are not meant for production. This fix is still undergoing testing.

@Chris-Larkin
Copy link

Chris-Larkin commented Jul 5, 2023 via email

@jonvanausdeln
Copy link

❗❗ There is a fix for this issue❗❗
The latest release now contains the fix for this issue. Please download the latest version(RStudio 2023.06.1+524) from https://posit.co/,

@kaijagahm
Copy link

kaijagahm commented Aug 2, 2023

@kevinushey I tried your workaround because I'm working on a server instance where I don't have the ability to update RStudio without going through a system administrator. Adding what you suggested to the .Rprofile worked!

@kevinushey
Copy link
Contributor

@kaijagahm Phew, I'm glad to hear that was able to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests