-
Notifications
You must be signed in to change notification settings - Fork 92
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
R crashing when editing long quarto files #3792
Comments
Would you be able to share with us this quarto file? |
So I've been working with this file for a few hours this morning and not had any problems. I'm a bit baffled by what was happening. Here is a copy of what was causing issues if it helps, but if you want to close this I get it as well. For the record I did try opening and closing Positron yesterday and it didn't solve the problem, not sure what I did that solved it now. |
@lionel- I've seen this one other time, also with Quarto I've never seen it in an R script, so it makes me think something is wrong with the .qmd->.R mapping, not with our ark lsp code |
We suspect #4437 may be other examples of problems with this Quarto "mapping" from |
Just wanted to follow up and maybe provide a more minimal example. I think there is an issue when R code starts immediately in a code block. I was able to get R to crash using just the qmd below, and it keeps crashing over and over again.
Info: |
Thank you for sharing this @reuning! Can you share a set of steps that causes a crash for you? I have loaded up your document here that you shared. Can you outline a set of steps (maybe starting from a fresh open of Positron with this file in the workspace) that causes a crash for you? |
I've been trying to figure out the minimal thing that will get this to happen. And I think it is most likely to happen if you've run one code chunk and then create another one. What I did, starting with an empty file is write out:
I then ran the code Then I created a new block below so the full qmd looked like:
At this point I highlighted the Here is the log:
|
I tried this a few times but still can't reproduce 😢 . I've also spent a decent chunk of time on both mac and windows trying to reproduce this with a long quarto doc but no luck |
So I don't keep having to look this up, we have had users report this on:
Most reports are on quite long @reuning can you tell me in even more detail what you mean by this?
Do you use your mouse to highlight a line of code? vs. put your cursor in a line and then use the keyboard shortcut? It might be helpful to have even more detail about what actions you are taking. |
This might be too much but I screen recorded it and put it up on dropbox here. In this case it happens when I highlight it with my cursor and then use the keyboard shortcut to run that line. I also just left my cursor on that line and ran it and had the same crash (without highlighting). Also this only seems to happen if I run the first block and then write out the second block. If I load the qmd file with both blocks I can run each block fine. |
Thank you for sharing that video! I tried to match as closely as possible what you did and unfortunately still don't see the crash. 😩 These questions are me trying to be thorough, not necessarily thinking one of them is really the problem:
|
One somewhat interesting thing I noticed - it seems like there is not a trailing newline in the file (i.e. the I haven't been able to reproduce even after setting |
If you could also post your |
Okay so I've tried a few things:
I've been able to get it to crash consistently by just typing out this:
The strange thing is that if I open up that file and just highlight and run things it will run fine. It only happens when I start from scratch and type it out. My settings:
Extensions Name: Catppuccin for VSCode Name: Code Spell Checker Name: LaTeX Workshop Name: Rainbow CSV |
We have a possible fix for you to try out @reuning. Can you please try:
|
It looks to be working now. I tried what I did above and didn't have any crashes. Played around with a longer Quarto file as well and didn't have any crashes with that either. Thank you all. |
Thank you so much for your patience and willingness to share so much feedback! ❤ |
We've got another new dev version of the Quarto extension here with a cleaned-up version of the fix, if you would like to again download, unzip, and install the We will do an official release of the Quarto extension with this fix probably before the end of the week. Since we don't have an internally reproducible way of generating the original problem, I am going to move this issue straight to "Done" (no QA verification). I used the |
Positron Version:
Positron Version: 2024.06.1 build 17
Code - OSS Version: 1.90.0
Commit: 893521e
Date: 2024-06-25T03:05:41.077Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.9.6-200.fc40.x86_64
Steps to reproduce the issue:
I'm having a strange issue and I'm sorry I cannot provide more details but what I am seeing is the R console randomly crashing with the following popping up:
R 4.4.1 exited unexpectedly and was automatically restarted. You may have lost unsaved work. Exit code: 134
(I've coped more log info below). I'm working on a relatively long Quarto document (over 600 lines currently) and this seems to be part of it. If I copy part of the Quarto document into a new qmd file and edit it there then I don't have any crashes. But with the full file I do. I also do not necessarily have to be actively running anything or sending anything to the console for it to crash, it will just happen.What did you expect to happen?
Were there any error messages in the output or Developer Tools console?
Below is copied from the Console R
The R part of the quarto file (omitted for length)
I've also see errors like:
This seems to come about when I am highlighting and CTRL+Enter sending something to the console to run.
The text was updated successfully, but these errors were encountered: