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

[Dev Console] Mojo Language Server crash #3882

Open
mbrengman opened this issue Dec 14, 2024 · 0 comments
Open

[Dev Console] Mojo Language Server crash #3882

mbrengman opened this issue Dec 14, 2024 · 0 comments
Labels
dev-console tag for all issues related to dev-console frontend

Comments

@mbrengman
Copy link

Issue description

I just got the following error while working on a file. I'm not exactly sure how to resolve it other than opening a new file. This happened randomly when the mojo debugger was responding to my code while I was working on the main file. Here is the error message:

A crash happened in the Mojo Language Server when processing this document. The Language Server will try to reprocess this document once it is edited again. Please report this issue in https://github.com/modularml/mojo/issues along with all the relevant source codes with their current contents.

If it helps, here is the code that I was working on:

`
from python import Python
from collections import Optional

struct Btree:
var root: Optional[Int]
var left: Btree
var right: Btree

fn __init__(inout self):
    var root = Optional[Int](None)
    alias left = Btree
    var right = Optional[Int](None)
    self.root = root
    fn new() -> Btree:
        return Btree()
    if self.root:
        self.left = new()
        self.right = new()

fn isempty(inout self) -> Bool:
    return self.root is None
fn insert(inout self, item: Int):
    fn new() -> Btree:
        return Btree()
    if self.isempty():
        self.root = Int(item)
        print("Placing value in root ", item)`

This is the first time that I've posted code, so if there's anything that might help, please let me know and I'll be sure to try to improve my posts.

Steps to reproduce

  • Add screenshots if possible, to help explain the problem.
  • Include anything that might help us debug the issue.
@mbrengman mbrengman added the dev-console tag for all issues related to dev-console frontend label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-console tag for all issues related to dev-console frontend
Projects
None yet
Development

No branches or pull requests

1 participant