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 in gitignore handling #106

Closed
daaku opened this issue Sep 26, 2016 · 3 comments
Closed

panic in gitignore handling #106

daaku opened this issue Sep 26, 2016 · 3 comments
Labels
bug A bug.

Comments

@daaku
Copy link

daaku commented Sep 26, 2016

I got this panic. Looks like it's in the gitignore logic -- I can't share the whole file, but if you could guide me to figure out which line it's failing on I can share that.

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs|325| 5
|| stack backtrace:
|1| :           0x4fb292 - std::sys::backtrace::tracing::imp::write::h4b09e6e8c01db097
|2| :           0x4ff86d - std::panicking::default_hook::{{closure}}::h1d3243f546573ff4
|3| :           0x4fe6fa - std::panicking::default_hook::h96c288d728df3ebf
|4| :           0x4fecf8 - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db
|5| :           0x4feb92 - std::panicking::begin_panic::hfbeda5aad583dc32
|6| :           0x4fead0 - std::panicking::begin_panic_fmt::h4fe9fb9d5109c4bf
|7| :           0x4fea51 - rust_begin_unwind
|8| :           0x5548ec - core::panicking::panic_fmt::h4395919ece15c671
|9| :           0x55481b - core::panicking::panic::hc74ff52ed78364e1
10:         || x41ae18 - rg::gitignore::GitignoreBuilder::add_path::h706ac92f76fbec29
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/obj/../src/libcore/macros.rs|21| 1
at /home/travis/build/BurntSushi/ripgrep/src/gitignore.rs|301| 1
at /home/travis/build/BurntSushi/ripgrep/src/gitignore.rs|265| 5
11:         || x41f708 - rg::ignore::IgnoreDir::with_ignore_names::h6235506834840d62
at /home/travis/build/BurntSushi/ripgrep/src/ignore.rs|365| 5
12:         || x41eb56 - rg::ignore::Ignore::push::he3c5dc3b90e6c6a8
at /home/travis/build/BurntSushi/ripgrep/src/ignore.rs|326| 6
at /home/travis/build/BurntSushi/ripgrep/src/ignore.rs|192| 2
13:         || x43d4c7 - rg::run::hacc2ea9b10689e6d
at /home/travis/build/BurntSushi/ripgrep/src/walk.rs|64| 4
at /home/travis/build/BurntSushi/ripgrep/src/main.rs|132| 2
14:         || x437f4b - rg::main::h38b472398f351607
at /buildslave/rust-buildbot/slave/nightly-dist-rustc-musl-linux/build/obj/../src/libcore/result.rs|601| 1
at /home/travis/build/BurntSushi/ripgrep/src/main.rs|78| 8
15:         || x5071c6 - __rust_maybe_catch_panic
16:         || x4fe0ca - std::rt::lang_start::haaae1186de9de8cb
@kevin-vigor
Copy link

I am experiencing this problem as well. Attached is a .gitignore file which leads to this crash.

gitignore-of-doom.zip

@BurntSushi
Copy link
Owner

My bet is that this is fixed by #104. Do you have lines that are only whitespace but otherwise empty? (I probably introduced this regression in my last round of bug fixes.)

@BurntSushi BurntSushi added the bug A bug. label Sep 26, 2016
@daaku
Copy link
Author

daaku commented Sep 26, 2016

I looked at the .gitignore and did in fact find such a line! Will wait for the next release -- thanks for the quick fix!

amsharma91 added a commit to amsharma91/ripgrep that referenced this issue Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug.
Projects
None yet
Development

No branches or pull requests

3 participants