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 targ file #13

Closed
crash-g opened this issue Jun 17, 2019 · 2 comments
Closed

Panic on targ file #13

crash-g opened this issue Jun 17, 2019 · 2 comments

Comments

@crash-g
Copy link

crash-g commented Jun 17, 2019

ripgrep-all version: 0.9.1.
The panic happens both with and without --rga-accurate option.

File: a text file with targ extension.
Stack trace:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: StringError("numeric field was not a number: from the when getting cksum for # -*- mode: makefile -*-\n#\n# Copyright (c) 2012, Joyent, Inc. All rights reserved.\n#\n# Makefile.targ") }', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: rust_begin_unwind
             at src/libstd/panicking.rs:308
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: <ripgrep_all::adapters::tar::TarAdapter as ripgrep_all::adapters::FileAdapter>::adapt
  10: ripgrep_all::preproc::rga_preproc
  11: <ripgrep_all::adapters::tar::TarAdapter as ripgrep_all::adapters::FileAdapter>::adapt
  12: ripgrep_all::preproc::rga_preproc
  13: <ripgrep_all::adapters::decompress::DecompressAdapter as ripgrep_all::adapters::FileAdapter>::adapt
  14: core::ops::function::FnOnce::call_once{{vtable.shim}}
  15: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
  16: <ripgrep_all::preproc_cache::LmdbCache as ripgrep_all::preproc_cache::PreprocCache>::get_or_run
  17: ripgrep_all::preproc::rga_preproc
  18: rga_preproc::main
  19: std::rt::lang_start::{{closure}}
  20: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:293
  21: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  22: std::rt::lang_start_internal
             at src/libstd/panicking.rs:272
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  23: main
  24: __libc_start_main
  25: _start
-------------------------------------------------------------------------------

Let me know if more info is needed.

@phiresky
Copy link
Owner

phiresky commented Jun 17, 2019

Huh, very interesting. Looks like my "file ending" regex is .tar instead of .tar$ as it schould be. Still, it shouldn't panic. I'll fix it later today.

phiresky added a commit that referenced this issue Jun 17, 2019
@phiresky
Copy link
Owner

Fixed in 89fb6cc, with the panic replaced by a normal error in an earlier commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants