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

Panic on mdm #6626

Closed
emilyyyylime opened this issue Apr 6, 2023 · 2 comments
Closed

Panic on mdm #6626

emilyyyylime opened this issue Apr 6, 2023 · 2 comments
Labels
C-bug Category: This is a bug S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Comments

@emilyyyylime
Copy link
Contributor

emilyyyylime commented Apr 6, 2023

Summary

I couldn't really reproduce this, but I was basically in this situation:

mod name [{
  // A lot of code...
}]

then I deleted the module contents, replacing it with ; (to achieve mod name;). I used rust-analyser to generate name.rs, which I then entered with gd. In there I pasted the module contents, but of course it was still surrounded by {}, so I did mdm to remove those braces with the entire file still selected. Helix promptly crashed and I lost my entire module:sob:...

Reproduction Steps

No response

Helix log

~/.cache/helix/helix.log

Error ought to have happened around here... perhaps around the '1 unsaved buffer(s)' part?

2023-04-06T18:26:11.415 helix_lsp::transport [ERROR] err <- "[ERROR hir_ty::mir::lower] MIR lower implementation bug: unsized temporaries    \n"
2023-04-06T18:26:14.982 helix_lsp::transport [ERROR] err <- "[ERROR hir_ty::mir::lower] MIR lower implementation bug: unsized temporaries    \n"
2023-04-06T18:26:27.166 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:26:27.166 helix_vcs [ERROR] failed to open diff base for /path/to/module/name.rs
2023-04-06T18:26:27.166 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:26:27.166 helix_vcs [ERROR] failed to obtain current head name for /path/to/module/name.rs
2023-04-06T18:26:27.214 helix_view::editor [ERROR] editor error: No definition found.
2023-04-06T18:26:27.377 helix_lsp::transport [ERROR] err <- "[ERROR hir_ty::mir::lower] MIR lower implementation bug: unsized temporaries    \n"
2023-04-06T18:27:08.496 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:27:08.496 helix_vcs [ERROR] failed to open diff base for /path/to/module/name.rs
2023-04-06T18:27:08.497 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:27:08.497 helix_vcs [ERROR] failed to obtain current head name for /path/to/module/name.rs
2023-04-06T18:27:08.955 helix_lsp::transport [ERROR] <- ServerError(-32801): content modified
2023-04-06T18:27:08.955 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-04-06T18:27:29.696 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:27:29.696 helix_vcs [ERROR] failed to open diff base for /path/to/module.rs
2023-04-06T18:27:29.696 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:27:29.696 helix_vcs [ERROR] failed to obtain current head name for /path/to/module.rs
2023-04-06T18:27:30.864 helix_lsp::transport [ERROR] <- ServerError(-32801): content modified
2023-04-06T18:27:30.864 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-04-06T18:28:10.155 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:28:10.155 helix_vcs [ERROR] failed to open diff base for /path/to/module/name.rs
2023-04-06T18:28:10.155 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:28:10.155 helix_vcs [ERROR] failed to obtain current head name for /path/to/module/name.rs
2023-04-06T18:28:15.406 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:28:17.558 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:28:46.925 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:28:48.670 helix_view::editor [ERROR] editor error: 1 unsaved buffer(s) remaining: ["module/name.rs"]
2023-04-06T18:28:49.561 helix_view::editor [ERROR] editor error: 1 unsaved buffer(s) remaining: ["module/name.rs"]
2023-04-06T18:31:48.288 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:31:48.288 helix_vcs [ERROR] failed to open diff base for /path/to/module.rs
2023-04-06T18:31:48.289 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:31:48.289 helix_vcs [ERROR] failed to obtain current head name for /path/to/module.rs
2023-04-06T18:31:49.463 helix_lsp::transport [ERROR] <- ServerError(-32801): content modified
2023-04-06T18:31:49.463 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-04-06T18:33:00.972 helix_lsp::transport [ERROR] <- ServerError(-32801): content modified
2023-04-06T18:33:00.976 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-04-06T18:33:18.389 helix_view::editor [ERROR] editor error: no such command: 'W'
2023-04-06T18:36:23.074 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:36:23.074 helix_vcs [ERROR] failed to open diff base for /path/to/module.rs
2023-04-06T18:36:23.075 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:36:23.075 helix_vcs [ERROR] failed to obtain current head name for /path/to/module.rs
2023-04-06T18:36:23.542 helix_lsp::transport [ERROR] <- ServerError(-32801): content modified
2023-04-06T18:36:23.542 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-04-06T18:36:27.281 helix_lsp::transport [ERROR] <- ServerError(-32801): content modified
2023-04-06T18:36:27.282 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-04-06T18:36:39.140 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:36:39.140 helix_vcs [ERROR] failed to open diff base for /path/to/module/name.rs
2023-04-06T18:36:39.140 helix_vcs [ERROR] PeelToCommit(
    Unborn {
        name: FullName(
            "refs/heads/master",
        ),
    },
)
2023-04-06T18:36:39.140 helix_vcs [ERROR] failed to obtain current head name for /path/to/module/name.rs
2023-04-06T18:36:43.977 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:36:45.576 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:36:46.714 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:36:51.570 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:36:54.141 helix_view::editor [ERROR] editor error: Surround pair not found around all cursors
2023-04-06T18:46:10.173 helix_view::editor [ERROR] editor error: no such command: 'log'

Platform

Linux

Terminal Emulator

Kitty

Helix Version

helix 22.12 (583f6a1)

@emilyyyylime emilyyyylime added the C-bug Category: This is a bug label Apr 6, 2023
@pascalkuthe
Copy link
Member

please provide a reporduction case that can reliably reproduce this issue, otherwise this is not actionable.

@pascalkuthe pascalkuthe added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 26, 2023
woojiq added a commit to woojiq/helix that referenced this issue Sep 15, 2023
`find_nth_closest_pairs_pos` produces unsorted tuple. Need to sort it before passing tuple to the delete transaction.

helix-editor#6626
woojiq added a commit to woojiq/helix that referenced this issue Sep 15, 2023
`find_nth_closest_pairs_pos` produces unsorted tuple. Need to sort it before passing tuple to the delete transaction.

helix-editor#6626
@pascalkuthe
Copy link
Member

pascalkuthe commented Mar 3, 2024

Likely closed by #9796, but I can't tell since no reproduction case was provided

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

No branches or pull requests

2 participants