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

Getting thread 'main' panicked at 'called Option::unwrap() on a None value' #275

Closed
hwittenborn opened this issue Jul 7, 2023 · 4 comments
Labels
C-bug Something isn't working

Comments

@hwittenborn
Copy link

I'm getting this error whenever I try to create a SquashFS image in my application:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/hunter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backhand-0.13.0/src/entry.rs:49:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I was also able the reproduce the issue with the following code:

let mut writer = std::io::Cursor::new(vec![]);
let mut fs = backhand::FilesystemWriter::default();
fs.write(&mut writer).unwrap();
@hwittenborn hwittenborn changed the title Getting thread 'main' panicked at 'called Option::unwrap() on a None value' Getting thread 'main' panicked at 'called 'Option::unwrap()' on a 'None' value' Jul 7, 2023
@hwittenborn hwittenborn changed the title Getting thread 'main' panicked at 'called 'Option::unwrap()' on a 'None' value' Getting thread 'main' panicked at 'called Option::unwrap() on a 'None' value' Jul 7, 2023
@hwittenborn hwittenborn changed the title Getting thread 'main' panicked at 'called Option::unwrap() on a 'None' value' Getting thread 'main' panicked at 'called Option::unwrap() on a None value' Jul 7, 2023
@wcampbell0x2a
Copy link
Owner

Good find. I'm not at my computer but

id_table: vec![],

Should instead call:

pub fn root() -> Vec<Id> {

@wcampbell0x2a wcampbell0x2a added the C-bug Something isn't working label Jul 8, 2023
@wcampbell0x2a
Copy link
Owner

#276 should fix this

@hwittenborn
Copy link
Author

Thank you @wcampbell0x2a! I'll go ahead and try running that branch in my program.

@hwittenborn
Copy link
Author

Can confirm the PR fixed the issue, thanks a ton @wcampbell0x2a! Feel free to close the issue whenever it's best for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants