Debugger process finished with exit code -1073741819 (0xC0000005) in Rust rover
已完成
Hi, this is my first post, so apologies if this isn't the right place, and I couldn't find a dedicated forum for this. I'm running a debugger on the following code, but I keep encountering an error where the debugger process finishes with exit code -1073741819 (0xC0000005)
within a few seconds of running without me doing anything.
Here is the code I'm working with:
use crate::board::board::Board;
pub mod board;
pub mod movegen;
#[cfg(test)]
pub mod board_tests;
mod perft;
use clap::Parser;
use crate::movegen::generate::generate_moves;
use crate::perft::perft;
#[derive(Parser, Debug)]
#[command(name = "Rookbot", version = "1.0", about = "A chess engine command-line parser")]
struct Args {
/// Search depth or arbitrary number
depth: u32,
/// FEN string representing the chess position
fen: String,
/// Moves in algebraic notation
#[arg(required = false)]
moves: Vec<String>,
}
fn main() {
let args: Args = Args::parse();
let Args { depth, fen, moves } = args;
let mut board = Board::from_fen(&fen);
for mv in moves.iter() {
let legal_moves = generate_moves(&mut board);
let mv_to_apply = legal_moves.iter().find(|&m| m.to_algebraic() == *mv).expect("Invalid move");
board.make_move(mv_to_apply);
}
print!("{} , {}, {:?}", fen, depth, moves);
let s = perft(&mut board, depth);
println!("{}", s);
}
The error seems to happen right away after starting the debugger in Rust Rover. I haven't clicked on anything yet. The exit code -1073741819 (0xC0000005)
typically indicates an access violation, so I'm guessing there may be an issue with memory access or a null pointer.
Thanks in advance for any help or guidance on this!
请先登录再写评论。
I also have this issue in rust rover with a very simple project (just a few lines of code). I get the following output in the LLDB log:
Thanks in advance!
Hi Uribracha2611 and Christoffer Hao Andersson!
Please submit issues to the RustRover issue tracker (https://youtrack.jetbrains.com/issues/RUST), and the RustRover team will assist you.
will submit an issue, but in the meantime, I found a temporary solution. When you activate the debugger, the variable tab should be empty like this:
Otherwise, it tries to compute a value that doesn’t exist, which causes it to crash for some reason.
Thanks for sharing! I will try it :)