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

Rstudio desktop free preview 1.2.1329 - can't select text in editor window #4488

Closed
rgayler opened this issue Mar 20, 2019 · 20 comments
Closed
Assignees
Milestone

Comments

@rgayler
Copy link

@rgayler rgayler commented Mar 20, 2019

I just upgraded from 1.2.1327 to 1.2.1329 and can no longer select text in (at least) the editor window. Click-drag does not select text. Double-click does not select text. Editing is almost unusable.

The behaviour survived a restart of Rstudio and a reboot of the computer. Other programs were fine.

I reverted to 1.2.1327 and the problem disappeared.

I am running the Ubuntu 18+ versions of Rstudio.

My computer is running Ubuntu 18.04 4-bit.

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 21, 2019

I just installed 1.2.1329 (Bionic) on a clean install of Bionic + r-base, and am able to select text in the editor via click-drag, double-click, and so on.

So something else is going on here.

@rgayler
Copy link
Author

@rgayler rgayler commented Mar 21, 2019

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 21, 2019

I recommend posting what you've encountered on the community page and see if anybody else reports the same. That might give us more data to work with in understanding what you are experiencing. https://community.rstudio.com/c/rstudio-ide

@rgayler
Copy link
Author

@rgayler rgayler commented Mar 21, 2019

@rgayler
Copy link
Author

@rgayler rgayler commented Mar 21, 2019

I have just reproduced the problem on a different computer running Ubuntu 18.04. The two computers showing the same problem are not identically configured, but I do generally install the same things on both - so there may be something relatively uncommon that I am doing on both that interacts with whatever changed between 1.2.1327 and 1.2.1329

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 21, 2019

Which keybinding are you using for the editor? E.g. Default, Vim, Emacs, Sublime Text.

Does this problem only happen in the editor pane? How about the Console?

Reproduce the problem again, then Help / Diagnostics / Write Diagnostics Report and attach the generated file to this issue. Review it first to make sure there isn't anything in there you need to redact for privacy reasons.

Here's a brief example of what I'm trying:
2019-03-21_09-08-42 (1)

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 21, 2019

There were 3 changes made between 1.2.1327 and 1.2.1329.

Two of them are related to using themes. What theme do you have selected in Tools / Global Options / Appearance? I've got the default selected (Textmate). If you've got a different one, does the problem still happen if you switch back to Textmate?

The other change would prevent saving a file if you did options(repos = NULL) then tried to save a file, so seems quite unlikely it is a factor.

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 21, 2019

FYI, I also tried installing 1.2.1327, using it a bit, then uninstalling it and installing 1.2.1329 and it still worked (selection-wise).

@jjallaire
Copy link
Member

@jjallaire jjallaire commented Mar 25, 2019

I think I am seeing the same thing.

I updated to the preview yesterday (from either 1.2.1300 or 1.2.1320, not sure which I was running) and now find my IDE in a state where no syntax highlighting works and text selections are impossible! Here's a video:

noselection

The only thing I see in the JS console is this:

Screen Shot 2019-03-23 at 11 09 27 AM

Interestingly, if I switch to another theme (I tried "Solarized Dark") then everything works fine. If I think explicitly switch back to TextMate, everything works fine (and there is no error in the JS console when I do a reload).

So something to do with having no theme explicitly set in preferences? Maybe this commit from 8 days ago: 8c9a28e

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Mar 25, 2019

I see a similar query for the theme that works fine:

Screen Shot 2019-03-25 at 8 54 27 AM

although curious is that your case has the double-slash in the URL.

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Mar 25, 2019

It might be related to this older commit: eafd6b7#diff-ecbf3c3e6509a5a8a5a76289bbd60514

It looks like we previously expected / used leading slashes in the theme URLs, and have since removed them. However, I suspect the saved URLs might still contain these leading slashes, and so when these old themes get used the issue comes up.

@rgayler, can you confirm whether changing the editor theme fixes the issue for you?

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 25, 2019

I see a slightly different failure; no double-slash, but there's an extra "ace" in the path. This is thrown when the Options dialog tries to load the theme preview (and is on 1.3 dev server build, so that might be a factor).

2019-03-25_09-21-40

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Mar 25, 2019

That's almost surely a v1.3-ism. Ace has some code that tries to auto-load the textmate theme on startup that took some work to cauterize in v1.2; I expect we'll need the same in v1.3 (and I recall seeing some updates on the Ace side around how themes were loaded)

@gtritchie
Copy link
Member

@gtritchie gtritchie commented Mar 25, 2019

Yes, I've only been able to repro with 1.3. Opening a separate issue to track that one. #4504

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Mar 25, 2019

However, I suspect the saved URLs might still contain these leading slashes, and so when these old themes get used the issue comes up.

That's very possible. I was able to reproduce @jjallaire's issue by hand-modifying my user-settings to introduce a leading / in the theme name.

@kevinushey
Copy link
Contributor

@kevinushey kevinushey commented Mar 25, 2019

I've got the following repro steps:

  1. Clean out ~/.rstudio-desktop;
  2. Install RStudio v1.2.900, and change the theme (so that theme settings get persisted);
  3. Install the latest preview, and observe no theming in the IDE.

The issue does indeed resolve after changing the theme a second time.

On our side, I think the simplest fix is to just trim out a potential leading slash here:

public native final String getUrl()
/*-{
return this.url;
}-*/;

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Mar 25, 2019

I was also able to repro this by hand-editing the ~/.rstudio-desktop/monitored/user-settings/user-settings file directly.

@MariaSemple, what do you think about making a change here for 1.2?

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Mar 27, 2019

Should be fixed by #4506 (note: merged to patch branch so not yet part of a public build)

@rgayler
Copy link
Author

@rgayler rgayler commented Mar 27, 2019

@ronblum
Copy link
Contributor

@ronblum ronblum commented Jun 7, 2019

Verified in RStudio Desktop 1.2.1539 on MacOS 10.14.6 and Ubuntu 18.04.2.

@ronblum ronblum added verified and removed verifying labels Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants