-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Helix crashed unexpectedly when trying to <A-o> in Rust #10974
Comments
UpdateI was able to reproduce the bug:
PathBuf::from(format!(concat!(env!("SOLITAIRE_CARDS_LOCATION"), "{}/{value_char}{suit_char}.svg")))
Here's the file in which the bug occurs: card.rs:use std::path::PathBuf;
use bevy::{prelude::*, utils::HashMap};
use bevy_svg::prelude::*;
use strum::{EnumIter, IntoEnumIterator};
#[derive(Clone, Copy, PartialEq, Eq, Hash, EnumIter, Debug)]
pub enum Suit {
Spades,
Clubs,
Diamonds,
Hearts,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, EnumIter, Debug)]
pub enum Value {
Ace,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct Card {
suit: Suit,
value: Value,
}
fn asset_path(card: Card) -> PathBuf {
use Suit::*;
use Value::*;
let suit_char = match card.suit {
Spades => 'S',
Clubs => 'C',
Diamonds => 'D',
Hearts => 'H',
};
let value_char = match card.value {
Ace => 'A',
Two => '2',
Three => '3',
Four => '4',
Five => '5',
Six => '6',
Seven => '7',
Eight => '8',
Nine => '9',
Ten => 'T',
Jack => 'J',
Queen => 'Q',
King => 'K',
};
PathBuf::from(format!(concat!(env!("SOLITAIRE_CARDS_LOCATION"), "/{value_char}{suit_char}.svg")))
}
pub fn load_assets(asset_server: &AssetServer) -> HashMap<Card, Handle<Svg>> {
Suit::iter()
.flat_map(|suit| {
Value::iter()
.map(move |value| Card {
suit,
value,
})
})
.map(|card| (card, asset_server.load(asset_path(card))))
.collect()
} I could also attach the entire repo if that helps. Backtrace:
Log file (-vv) is attached: |
FYI, I can't reproduce on 1796735 |
I also tested it on 1796735 and still got the crash. Can I provide anything else to make reproducing the bug easier? I made a recording showing the crash: |
Just checked and I am also able to reproduce, after making sure to add the |
Summary
I tried to expand my selection to the surrounding tree-sitter node when helix crashed with this panic:
Reproduction Steps
Unfortunately I wasn't able to reproduce the bug.Update: I was able to reproduce this, see below
I tried this:
hx
I expected this to happen:
Selection gets expanded
Instead, this happened:
Helix crashed and immediately dumped me back into the shell.
Helix log
~/.cache/helix/helix.log
Platform
Linux (NixOS e9ee548d90ff586a6471b4ae80ae9cfcbceb3420)
Terminal Emulator
alacritty 0.13.2
Installation Method
flake
Helix Version
helix 24.3 (dbacaad)
The text was updated successfully, but these errors were encountered: